content
stringlengths
10
4.9M
import numpy as np import scipy import pandas as pd import plotly.express as px def smoothen_fft_(lc, thresh=200): # a low pass filter lc_fft = np.fft.fft(lc) lc_fft[thresh : len(lc) - thresh] = 0 lc_smooth = np.abs(np.fft.ifft(lc_fft)) return lc_smooth def smoothening_ma(__x, __y, window_sz, shift): """ Using moving average to smoothen data and linearly interpolating back to original size """ new_norm = [] new_norm_data_points = [] # for first frame new_norm.append(np.mean(__y[0:window_sz])) new_norm_data_points.append(__x[0]) for i in range(window_sz, len(__y), shift): tmp = np.mean(__y[i : i + shift]) new_norm.append(tmp) new_norm_data_points.append(__x[i]) new_norm = np.array(new_norm) new_norm_data_points = np.array(new_norm_data_points) xnew = np.linspace(__x[0], __x[0] + len(__x), __x[0] + len(__x)) # interpolating back to original size f = scipy.interpolate.interp1d( new_norm_data_points, new_norm, fill_value="extrapolate", kind="linear" ) ynew = f(xnew) return xnew, ynew def smoothening_fft(lc, thresh=200, should_plot=False): lc_fft = np.fft.fft(lc) lc_fft[thresh : len(lc) - thresh] = 0 lc_smooth = np.abs(np.fft.ifft(lc_fft)) + 1e-5 if should_plot: px.line(pd.DataFrame(lc_smooth)) xnew = np.linspace(0, len(lc), len(lc)) return xnew, abs(lc_smooth)
<reponame>dankocher/metamodern-ui<filename>src/components/Tag/Tag.interface.ts export interface MetTagProps { /** * Additional component styles */ style?: object; /** * Additional component classes */ className?: string; /** * Font for component */ fontClass?: string; /** * Value */ value: string; /** * Is component has checkbox(TagInput) / checked icon (TagButton) */ isHasCheckbox?: boolean; /** * Function for trigger when clicked on checkbox(TagInput) / component (TagButton) */ onToggle?: () => void; /** * Set an icon when component is checked */ checkedIcon?; /** * Set an icon when component is unchecked */ uncheckedIcon?; /** * Сhange border color when input is default */ defaultColor?: string; /** * Сhange border color when input is focused */ focusColor?: string; }
<gh_stars>1-10 from unittest import TestCase from unittest import TestSuite from unittest import main from unittest import makeSuite from mwstools.parsers.notifications import Notification class Dummy(object): """ Only used for test_notification_payload since there is not actually a payload to test. """ def __init__(self, *args, **kwargs): pass class TestNotification(TestCase): body = """ <Notification> <NotificationMetaData> <Empty /> </NotificationMetaData> <NotificationPayload> <Emtpy /> </NotificationPayload> </Notification> """ def setUp(self): self.parser = Notification.load(self.body) def test_notification_metadata(self): self.assertIsNotNone(self.parser.notification_metadata) def test_notification_payload(self): self.assertIsNotNone(self.parser.notification_payload(Dummy)) __all__ = [ TestNotification ] def suite(): s = TestSuite() for a in __all__: s.addTest(makeSuite(a)) return s if __name__ == '__main__': main(defaultTest='suite')
def is_cmp_data_empty(cmp_data): if not cmp_data: return True return not any([cmp_data.runIds, cmp_data.runTag, cmp_data.openReportsDate])
/* iprintf() prints out input prompts */ void iprintf( int i_inp_msg ) { saverrno = printf( ca_inp_msg[i_inp_msg] ); fflush( stdout ); if (saverrno < 0) usage( ERPRINT ); }
#!/usr/bin/env python import visvis as vv import OpenGL.GL as gl class CustomWobject(vv.Wobject): """ Example Custom wobject. This example is not optimal, it is just to illustrate how Wobject can be subclassed. """ def __init__(self, parent): vv.Wobject.__init__(self, parent) def _drawTraingles(self, how, color): a = 0, 0, 0 b = 1, 0, 0 c = 1, 1, 0 d = 1, 1, 1 gl.glColor(*color) gl.glBegin(how) gl.glVertex(*a); gl.glVertex(*b); gl.glVertex(*c) gl.glVertex(*a); gl.glVertex(*c); gl.glVertex(*d) gl.glVertex(*b); gl.glVertex(*c); gl.glVertex(*d) gl.glVertex(*a); gl.glVertex(*d); gl.glVertex(*b) gl.glEnd() def _GetLimits(self): """ Tell the axes how big this object is. """ # Get limits x1, x2 = 0, 1 y1, y2 = 0, 1 z1, z2 = 0, 1 # Return return vv.Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2) def OnDraw(self): """ To draw the object. """ self._drawTraingles(gl.GL_TRIANGLES, (0.2, 0.8, 0.4)) gl.glLineWidth(3) self._drawTraingles(gl.GL_LINE_LOOP, (0,0,0)) def OnDrawShape(self, clr): """ To draw the shape of the object. Only necessary if you want to be able to "pick" this object """ self._drawTraingles(gl.GL_TRIANGLES, clr) def OnDrawScreen(self): """ If the object also needs to draw in screen coordinates. Text needs this for instance. """ pass def OnDestroyGl(self): """ To clean up any OpenGl resources such as textures or shaders. """ pass def OnDestroy(self): """ To clean up any other resources. """ pass # Create an instance of this class and set axes limits a = vv.cla() c = CustomWobject(a) a.SetLimits() # Enter main loop app = vv.use() # let visvis chose a backend for me app.Run()
/** * <p>Initialize our internal MessageResources bundle.</p> * * @throws ServletException if we cannot initialize these resources * @throws UnavailableException if we cannot load resources */ protected void initInternal() throws ServletException { try { internal = MessageResources.getMessageResources(internalName); } catch (MissingResourceException e) { log.error("Cannot load internal resources from '" + internalName + "'", e); throw new UnavailableException( "Cannot load internal resources from '" + internalName + "'"); } }
import { Status, Resolution, Resolvable } from './Resolver' import { Segment, createPlaceholderSegment } from './Segments' import { NaviNode, NodeMatcher, NodeMatcherResult, NaviNodeBase, NodeMatcherOptions, MaybeResolvableNode, NaviNodeType, } from './Node' import { Env } from './Env' export interface Context<ParentContext extends object = any, ChildContext extends object = any> extends NaviNodeBase<ParentContext, ContextMatcher<ParentContext, ChildContext>> { type: NaviNodeType.Context new (options: NodeMatcherOptions<ParentContext>): ContextMatcher< ParentContext, ChildContext > childNodeResolvable: Resolvable<NaviNode> childContextResolvable: Resolvable<ChildContext> } export class ContextMatcher<ParentContext extends object, ChildContext extends object> extends NodeMatcher<ParentContext> { static isNode = true; static type: NaviNodeType.Context = NaviNodeType.Context; last?: { childContext?: ChildContext childEnv?: Env matcher?: NodeMatcher<any> node?: NaviNode }; ['constructor']: Context<ParentContext, ChildContext> constructor(options: NodeMatcherOptions<ParentContext>) { super(options, true) } protected execute(): NodeMatcherResult<Segment> { let childContextResolution: Resolution<ChildContext> = this.resolver.resolve(this.env, this.constructor.childContextResolvable) if (childContextResolution.status !== Status.Ready) { return { resolutionIds: [childContextResolution.id], segment: createPlaceholderSegment(this.env, childContextResolution.error, this.appendFinalSlash) } } // Need te memoize env, as its the key for memoization by the resolver let childContext = childContextResolution.value! let childEnv: Env<ChildContext> if (!this.last || this.last.childContext !== childContext) { childEnv = { ...this.env, context: childContext } this.last = { childContext, childEnv, } } else { childEnv = this.last.childEnv! } let childNodeResolution = this.resolver.resolve(childEnv, this.constructor.childNodeResolvable) if (childNodeResolution.status !== Status.Ready) { return { resolutionIds: [childNodeResolution.id], segment: createPlaceholderSegment(childEnv, childNodeResolution.error, this.appendFinalSlash) } } // Memoize matcher so its env prop can be used as a key for the resolver let node = childNodeResolution.value! let matcher: NodeMatcher<ChildContext> if (this.last.node !== node) { matcher = new node({ env: childEnv, resolver: this.resolver, withContent: this.withContent, appendFinalSlash: this.appendFinalSlash, }) this.last = { ...this.last, node, matcher, } } else { matcher = this.last.matcher! } return matcher.getResult() } } export function createContext<ParentContext extends object=any, ChildContext extends object=any>( maybeChildContextResolvable: ((env: Env<ParentContext>) => Promise<ChildContext> | ChildContext) | ChildContext, maybeChildNodeResolvable: MaybeResolvableNode<ChildContext> ): Context<ParentContext, ChildContext> { if (process.env.NODE_ENV !== 'production') { if (maybeChildContextResolvable === undefined) { console.warn( `The first argument to createContext() should be the child context, but it was undefined. If you want to define an empty context, instead pass null.`, ) } } let childNodeResolvable: Resolvable<NaviNode> = maybeChildNodeResolvable.isNode ? (() => maybeChildNodeResolvable) : (maybeChildNodeResolvable as Resolvable<NaviNode>) let childContextResolvable: Resolvable<ChildContext> = (typeof maybeChildContextResolvable !== 'function') ? (() => maybeChildContextResolvable) : maybeChildContextResolvable return class extends ContextMatcher<ParentContext, ChildContext> { static childNodeResolvable = childNodeResolvable static childContextResolvable = childContextResolvable } }
// Down pauses the configured Vagrant boxes. func (o Distillery) Down() error { var wg sync.WaitGroup wg.Add(len(o.Recipes)) for _, recipe := range o.Recipes { go o.DownRecipe(recipe, &wg) } wg.Wait() return nil }
<filename>templates/react-ts-webpack-app-starter/src/todo-uifabric-context/components/TodoList.tsx import { useContext } from 'react'; import { Stack } from 'office-ui-fabric-react'; import { TodoListItem } from './TodoListItem'; import { TodoContext } from '../TodoContext'; import * as React from 'react'; export const TodoList = () => { const context = useContext(TodoContext); const { filter, todos } = context; const filteredTodos = Object.keys(todos).filter(id => { return ( filter === 'all' || (filter === 'completed' && todos[id].completed) || (filter === 'active' && !todos[id].completed) ); }); return ( <Stack gap={10}> {filteredTodos.map(id => ( <TodoListItem key={id} id={id} /> ))} </Stack> ); };
/** * This method convert "string_util" to "stringUtil" * @param targetString targetString * @param posChar posChar * @return String result */ public static String convertToCamelCase(String targetString, char posChar) { StringBuffer result = new StringBuffer(); boolean nextUpper = false; String allLower = targetString.toLowerCase(); for (int i = 0; i < allLower.length(); i++) { char currentChar = allLower.charAt(i); if (currentChar == posChar) { nextUpper = true; } else { if (nextUpper) { currentChar = Character.toUpperCase(currentChar); nextUpper = false; } result.append(currentChar); } } return result.toString(); }
/*========================================================================= Program: Visualization Toolkit Module: vtkClientSocket.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ // .NAME vtkClientSocket - Encapsulates a client socket. #ifndef vtkClientSocket_h #define vtkClientSocket_h #include "vtkCommonSystemModule.h" // For export macro #include "vtkSocket.h" class vtkServerSocket; class VTKCOMMONSYSTEM_EXPORT vtkClientSocket : public vtkSocket { public: static vtkClientSocket* New(); vtkTypeMacro(vtkClientSocket, vtkSocket); void PrintSelf(ostream& os, vtkIndent indent); // Description: // Connects to host. Returns 0 on success, -1 on error. int ConnectToServer(const char* hostname, int port); // Description: // Returns if the socket is on the connecting side (the side that requests a // ConnectToServer() or on the connected side (the side that was waiting for // the client to connect). This is used to disambiguate the two ends of a socket // connection. vtkGetMacro(ConnectingSide, bool); //BTX protected: vtkClientSocket(); ~vtkClientSocket(); vtkSetMacro(ConnectingSide, bool); bool ConnectingSide; friend class vtkServerSocket; private: vtkClientSocket(const vtkClientSocket&); // Not implemented. void operator=(const vtkClientSocket&); // Not implemented. //ETX }; #endif
/** * Check if services are connected * * @param services list of services * @return true if all services of the list are connected */ public boolean isServiceConnected(RcsServiceName... services) { for (RcsServiceName service : services) { if (!mManagedServices.contains(service)) { throw new IllegalArgumentException("Service " + service + " does not belong to set of managed services!"); } if (!mConnectedServices.contains(service)) { return false; } } return true; }
package com.eszop.ordersservice.test.orders; import com.eszop.ordersservice.orders.domain.usecase.dto.OrderDto; public class OrderDtoBuilder { private Long buyerId = 1L; private Long offerId = 1L; private Long tierId = 1L; private String description = "description"; public OrderDtoBuilder setBuyerId(Long buyerId) { this.buyerId = buyerId; return this; } public OrderDtoBuilder setOfferId(Long offerId) { this.offerId = offerId; return this; } public OrderDtoBuilder setTierId(Long tierId) { this.tierId = tierId; return this; } public OrderDtoBuilder setDescription(String description) { this.description = description; return this; } public OrderDto build() { return new OrderDto(buyerId, offerId, tierId, description); } }
(A–B) Hematoxylin and eosin (H/E)-stained fat tissues (arrows show multiloculated adipocytes), and (C) UCP1 positivity in iWAT from RD-fed male mice on Ad-lib or ITAD feeding for 4mo (n=3). (D) qPCR for brown and beige genes, (E) adipocyte/myogenic progenitor genes in stromal vascular fractions (SVF), and (F) mitochondrial genes from male (n=4) and female (n=4) mice (total n=8), (G–H) OCR and AUC (area under curve) in iWAT and/or eWAT (n=3) from RD-fed male mice on Ad-lib or ITAD for 12mo. (I) Experimental plan, and qPCR of brown and beige genes in iWAT from RD-fed male mice on Ad-lib or ITAD for 12mo and then exposed to 4°C for 1 hr (n=3). (J) Immune markers in iWAT and eWAT from RD-fed male (n=4) and female mice (n=4) on Ad-lib or ITAD for 12mo (total n=8). (K) H/E stains and quantification for myocyte area, and (L) distribution of myocytes by area (pixel2), and (M) percentage of myofibers with centralized nuclei in GA from RD-fed male mice on Ad-lib or ITAD for 10mo (n=4). Arrows in 3K indicate centralized nuclei. (N) Myogenic genes (n=10), and (O) cell cycle genes in GA from RD-fed male mice on Ad-lib or ITAD for 6mo (n=8). (P, Q) Immunofluorescence (IF) of type IIB, and type I fibers in GA from RD-fed male mice on Ad-lib or ITAD for 10mo (n=4). Bars are mean ± SEM. (*P<0.05, **P<0.01, ***P<0.001), Student’s t test or Two-Factor ANOVA and Bonferroni correction. Scale: 50μm. See also .
n = int(input()) hlp = [] for i in range(1, int(n ** 0.5) + 1): if (n - i * i) % 2 == 0: hlll = (n - i * i) // (i * 2) + ((n - i * i) % (i * 2) != 0) hlp.append((i + hlll, i)) hlp.sort() if len(hlp) == 0: print(-1) else: st = hlp[0][1] + (n - hlp[0][1]**2) // (hlp[0][1] * 2) print(hlp[0][0]) res = [['.'] * hlp[0][0] for i in range(hlp[0][0])] for i in range(st): for j in range(hlp[0][1]): res[hlp[0][0] - j - 1][0 + i] = 'o' for i in range(hlp[0][1]): for j in range(st): res[hlp[0][0] - j - 1][0 + i] = 'o' for i in range(hlp[0][0] - hlp[0][1]): res[0 + i][hlp[0][0] - i - 1] = '.' for k in range(((n - hlp[0][1]**2) % (hlp[0][1] * 2)) // 2): res[hlp[0][0] - st - 1][k] = 'o' res[hlp[0][0] - k - 1][hlp[0][0] - 1] = 'o' for i in res: print(*i, sep='')
<filename>src/routing/rectilinear/nudging/PathMerger.ts /// Avoid a situation where two paths cross each other more than once. Remove self loops. /// import {from, IEnumerable} from 'linq-to-typescript' import {Point} from '../../../math/geometry/point' // import {Assert} from '../../../utils/assert' import {PointMap} from '../../../utils/PointMap' import {LinkedPoint} from './LinkedPoint' import {Path} from './Path' export class PathMerger { constructor(paths: Iterable<Path>) { this.Paths = paths } Paths: Iterable<Path> verticesToPathOffsets = new PointMap<Map<Path, LinkedPoint>>() /// Avoid a situation where two paths cross each other more than once. Remove self loops. MergePaths() { this.InitVerticesToPathOffsetsAndRemoveSelfCycles() for (const path of this.Paths) { this.ProcessPath(path) } } ProcessPath(path: Path) { const departedPaths = new Map<Path, LinkedPoint>() let prevLocationPathOffsets: Map<Path, LinkedPoint> = null for ( let linkedPoint = <LinkedPoint>(<unknown>path.PathPoints); linkedPoint != null; linkedPoint = linkedPoint.Next ) { const pathOffsets = this.verticesToPathOffsets.get(linkedPoint.Point) if (prevLocationPathOffsets != null) { // handle returning paths if (departedPaths.size > 0) { for (const [path0, v] of pathOffsets) { const departerLinkedPoint = departedPaths.get(path0) if (departerLinkedPoint) { // returned! this.CollapseLoopingPath( path0, departerLinkedPoint, v, path, linkedPoint, ) departedPaths.delete(path0) } } } // find departed paths for (const [k, v] of prevLocationPathOffsets) { if (!pathOffsets.has(k)) departedPaths.set(k, v) } } prevLocationPathOffsets = pathOffsets } } // bool Correct() { // foreach (var kv of verticesToPathOffsets) { // Point p = kv.Key; // Map<Path, LinkedPoint> pathOffs = kv.Value; // foreach (var pathOff of pathOffs) { // var path = pathOff.Key; // var linkedPoint = pathOff.Value; // if (linkedPoint.Point != p) // return false; // if (FindLinkedPointInPath(path, p) == null) { // return false; // } // } // } // return true; // } CollapseLoopingPath( loopingPath: Path, departureFromLooping: LinkedPoint, arrivalToLooping: LinkedPoint, stemPath: Path, arrivalToStem: LinkedPoint, ) { const departurePointOnStem = PathMerger.FindLinkedPointInPath( stemPath, departureFromLooping.Point, ) const pointsToInsert = from( PathMerger.GetPointsInBetween(departurePointOnStem, arrivalToStem), ) if (PathMerger.Before(departureFromLooping, arrivalToLooping)) { this.CleanDisappearedPiece( departureFromLooping, arrivalToLooping, loopingPath, ) this.ReplacePiece( departureFromLooping, arrivalToLooping, pointsToInsert, loopingPath, ) } else { this.CleanDisappearedPiece( arrivalToLooping, departureFromLooping, loopingPath, ) this.ReplacePiece( arrivalToLooping, departureFromLooping, pointsToInsert.reverse(), loopingPath, ) } } static *GetPointsInBetween( a: LinkedPoint, b: LinkedPoint, ): IterableIterator<Point> { for (let i = a.Next; i != b; i = i.Next) { yield i.Point } } ReplacePiece( a: LinkedPoint, b: LinkedPoint, points: IEnumerable<Point>, loopingPath: Path, ) { let prevPoint = a for (const point of points) { const lp = new LinkedPoint(point) prevPoint.Next = lp prevPoint = lp const pathOffset = this.verticesToPathOffsets.get(point) /*Assert.assert(!pathOffset.has(loopingPath))*/ pathOffset.set(loopingPath, prevPoint) } prevPoint.Next = b } CleanDisappearedPiece(a: LinkedPoint, b: LinkedPoint, loopingPath: Path) { for (const point of PathMerger.GetPointsInBetween(a, b)) { const pathOffset = this.verticesToPathOffsets.get(point) /*Assert.assert(pathOffset.has(loopingPath))*/ pathOffset.delete(loopingPath) } } /// checks that a is before b of the path /// <param name="a"></param> /// <param name="b"></param> /// <returns>true is a is before b of the path</returns> static Before(a: LinkedPoint, b: LinkedPoint): boolean { for (a = a.Next; a != null; a = a.Next) { if (a == b) { return true } } return false } static FindLinkedPointInPath(path: Path, point: Point): LinkedPoint { // this function is supposed to always succeed. it will throw a null reference exception otherwise for ( let linkedPoint = <LinkedPoint>(<unknown>path.PathPoints); ; linkedPoint = linkedPoint.Next ) { if (linkedPoint.Point.equal(point)) { return linkedPoint } } } InitVerticesToPathOffsetsAndRemoveSelfCycles() { for (const path of this.Paths) { for ( let linkedPoint = <LinkedPoint>path.PathPoints; linkedPoint != null; linkedPoint = linkedPoint.Next ) { let pathOffsets: Map<Path, LinkedPoint> = this.verticesToPathOffsets.get(linkedPoint.Point) if (!pathOffsets) { this.verticesToPathOffsets.set( linkedPoint.Point, (pathOffsets = new Map<Path, LinkedPoint>()), ) } // check for the loop const loopPoint: LinkedPoint = pathOffsets.get(path) if (loopPoint) { // we have a loop this.CleanDisappearedPiece(loopPoint, linkedPoint, path) loopPoint.Next = linkedPoint.Next } else { pathOffsets.set(path, linkedPoint) } } } } }
Elizabeth Warren (via Instagram) There have been two salient reactions to the news that Elizabeth Warren is trying to reintroduce Wall Street's nightmare legislation, Glass-Steagall. One is a big populist high-five, the other is complete and total indifference. The first is Washington's reaction, the second is Wall Street's reaction. Together they perfectly highlight the ultimate difference between how bankers and politicians conduct their affairs. Of course, there's the regular noise on this topic too — the normal drone of journalists and lobbyists telling and re-telling the story of a bill that Wall Street killed in 1999, and why separating commercial and investment banks is good or bad. That's just par for the course. What they know, what everyone knows is that Warren's legislation isn't likely to go far. For Wall Street's part, bankers don't get why politicians would even introduce legislation like this. If it has no legs, what's the point? Wall Street is a results driven place. A trader would never set something up knowing it's not going anywhere or just to see how it goes. It makes very little sense to them. But that's okay. Wall Street doesn't play Washington's game, so Elizabeth Warren's move may seem futile, but it isn't. Washington is about the process. It's about the conversation as much as it is about the result. Elizabeth Warren was elected to the Senate to ensure that the issue of bank regulation stays at the forefront of national politics, no matter what. It doesn't matter if the Chicago White Sox win the World Series or we put a man on Mars, Warren is going to want to talk about bank regulation. That's why she tacked bank lending rates to student loan rates argument earlier this year. That may have made no sense to people looking for results — the ones that were actually trying to solve the problem — but that wasn't the point. The point was, and still is, keeping banks, what they do and how they do it, on the tip of the national tongue. That's what politicians do, they talk their issues. So maybe Glass-Steagall won't pass. Doesn't matter. Warren's doing her job, sparking a conversation and seeing if the interest is out there. Reactions from readers on our end, at the very least, say that it is — check out Reddit/Twitter etc. if you want. People still care about this stuff. Additionally, if people show they care, if a big enough stink is made, the conversation may turn to another reform for Wall Street. It may not be Glass-Steagall, but it might be something lighter. That can't happen if there's no conversation, and this political theater is a conversation starter. The questions is how long it can keep going.
/* ======================================================================== Routine Description: Allocate dma-consistent buffer. Arguments: dev - the USB device size - buffer size dma - used to return DMA address of buffer Return Value: a buffer that may be used to perform DMA to the specified device Note: ======================================================================== */ void *rausb_buffer_alloc(VOID *dev, size_t size, ra_dma_addr_t *dma) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) dma_addr_t DmaAddr = (dma_addr_t)(*dma); void *buf; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) buf = usb_alloc_coherent(dev, size, GFP_ATOMIC, &DmaAddr); #else buf = usb_buffer_alloc(dev, size, GFP_ATOMIC, &DmaAddr); #endif *dma = (ra_dma_addr_t)DmaAddr; return buf; #else return kmalloc(size, GFP_ATOMIC); #endif }
def after_move(self: Board, player: int, player_house: int) -> Board: next_state: Board = Board(self) starting_house: int = (player * 6) + player_house seeds: int = next_state.houses[starting_house] next_state.houses[starting_house] = 0 house_stack: List[int] = [] for house in _counterclockwise(starting_house, seeds): next_state.houses[house] += 1 house_stack.append(house) if not house_stack: return next_state houses_before_capture: List[int] = list(next_state.houses) captured_before_capture: List[int] = list(next_state.captured) for house in reversed(house_stack): if house not in OWNED[not player]: break if next_state.houses[house] not in (2, 3): break next_state.captured[player] += next_state.houses[house] next_state.houses[house] = 0 if not next_state.player_has_seeds(not player): next_state.houses = houses_before_capture next_state.captured = captured_before_capture if next_state.captured[player] >= 25: next_state.winners = [player] return next_state
<filename>src/lib/util/rowing.ts import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from "./constant/keycode"; import { stopEvent } from "./event"; export interface IRowing<T = unknown> { queryGroup (): T[]; rowToElement: ((elem: T) => void); } /** * Rows to an element. * @param element * @param e */ export function row<T> (element: T & IRowing<T>, e: KeyboardEvent) { const group = element.queryGroup(); const currentIndex = group.indexOf(element); const newIndex = nextIndex(group, currentIndex, e.code); // Focus on the new radio if necessary if (newIndex != null) { const newCheckedRadio = group[newIndex]; element.rowToElement(newCheckedRadio); stopEvent(e); } } /** * Returns the next index based on the key code. * @param group * @param currentIndex * @param keyCode */ export function nextIndex<T> (group: T[], currentIndex: number, keyCode: string): number | null { // If there are no elements in the group we abort. if (group.length == 0) { return null; } switch (keyCode) { // Next case ARROW_RIGHT: case ARROW_DOWN: return currentIndex + 1 > group.length - 1 ? 0 : currentIndex + 1; // Previous case ARROW_LEFT: case ARROW_UP: return currentIndex - 1 < 0 ? group.length - 1 : currentIndex - 1; } return null; }
import unicodedata import re import urllib _slugify_strip_re = re.compile(r'[^\w\s-]') _slugify_hyphenate_re = re.compile(r'[-\s]+') def slugify(value): slug = unicode(_slugify_strip_re.sub('', normalize(value)).strip().lower()) slug = _slugify_hyphenate_re.sub('-', slug) if not slug: return quote(value) return quote(slug) def normalize(name): if not isinstance(name, unicode): name = name.decode('utf8') return unicodedata.normalize('NFKC', name).encode('utf8') def quote(name): return urllib.quote(normalize(name)) def make_icon_url(region, icon, size='large'): if size == 'small': size = 18 else: size = 56 return 'http://%s.media.blizzard.com/wow/icons/%d/%s.jpg' % (region, size, icon) def make_connection(): if not hasattr(make_connection, 'Connection'): from .connection import Connection make_connection.Connection = Connection return make_connection.Connection()
INTEGRATION OF MOBILE GIS AND LINKED DATA TECHNOLOGY FOR SPATIO-TEMPORAL TRANSPORT DATA MODEL Linked Data is available data on the web in a standard format that is useful for content inspection and insights deriving from data through semantic queries. Querying and Exploring spatial and temporal features of various data sources will be facilitated by using Linked Data. In this paper, an application is presented for linking transport data on the web. Data from Google Maps API and OpenStreetMap linked and published on the web. Spatio-Temporal queries were executed over linked transport data and resulted in network and traffic information in accordance with the user’s position. The client-side of this application contains a web and a mobile application which presents a user interface to access network and traffic information according to the user’s position. The results of the experiment show that by using the intrinsic potential of Linked Data we have tackled the challenges of using heterogeneous data sources and have provided desirable information that could be used for discovering new patterns. The mobile GIS application enables assessing the profits of mentioned technologies through an easy and userfriendly way. * Corresponding author INTRODUCTION Transportation data is attractive and vital data in urban management challenges. It is collected via various data providers and it contains different features such as volume of traffic, hour of the day, vehicle class, etc. Semantic web (Berners-Lee et al. 2001) presents a prospect for Content inspection and deriving insights from data. By interlinking transportation datasets, we can recognize new factors in road traffic accidents and congestion that were unseen before (Heath and Bizer 2011). Linked Data is a machinereadable data on the Web, defined accurately and interlinked with other data sources efficiently. Linking properties and interlinking transportation information from various resources make it efficient to visualize and analyze linked transport data. This research benefits from Linked Data technology to enable multisource data fusion and visualization. Accordingly, we can introduce variations into the dataset that result in developing new transport applications which will be provided from other interlinked datasets. In a real-life case study of urban environments, a new approach is proposed by (Fotopoulou et al. 2015) to use Linked Data Analytics. Based on the ability to exploit, manage and process Linked Data, their approach is used to examine the health impact of outdoor air pollution in urban areas. Their principles of design and implementation offer a good solution for raising the standard of living in smart city environments by taking into account the diversity of heterogonous data sources. For Linked Geospatial Data (LGD), a multidimensional and quantitative interlinking approach was proposed. (Zhu et al. 2017) The data interlinking types are defined in the approach based on geospatial data features and their roles in data exploration, including two aspects (inherent and morphological characteristic links) and three levels (elementary, compound, and overall characteristic links). Information such as travel time and real traffic time is made available by navigation services through provided application program interfaces (APIs) (Kolyvakis et al. 2018). Data provided by navigation services have characteristics like lower price and easy to acquire overcome traditional data gathered through cameras and sensors. SEMANTIC WEB Semantic Web is a web extension standardized by the World Wide Web Consortium (W3C). These standards provide data formats for data sharing and define information sharing protocols. In addition to supporting web-based documentation, W3C has put forward this plan in order to build technology that supports "web data", meaning exactly the kind of data that is stored in databases. The ultimate goal of Web Data is to enable computing machines to perform Web transactions more reliably and efficiently. The Semantic Web is a perspective on web of data, which is interconnected and stored in related structures. The Semantic Web enables users and ordinary people to create web caches of data, define vocabulary to understand them, write rules of use to manage them. This structured relational data is used in formats such as Resource Description Framework (RDF), Web Ontology Language (OWL). In general, it can be said that the Semantic Web consists of two parts. First, collecting common templates to combine and integrate data from different sources, while focusing more on the main web focusing on document exchanges. Also keeping track of how much data is connected to each other and how the data relates to real-world objects is a semantic web topic. This allows a person or processor to start from a database and then move to a set of databases. If the goals pursued by the Semantic Web are to be achieved, it is very desirable for users, But in a general judgment, it can be argued that the pace of semantic web development has been slower than expected because the complexities of its underlying model require a great deal of effort so that an application can hide these complexities from users' eyes. One of the benefits of using Semantic Web in accordance with classic Web is to offer mutual format for data processing. The geospatial information management accompanying with Semantic Web is known as the Spatio-Semantic Web. To serialize geospatial data, the most popular standards are Wellknown text (WKT), Geography Markup Language (GML), Keyhole Markup Language (KML), and so on, and the standards used in GeoSPARQL are WKT and GML. GeoSPARQL's default coordinate reference system is CRS:84, necessarily it could be altered in the query. On the Semantic Web, vocabulary defines the ideas and interactions used to explain and describe an area of interest (also referred to as "terms"). Vocabularies are used to classify terms that can be used in a specific implementation, to characterize possible interactions, and to identify possible restrictions on the use of those terms. Practically, vocabularies can be very complicated (with several thousand terms) or very straightforward (with just one or two ideas being described). There is also no clear distinction from what is called "vocabulary" and "ontology." It is common to use the term "ontology" to gather words more complicated and potentially somewhat formal, while "vocabulary" can be used when such rigid formalism is not generally used. Linked Data Linked Data relates to connections between information sources and the practice of linking web-based data. Unlike classic Web isolated information silos, the Web seeks to interconnect this information so that all datasets contribute to worldwide information integration, linking information from various domains and sources. (Sakr et al. 2018). A semantic query language is required to enable querying and manipulating Linked Data on the Web. Such a language has been implemented by the World Wide Web Consortium, called SPARQL Protocol and RDF Query Language. RDF is generally a directly marked information format of the graph. Therefore, SPARQL is primarily a query language that matches the graphs. SPARQL could be used to formulate queries that range from simple graph patterns to very complicated analytical queries. (Sakr et al. 2018). Geospatial Information The volume of geospatial data on the Web has multiplied over the past few years. This is due to the fact that geospatial data come from different domains (e.g. earth researchers, surveyors, civil engineers) engaged in the production of geospatial data also publish them as RDFs to increase their value by integrating them with other datasets. (Bereta et al. 2016). Although much effort has been made to represent and query geospatial RDF information, there are not many publications in the corresponding linked data exploration. Within the scope of Spatial Linked Exploration, cutting edge methods focus on discovering only spatial equivalences among entities, abandoning other types of relationships, topological relationships, unknown and rich geospatial information stored in many datasets unfound. (Smeros and Koubarakis 2016). Consequently, Semantic Web community became involved in offering data models, query languages and applications to display, model and visualize linked geospatial data (Koubarakis et al. 2012). The development of the Open Geospatial Consortium (OGC) standard GeoSPARQL(Perry and Herring 2012), a geospatial extension of RDF and SPARQL, has reinforced these attempts. The GeoSPARQL is a standard Geographic Query Language from Open Geospatial Consortium (OGC) for retrieving and manipulating the geospatial data stored in the ontology. It provides the ability to query and reason about the spatial properties (such as topological binary relationships) and non-spatial properties of the entities in the ontology. Also, it enables to perform the spatial processing functions such as distance, buffer, etc. In Figure 1 spatial relations of two features illustrated. They could be used in the GeoSPARQL filter functions for geospatial analysis. One of the basic concepts for spatial data analysis is the formal understanding of geometric relationships between spatial features. Topological relationships are specific subsets of geometric relationships that do not change under topological transformations. Queries in spatial databases are often based on relationships between spatial sequences, so spatial relevance of the sequences needs to be considered in order for the user to obtain the desired response. In such situations, where the geometrical relationships are usually complex between complexities, spatial topology relationships are used instead of multiple simple spatial queries and their results compared. These relationships combine the results of simple spatial queries and return the optimal answer by filtering on them. PROPOSED METHOD In this paper, the sample data is collected from Google maps API in a CSV data structure and time length of three weeks as input for Linked Data visualization and exploration. We also The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLII-4/W18, 2019 GeoSpatial Conference 2019 -Joint Conferences of SMPR and GI Research, 12-14 October 2019, Karaj, Iran made use of Sophox service, which meets our needs in formulating and executing simultaneous queries over both OpenStreetMap and Wikidata to retrieve transportation network information from OpenStreetMap.To define an appropriate ontology for sample data based on the vocabulary specification for each column, the open source software OpenRefine and its RDF extension makes ontology modeling and conceptualization available. To record the date and travel time between two specific location Time: hasduration and time: inXSDDateTime vocabulary is used. Moreover Geo:asWKT Vocabulary used for POINT and LINESTRING Geometry. Parliament server as a high-performance triplestore is used to enable executing geospatial queries regarding GeoSparql Standards. In this paper, we present a web and mobile application that enables the visualization and exploration of linked transport data. It enables retrieval of public transport data such as travel time between two nodes, traffic index and vertex information in the user's current position or selected position on the map by executing GeoSPARQL queries on SPARQL endpoints. Apache Cordova as a cross-platform technology was used for building the Android application. Firstly, user's vertex would be distinguished by determining a sufficient buffer radius from user's current or selected location through use of GeoSPARQL capabilities depicted in Figure 2. After executing this query, way with the lowest distance from the input position has retrieved to present transportation data such as travel time collected from Google Map API, name, type of route, max speed and whether it is one way or not provided by OpenStreetMap and illustrated in Figure 3. CONCLUSIONS Semantic Web and Linked Data technologies are among the key enabling technologies to tackle the challenges of making use of heterogeneous data sources. In this paper, we presented an approach and documented the implementation of a Semantic Web application, using a web and mobile programming and leveraging heterogeneous data sources that follow semantic Web standards. Spatio-temporal queries executed over linked transport data and resulted in traffic information in accordance with user's position. The application enables assessing the profits of mentioned technologies through an easy and user friendly technique. In our future work we will apply potential of these technologies over other individual transportation data.
def chunk_taste(self, length, dtypes) -> None: try: elem = next(self) except StopIteration: self.shape = Shape({DEFAUL_GROUP_NAME: (0, )}) self.dtypes = np.dtype([(DEFAUL_GROUP_NAME, None)]) self.dtype = None else: self.type_elem = type(elem) if not isinstance(elem, numbers.Number) else numbers.Number self.dtypes = self._define_dtypes(elem, dtypes) self.shape = self._define_shape(elem, length) self.dtype = max_dtype(self.dtypes) self.pushback(elem)
/** * Check to see if we should show the rationale for any of the permissions. If so, then display a dialog that * explains what permissions we need for this app to work properly. * <p> * If we should not show the rationale, then just request the permissions. */ private void showPermissionRationaleAndRequestPermissions() { if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION) || ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) || ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_PHONE_STATE)) { AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this); alertBuilder.setCancelable(true); alertBuilder.setTitle(getString(R.string.permissions_rationale_title)); alertBuilder.setMessage(getText(R.string.permissions_rationale)); alertBuilder.setPositiveButton(android.R.string.yes, (dialog, which) -> requestPermissions()); AlertDialog permissionsExplanationDialog = alertBuilder.create(); permissionsExplanationDialog.show(); } else { requestPermissions(); } }
The LGBT issue is real, and people still find it hard to accept. A movie like Moonlight tries to bring it in the vanguard. In a neighborhood that roughhouses the quiet and the mute, where being gay is unacceptable to people, thrives the story of a little boy with hopeful eyes. He is yet to understand and wrap his head around his sexuality, but the people he breathes alongside have stones in their hands. He has to make his way through that dreary path, figure himself out at the same time deal with an invariably cooked mother who is no good for a poor child. Theme and Interpretation of Moonlight The Moonlight movie started out with a project called “In Moonlight Black Boys Look Blue”. Whilst the play couldn’t reach fruition, it certainly made it out big at the end of the day, and came out in the open as something that the world will never forget. I love how the term moonlight acts as a polysemy per se. While the best one comes straight from the play, of how black still holds as a slander in people’s minds, it is hard to fathom why something as insignificant as the color of one’s skin still gets to be the judge of a person? Like moonlight is white. The juxtaposition of black with white ends up making the black blue (here sad), because the white is dominating. It tries to paint people in its own color. The whites revere its tinge and consider it a privilege to be under their skin. This behavioral pattern is evident in their snobby patronizing acts. Of course, the movie doesn’t paint that black and white picture here, it’s title alone still remains powerful enough to make you think otherwise. While coming to the real theme of the flick, Moonlight still justifies. We get to see three phases of our protagonist’s life, each suggestive of how moonlight shines and wanes with each phase. It stays dormant for a while before showing up once again bright and shiny. There are the ugly phases, the dark ones that are abounding in the flick introducing us to the character’s rough past. It includes the rough neighborhood he is brought up in, his addicted abusive mother and the constant bullying kids. There are those hopeful blotches of him too trying to find himself, his true identity, his accidental acquaintance with himself which cannot be lauded enough. After which he eventually shines out a man. Direction of Moonlight Whilst I never came across Barry Jenkins before, I was amazed to discover the poignancy in his frames. They are really really profound. He is quiet with his frames, lets your thoughts sieve in, a perfect helmer of drama. He boldly goes for different angles and gradually crawls it towards the protagonist. The end result is absolutely brilliant. He slowly zooms in and zooms out for emphasis, until he puts his character under his lens. To find action he walks alongside it, with the right profundity. Even though he was there all along, the movie couldn’t have done without Nicholas Britell‘s extraordinary composition. He helps in delivering you to the right vibes. Whenever the music comes it squeezes out of you emotions that you have been holding on to for the right moment. It’s really deep. You can buy Moonlight movie from here: If we take a look at the outstanding actors who play the part of the protagonists in the movie, you will be surprised to find out how each one of them copies each other to perfection. Ranging from Alex R. Hibbert‘s unfazed acting as Little, to Ashton Sanders‘ Chiron, to eventually nailing it with Trevante Rhodes as Black for the better part of the flick. Each one of them was equally riveting. We can’t certainly overlook Mahershala Ali, Naomie Harris and Andre Holland‘s performance either. They all happened to the protagonist like moonlight itself. In phases, shining out for him, on him with erratic blotches of light. The Final Verdict The drama is intense. Scenes created are brimming with impactful performances. While it is strictly a drama flick, and might not interest those who are not fans of drama, it certainly should be able to tingle you for the issue it skims. I highly recommend you watch it even if drama is not your forte. Check out the trailer of Moonlight movie here: Moonlight 8.3 Direction 8.5/10 Plot 8.0/10 Editing 8.4/10 Screenplay 8.2/10 Drama 8.6/10 Pros Ravishing Drama Brilliant Direction Extraordinary acting by the cast Bringing LGBT in the front Great Plot Cons Not for those who don't like Drama Not for Homophobes Related
// ListConnectBoard return list connect board for current board func (ds GitLabDataSource) ListConnectBoard(boardID string) ([]*models.Board, int, error) { b := []*models.Board{} boards, err := ds.db.LRange(fmt.Sprintf("boards:%s:connect", boardID), 0, 100).Result() if err != nil { return nil, 0, err } for _, board := range boards { item, _ := ds.ItemBoard(board) b = append(b, item) } return b, 0, nil }
import { isMarkType, MarkType } from './components'; import type { NormalizedTextSpan } from 'pote-parse'; // fixme: only takes first export function guessSpanType(span: NormalizedTextSpan): MarkType | undefined { return span.marks .map((e) => e.type) .filter(isMarkType) .pop(); } export function getFirstMark(span: NormalizedTextSpan): string | undefined { return span.marks[0]?.type; }
/** * Play or resume the Sound. * * # Example * ```Rust * let snd = Sound::new("path/to/the/sound.ogg").unwrap(); * snd.play(); * ``` */ fn play(&mut self) -> () { check_openal_context!(()); al::alSourcePlay(self.al_source); match al::openal_has_error() { None => {}, Some(err) => println!("{}", err) } }
<gh_stars>0 /* Copyright JS Foundation and other contributors, http://js.foundation * * 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. */ #include <math.h> #include "ecma-alloc.h" #include "ecma-builtin-helpers.h" #include "ecma-exceptions.h" #include "ecma-function-object.h" #include "ecma-gc.h" #include "ecma-globals.h" #include "ecma-helpers.h" #include "ecma-objects.h" #include "ecma-objects-general.h" #include "ecma-try-catch-macro.h" #if ENABLED (JERRY_BUILTIN_DATE) #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" /** * This object has a custom dispatch function. */ #define BUILTIN_CUSTOM_DISPATCH /** * Checks whether the function uses UTC time zone. */ #define BUILTIN_DATE_FUNCTION_IS_UTC(builtin_routine_id) \ (((builtin_routine_id) - ECMA_DATE_PROTOTYPE_GET_FULL_YEAR) & 0x1) /** * List of built-in routine identifiers. */ enum { ECMA_DATE_PROTOTYPE_ROUTINE_START = ECMA_BUILTIN_ID__COUNT - 1, ECMA_DATE_PROTOTYPE_GET_FULL_YEAR, /* ECMA-262 v5 192.168.3.11 */ ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR, /* ECMA-262 v5 192.168.127.12 */ #if ENABLED (JERRY_BUILTIN_ANNEXB) ECMA_DATE_PROTOTYPE_GET_YEAR, /* ECMA-262 v5, AnnexB.B.2.4 */ ECMA_DATE_PROTOTYPE_GET_UTC_YEAR, /* has no UTC variant */ #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ ECMA_DATE_PROTOTYPE_GET_MONTH, /* ECMA-262 v5 172.16.17.32 */ ECMA_DATE_PROTOTYPE_GET_UTC_MONTH, /* ECMA-262 v5 192.168.127.12 */ ECMA_DATE_PROTOTYPE_GET_DATE, /* ECMA-262 v5 172.16.58.3 */ ECMA_DATE_PROTOTYPE_GET_UTC_DATE, /* ECMA-262 v5 192.168.127.12 */ ECMA_DATE_PROTOTYPE_GET_DAY, /* ECMA-262 v5 172.16.58.3 */ ECMA_DATE_PROTOTYPE_GET_UTC_DAY, /* ECMA-262 v5 172.16.31.10 */ ECMA_DATE_PROTOTYPE_GET_HOURS, /* ECMA-262 v5 192.168.3.11 */ ECMA_DATE_PROTOTYPE_GET_UTC_HOURS, /* ECMA-262 v5 172.16.31.10 */ ECMA_DATE_PROTOTYPE_GET_MINUTES, /* ECMA-262 v5 192.168.127.12 */ ECMA_DATE_PROTOTYPE_GET_UTC_MINUTES, /* ECMA-262 v5 172.16.31.10 */ ECMA_DATE_PROTOTYPE_GET_SECONDS, /* ECMA-262 v5 192.168.127.12 */ ECMA_DATE_PROTOTYPE_GET_UTC_SECONDS, /* ECMA-262 v5 172.16.31.10 */ ECMA_DATE_PROTOTYPE_GET_MILLISECONDS, /* ECMA-262 v5 192.168.3.11 */ ECMA_DATE_PROTOTYPE_GET_UTC_MILLISECONDS, /* ECMA-262 v5 172.16.58.3 */ ECMA_DATE_PROTOTYPE_GET_TIMEZONE_OFFSET, /* has no local time zone variant */ ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET, /* ECMA-262 v5 192.168.127.12 */ ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, /* ECMA-262 v5, 192.168.127.12 */ ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, /* ECMA-262 v5, 172.16.17.32 */ #if ENABLED (JERRY_BUILTIN_ANNEXB) ECMA_DATE_PROTOTYPE_SET_YEAR, /* ECMA-262 v5, ECMA-262 v5, AnnexB.B.2.5 */ ECMA_DATE_PROTOTYPE_SET_UTC_YEAR, /* has no UTC variant */ #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ ECMA_DATE_PROTOTYPE_SET_MONTH, /* ECMA-262 v5, 192.168.127.12 */ ECMA_DATE_PROTOTYPE_SET_UTC_MONTH, /* ECMA-262 v5, 172.16.17.32 */ ECMA_DATE_PROTOTYPE_SET_DATE, /* ECMA-262 v5, 192.168.3.11 */ ECMA_DATE_PROTOTYPE_SET_UTC_DATE, /* ECMA-262 v5, 192.168.127.12 */ ECMA_DATE_PROTOTYPE_SET_HOURS, /* ECMA-262 v5, 172.16.17.32 */ ECMA_DATE_PROTOTYPE_SET_UTC_HOURS, /* ECMA-262 v5, 192.168.127.12 */ ECMA_DATE_PROTOTYPE_SET_MINUTES, /* ECMA-262 v5, 192.168.3.11 */ ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES, /* ECMA-262 v5, 192.168.3.11 */ ECMA_DATE_PROTOTYPE_SET_SECONDS, /* ECMA-262 v5, 172.16.17.32 */ ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS, /* ECMA-262 v5, 172.16.58.3 */ ECMA_DATE_PROTOTYPE_SET_MILLISECONDS, /* ECMA-262 v5, 172.16.31.10 */ ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS, /* ECMA-262 v5, 172.16.31.10 */ ECMA_DATE_PROTOTYPE_TO_STRING, /* ECMA-262 v5, 172.16.58.3 */ ECMA_DATE_PROTOTYPE_TO_DATE_STRING, /* ECMA-262 v5, 192.168.127.12 */ ECMA_DATE_PROTOTYPE_TO_TIME_STRING, /* ECMA-262 v5, 192.168.3.11 */ ECMA_DATE_PROTOTYPE_TO_UTC_STRING, /* ECMA-262 v5, 172.16.58.3 */ ECMA_DATE_PROTOTYPE_TO_ISO_STRING, /* ECMA-262 v5, 172.16.31.10 */ ECMA_DATE_PROTOTYPE_GET_TIME, /* ECMA-262 v5, 192.168.127.12 */ ECMA_DATE_PROTOTYPE_SET_TIME, /* ECMA-262 v5, 172.16.17.32 */ ECMA_DATE_PROTOTYPE_TO_JSON, /* ECMA-262 v5, 172.16.31.10 */ #if ENABLED (JERRY_ESNEXT) ECMA_DATE_PROTOTYPE_TO_PRIMITIVE, /* ECMA-262 v6 192.168.127.12 */ #endif /* ENABLED (JERRY_ESNEXT) */ }; #define BUILTIN_INC_HEADER_NAME "ecma-builtin-date-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID date_prototype #include "ecma-builtin-internal-routines-template.inc.h" /** \addtogroup ecma ECMA * @{ * * \addtogroup ecmabuiltins * @{ * * \addtogroup dateprototype ECMA Date.prototype object built-in * @{ */ /** * The Date.prototype object's 'toJSON' routine * * See also: * ECMA-262 v5, 172.16.31.10 * * @return ecma value * Returned value must be freed with ecma_free_value. */ static ecma_value_t ecma_builtin_date_prototype_to_json (ecma_value_t this_arg) /**< this argument */ { /* 1. */ ecma_value_t obj = ecma_op_to_object (this_arg); if (ECMA_IS_VALUE_ERROR (obj)) { return obj; } /* 2. */ ecma_value_t tv = ecma_op_to_primitive (obj, ECMA_PREFERRED_TYPE_NUMBER); if (ECMA_IS_VALUE_ERROR (tv)) { ecma_free_value (obj); return tv; } /* 3. */ if (ecma_is_value_number (tv)) { ecma_number_t num_value = ecma_get_number_from_value (tv); ecma_free_value (tv); if (ecma_number_is_nan (num_value) || ecma_number_is_infinity (num_value)) { ecma_free_value (obj); return ECMA_VALUE_NULL; } } ecma_value_t ret_value = ECMA_VALUE_ERROR; ecma_object_t *value_obj_p = ecma_get_object_from_value (obj); /* 4. */ ecma_value_t to_iso = ecma_op_object_get_by_magic_id (value_obj_p, LIT_MAGIC_STRING_TO_ISO_STRING_UL); if (!ECMA_IS_VALUE_ERROR (to_iso)) { /* 5. */ if (!ecma_op_is_callable (to_iso)) { ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("'toISOString' is missing or not a function.")); } /* 6. */ else { ret_value = ecma_op_invoke_by_magic_id (obj, LIT_MAGIC_STRING_TO_ISO_STRING_UL, NULL, 0); } ecma_free_value (to_iso); } ecma_deref_object (value_obj_p); return ret_value; } /* ecma_builtin_date_prototype_to_json */ #if ENABLED (JERRY_ESNEXT) /** * The Date.prototype object's toPrimitive routine * * See also: * ECMA-262 v6, 20.3.4.45 * * @return ecma value * Returned value must be freed with ecma_free_value. */ static ecma_value_t ecma_builtin_date_prototype_to_primitive (ecma_value_t this_arg, /**< this argument */ ecma_value_t hint_arg) /**< {"default", "number", "string"} */ { if (ecma_is_value_object (this_arg) && ecma_is_value_string (hint_arg)) { ecma_string_t *hint_str_p = ecma_get_string_from_value (hint_arg); ecma_preferred_type_hint_t hint = ECMA_PREFERRED_TYPE_NO; if (hint_str_p == ecma_get_magic_string (LIT_MAGIC_STRING_STRING) || hint_str_p == ecma_get_magic_string (LIT_MAGIC_STRING_DEFAULT)) { hint = ECMA_PREFERRED_TYPE_STRING; } else if (hint_str_p == ecma_get_magic_string (LIT_MAGIC_STRING_NUMBER)) { hint = ECMA_PREFERRED_TYPE_NUMBER; } if (hint != ECMA_PREFERRED_TYPE_NO) { return ecma_op_general_object_ordinary_value (ecma_get_object_from_value (this_arg), hint); } } return ecma_raise_type_error (ECMA_ERR_MSG ("Invalid argument type in toPrimitive.")); } /* ecma_builtin_date_prototype_to_primitive */ #endif /* ENABLED (JERRY_ESNEXT) */ /** * Dispatch get date functions * * @return ecma value * Returned value must be freed with ecma_free_value. */ static ecma_value_t ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< built-in wide routine * identifier */ ecma_number_t date_num) /**< date converted to number */ { if (ecma_number_is_nan (date_num)) { return ecma_make_nan_value (); } switch (builtin_routine_id) { case ECMA_DATE_PROTOTYPE_GET_FULL_YEAR: case ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR: #if ENABLED (JERRY_BUILTIN_ANNEXB) case ECMA_DATE_PROTOTYPE_GET_YEAR: #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ { date_num = ecma_date_year_from_time (date_num); #if ENABLED (JERRY_BUILTIN_ANNEXB) if (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_YEAR) { date_num -= 1900; } #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ break; } case ECMA_DATE_PROTOTYPE_GET_MONTH: case ECMA_DATE_PROTOTYPE_GET_UTC_MONTH: { date_num = ecma_date_month_from_time (date_num); break; } case ECMA_DATE_PROTOTYPE_GET_DATE: case ECMA_DATE_PROTOTYPE_GET_UTC_DATE: { date_num = ecma_date_date_from_time (date_num); break; } case ECMA_DATE_PROTOTYPE_GET_DAY: case ECMA_DATE_PROTOTYPE_GET_UTC_DAY: { date_num = ecma_date_week_day (date_num); break; } case ECMA_DATE_PROTOTYPE_GET_HOURS: case ECMA_DATE_PROTOTYPE_GET_UTC_HOURS: { date_num = ecma_date_hour_from_time (date_num); break; } case ECMA_DATE_PROTOTYPE_GET_MINUTES: case ECMA_DATE_PROTOTYPE_GET_UTC_MINUTES: { date_num = ecma_date_min_from_time (date_num); break; } case ECMA_DATE_PROTOTYPE_GET_SECONDS: case ECMA_DATE_PROTOTYPE_GET_UTC_SECONDS: { date_num = ecma_date_sec_from_time (date_num); break; } case ECMA_DATE_PROTOTYPE_GET_MILLISECONDS: case ECMA_DATE_PROTOTYPE_GET_UTC_MILLISECONDS: { date_num = ecma_date_ms_from_time (date_num); break; } default: { JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET); date_num = ecma_date_timezone_offset (date_num); break; } } return ecma_make_number_value (date_num); } /* ecma_builtin_date_prototype_dispatch_get */ #if ENABLED (JERRY_BUILTIN_ANNEXB) /** * Returns true, if the built-in id sets a year. */ #define ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE(builtin_routine_id) \ ((builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_FULL_YEAR \ || (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR \ || (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_YEAR) #else /* !ENABLED (JERRY_BUILTIN_ANNEXB) */ /** * Returns true, if the built-in id sets a year. */ #define ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE(builtin_routine_id) \ ((builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_FULL_YEAR \ || (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR) #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ /** * Dispatch set date functions * * @return ecma value * Returned value must be freed with ecma_free_value. */ static ecma_value_t ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< built-in wide routine * identifier */ ecma_extended_object_t *ext_object_p, /**< date extended object */ ecma_number_t date_num, /**< date converted to number */ const ecma_value_t arguments_list[], /**< list of arguments * passed to routine */ ecma_length_t arguments_number) /**< length of arguments' list */ { ecma_number_t converted_number[4]; ecma_length_t conversions = 0; /* If the first argument is not specified, it is always converted to NaN. */ converted_number[0] = ecma_number_make_nan (); switch (builtin_routine_id) { #if ENABLED (JERRY_BUILTIN_ANNEXB) case ECMA_DATE_PROTOTYPE_SET_YEAR: #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ case ECMA_DATE_PROTOTYPE_SET_DATE: case ECMA_DATE_PROTOTYPE_SET_UTC_DATE: case ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS: case ECMA_DATE_PROTOTYPE_SET_MILLISECONDS: { conversions = 1; break; } case ECMA_DATE_PROTOTYPE_SET_MONTH: case ECMA_DATE_PROTOTYPE_SET_UTC_MONTH: case ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS: case ECMA_DATE_PROTOTYPE_SET_SECONDS: { conversions = 2; break; } case ECMA_DATE_PROTOTYPE_SET_FULL_YEAR: case ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR: case ECMA_DATE_PROTOTYPE_SET_MINUTES: case ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES: { conversions = 3; break; } default: { JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_HOURS || builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_UTC_HOURS); conversions = 4; break; } } if (conversions > arguments_number) { conversions = arguments_number; } for (ecma_length_t i = 0; i < conversions; i++) { ecma_value_t value = ecma_op_to_number (arguments_list[i]); if (ECMA_IS_VALUE_ERROR (value)) { return value; } converted_number[i] = ecma_get_number_from_value (value); ecma_free_value (value); } ecma_number_t day_part; ecma_number_t time_part; if (builtin_routine_id <= ECMA_DATE_PROTOTYPE_SET_UTC_DATE) { if (ecma_number_is_nan (date_num)) { if (ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE (builtin_routine_id)) { date_num = ECMA_NUMBER_ZERO; } else { return ecma_make_number_value (date_num); } } time_part = ecma_date_time_within_day (date_num); ecma_number_t year = ecma_date_year_from_time (date_num); ecma_number_t month = ecma_date_month_from_time (date_num); ecma_number_t day = ecma_date_date_from_time (date_num); switch (builtin_routine_id) { case ECMA_DATE_PROTOTYPE_SET_FULL_YEAR: case ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR: { year = converted_number[0]; if (conversions >= 2) { month = converted_number[1]; } if (conversions >= 3) { day = converted_number[2]; } break; } #if ENABLED (JERRY_BUILTIN_ANNEXB) case ECMA_DATE_PROTOTYPE_SET_YEAR: { year = converted_number[0]; if (year >= 0 && year <= 99) { year += 1900; } break; } #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ case ECMA_DATE_PROTOTYPE_SET_MONTH: case ECMA_DATE_PROTOTYPE_SET_UTC_MONTH: { month = converted_number[0]; if (conversions >= 2) { day = converted_number[1]; } break; } default: { JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_DATE || builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_UTC_DATE); day = converted_number[0]; break; } } day_part = ecma_date_make_day (year, month, day); #if ENABLED (JERRY_BUILTIN_ANNEXB) if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_YEAR) { builtin_routine_id = ECMA_DATE_PROTOTYPE_SET_UTC_YEAR; if (ecma_number_is_nan (converted_number[0])) { day_part = 0; time_part = converted_number[0]; } } #endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */ } else { if (ecma_number_is_nan (date_num)) { return ecma_make_number_value (date_num); } day_part = ecma_date_day (date_num); ecma_number_t hour = ecma_date_hour_from_time (date_num); ecma_number_t min = ecma_date_min_from_time (date_num); ecma_number_t sec = ecma_date_sec_from_time (date_num); ecma_number_t ms = ecma_date_ms_from_time (date_num); switch (builtin_routine_id) { case ECMA_DATE_PROTOTYPE_SET_HOURS: case ECMA_DATE_PROTOTYPE_SET_UTC_HOURS: { hour = converted_number[0]; if (conversions >= 2) { min = converted_number[1]; } if (conversions >= 3) { sec = converted_number[2]; } if (conversions >= 4) { ms = converted_number[3]; } break; } case ECMA_DATE_PROTOTYPE_SET_MINUTES: case ECMA_DATE_PROTOTYPE_SET_UTC_MINUTES: { min = converted_number[0]; if (conversions >= 2) { sec = converted_number[1]; } if (conversions >= 3) { ms = converted_number[2]; } break; } case ECMA_DATE_PROTOTYPE_SET_UTC_SECONDS: case ECMA_DATE_PROTOTYPE_SET_SECONDS: { sec = converted_number[0]; if (conversions >= 2) { ms = converted_number[1]; } break; } default: { JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS || builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_MILLISECONDS); ms = converted_number[0]; break; } } time_part = ecma_date_make_time (hour, min, sec, ms); } bool is_utc = BUILTIN_DATE_FUNCTION_IS_UTC (builtin_routine_id); ecma_number_t full_date = ecma_date_make_date (day_part, time_part); if (!is_utc) { full_date = ecma_date_utc (full_date); } full_date = ecma_date_time_clip (full_date); *ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t, ext_object_p->u.class_prop.u.value) = full_date; return ecma_make_number_value (full_date); } /* ecma_builtin_date_prototype_dispatch_set */ #undef ECMA_DATE_PROTOTYPE_IS_SET_YEAR_ROUTINE /** * Dispatcher of the built-in's routines * * @return ecma value * Returned value must be freed with ecma_free_value. */ ecma_value_t ecma_builtin_date_prototype_dispatch_routine (uint16_t builtin_routine_id, /**< built-in wide routine * identifier */ ecma_value_t this_arg, /**< 'this' argument value */ const ecma_value_t arguments_list[], /**< list of arguments * passed to routine */ ecma_length_t arguments_number) /**< length of arguments' list */ { if (JERRY_UNLIKELY (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_JSON)) { return ecma_builtin_date_prototype_to_json (this_arg); } #if ENABLED (JERRY_ESNEXT) if (JERRY_UNLIKELY (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_PRIMITIVE)) { ecma_value_t argument = arguments_number > 0 ? arguments_list[0] : ECMA_VALUE_UNDEFINED; return ecma_builtin_date_prototype_to_primitive (this_arg, argument); } #endif /* ENABLED (JERRY_ESNEXT) */ if (!ecma_is_value_object (this_arg) || !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_DATE_UL)) { return ecma_raise_type_error (ECMA_ERR_MSG ("'this' is not a Date object")); } ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) ecma_get_object_from_value (this_arg); ecma_number_t *prim_value_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_number_t, ext_object_p->u.class_prop.u.value); if (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_TIME) { return ecma_make_number_value (*prim_value_p); } if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_TIME) { ecma_value_t ret_value = ECMA_VALUE_EMPTY; /* 1. */ ECMA_OP_TO_NUMBER_TRY_CATCH (time_num, arguments_list[0], ret_value); *prim_value_p = ecma_date_time_clip (time_num); ret_value = ecma_make_number_value (time_num); ECMA_OP_TO_NUMBER_FINALIZE (time_num); return ret_value; } if (builtin_routine_id <= ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS) { ecma_number_t this_num = *prim_value_p; if (!BUILTIN_DATE_FUNCTION_IS_UTC (builtin_routine_id)) { this_num += ecma_date_local_time_zone_adjustment (this_num); } if (builtin_routine_id <= ECMA_DATE_PROTOTYPE_GET_UTC_TIMEZONE_OFFSET) { return ecma_builtin_date_prototype_dispatch_get (builtin_routine_id, this_num); } return ecma_builtin_date_prototype_dispatch_set (builtin_routine_id, ext_object_p, this_num, arguments_list, arguments_number); } if (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_ISO_STRING) { if (ecma_number_is_nan (*prim_value_p) || ecma_number_is_infinity (*prim_value_p)) { return ecma_raise_range_error (ECMA_ERR_MSG ("Date must be a finite number.")); } return ecma_date_value_to_iso_string (*prim_value_p); } if (ecma_number_is_nan (*prim_value_p)) { return ecma_make_magic_string_value (LIT_MAGIC_STRING_INVALID_DATE_UL); } switch (builtin_routine_id) { case ECMA_DATE_PROTOTYPE_TO_STRING: { return ecma_date_value_to_string (*prim_value_p); } case ECMA_DATE_PROTOTYPE_TO_DATE_STRING: { return ecma_date_value_to_date_string (*prim_value_p); } case ECMA_DATE_PROTOTYPE_TO_TIME_STRING: { return ecma_date_value_to_time_string (*prim_value_p); } default: { JERRY_ASSERT (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_UTC_STRING); return ecma_date_value_to_utc_string (*prim_value_p); } } } /* ecma_builtin_date_prototype_dispatch_routine */ /** * @} * @} * @} */ #endif /* ENABLED (JERRY_BUILTIN_DATE) */
//Created by zhbinary on 2019-01-09. //Email: <EMAIL> package types type ChannelHandlerContext interface { ChannelInboundInvoker ChannelOutboundInvoker /** * Return the {@link channel} which is bound to the {@link ChannelHandlerContext}. */ Channel() Channel /** * The unique name of the {@link ChannelHandlerContext}.The name was used when then {@link ChannelHandler} * was added to the {@link DefaultChannelPipeline}. This name can also be used to access the registered * {@link ChannelHandler} from the {@link DefaultChannelPipeline}. */ Name() string /** * The {@link ChannelHandler} that is bound this {@link ChannelHandlerContext}. */ Handler() ChannelHandler /** * Return {@code true} if the {@link ChannelHandler} which belongs to this context was removed * from the {@link DefaultChannelPipeline}. Note that this method is only meant to be called from with in the * {@link EventLoop}. */ IsRemoved() bool //read(ctx ChannelHandlerContext) ChannelHandlerContext // //flush(ctx ChannelHandlerContext) ChannelHandlerContext /** * Return the assigned {@link DefaultChannelPipeline} */ Pipeline() ChannelPipeline IsInbound() bool IsOutbound() bool }
def create(): import random, string suggested_name = ''.join(random.choice(string.ascii_lowercase) for _ in range(4)) if session['su'] != 'Yes': return abort(403) if request.method == 'POST': name = request.form['name'] template = request.form.get('template','debian') arch = request.form.get('arch','x86_64') release = request.form.get('release',False) storage_method = request.form.get('backingstore','directory') storage = { 'method': storage_method, } if storage_method == 'directory': storage['dir'] = request.form.get('dir', False) elif storage_method == 'btrfs': pass elif storage_method == 'zfs': storage['zpoolname'] = request.form['zpoolname'] elif storage_method == 'lvm': storage['lvname'] = request.form['lvname'] storage['vgname'] = request.form['vgname'] storage['fstype'] = request.form['fstype'] storage['fssize'] = request.form['fssize'] data = { 'name': name, 'template': template, 'arch': arch, 'release': release, 'storage': storage } g.api.create_container(name, template, release, storage) templates = ( {'os':'Debian','template':'debian','archs':['x86_64','i386'], 'releases': ['stretch','sid','buster','jessie'],'description':'','source':'official'}, {'os':'Ubuntu','template':'ubuntu','archs':['x86_64','i386'], 'releases': ['trusty','cosmic','bionic',],'description':'','source':'official'}, {'os':'Fedora','template':'fedora','archs':['x86_64','i386'], 'releases': [],'description':'','source':'official'}, {'os':'Centos','template':'centos','archs':['x86_64','i386'], 'releases': ['6','7'],'description':'','source':'official'}, {'os':'Arch','template':'archlinux','archs':['x86_64','i386'], 'releases': ['current',],'description':'','source':'official'}, {'os':'Alpine','template':'alpine','archs':['x86_64','i386'], 'releases': ['edge','latest-stable','v3.8','v3.7','v3.6','v3.5','v3.4'],'description':'','source':'official'}, {'os':'Busybox','template':'busybox','archs':[], 'releases': [],'description':'','source':'official'}, ) context = { 'templates': templates, 'suggested_name': suggested_name, } return render_template('create.html', **context)
<filename>src/main/java/xyz/andrewkboyd/homedatahub/dto/SearchCriteria.java package xyz.andrewkboyd.homedatahub.dto; import lombok.Data; import java.math.BigInteger; import java.util.List; public @Data class SearchCriteria { private BigInteger offset; private long count; private List<String> terms; }
/*! ************************************ \brief Construct a SoundCardDescription Constructor ***************************************/ Burger::SoundManager::SoundCardDescription::SoundCardDescription() : m_DeviceName(), m_uDevNumber(0), m_b8Bit(FALSE), m_b16Bit(FALSE), m_bStereo(FALSE), m_bHardwareAccelerated(FALSE), m_uMinimumSampleRate(22050), m_uMaximumSampleRate(22050) { #if defined(BURGER_WINDOWS) MemoryClear(&m_GUID,sizeof(m_GUID)); #endif }
Polygonal equalities and virtual degeneracy in $L_{p}$-spaces Suppose $0<p \leq 2$ and that $(\Omega, \mu)$ is a measure space for which $L_{p}(\Omega, \mu)$ is at least two-dimensional. The central results of this paper provide a complete description of the subsets of $L_{p}(\Omega, \mu)$ that have strict $p$-negative type. In order to do this we study non-trivial $p$-polygonal equalities in $L_{p}(\Omega, \mu)$. These are equalities that can, after appropriate rearrangement and simplification, be expressed in the form \begin{eqnarray*} \sum\limits_{j, i = 1}^{n} \alpha_{j} \alpha_{i} {\| z_{j} - z_{i} \|}_{p}^{p}&=&0 \end{eqnarray*} where $\{ z_{1}, \ldots, z_{n} \}$ is a subset of $L_{p}(\Omega, \mu)$ and $\alpha_{1}, \ldots, \alpha_{n}$ are non-zero real numbers that sum to zero. We provide a complete classification of the non-trivial $p$-polygonal equalities in $L_{p}(\Omega, \mu)$. The cases $p<2$ and $p = 2$ are substantially different and are treated separately. The case $p = 1$ generalizes an elegant result of Elsner, Han, Koltracht, Neumann and Zippin. Another reason for studying non-trivial $p$-polygonal equalities in $L_{p}(\Omega, \mu)$ is due to the fact that they preclude the existence of certain types of isometry. For example, our techniques show that if $(X,d)$ is a metric space that has strict $q$-negative type for some $q \geq p$, then: (1) $(X,d)$ is not isometric to any linear subspace $W$ of $L_{p}(\Omega, \mu)$ that contains a pair of disjointly supported non-zero vectors, and (2) $(X,d)$ is not isometric to any subset of $L_{p}(\Omega, \mu)$ that has non-empty interior. Furthermore, in the case $p = 2$, it also follows that $(X,d)$ is not isometric to any affinely dependent subset of $L_{2}(\Omega, \mu)$. Introduction The starting point for this paper is the following intriguing result of Elsner et al. . Theorem 1.1. Let {x k } n k=1 and {y k } n k=1 be two collections of functions in L 1 (Ω, µ). Then j1<j2 x j − y i 1 (1.1) if and only if for almost every ω ∈ Ω, the numerical sets {x k (ω)} n k=1 and {y k (ω)} n k=1 are identical. It is helpful to recall that a numerical set is just a finite collection of possibly repeated (real or complex) numbers. Two numerical sets {ζ k } n k=1 and {ξ k } n k=1 are said to be identical if there exists a permutation π of (1, 2, . . . , n) such that ζ π(k) = ξ k for each k, 1 ≤ k ≤ n. Our interest in Theorem 1.1 is that it is related to the problem of characterizing all cases of non-trivial equality in the 1-negative type inequalities for L 1 (Ω, µ). For instance, if we assume in the statement of Theorem 1.1 that the functions x 1 , . . . , x n , y 1 , . . . , y n are pairwise distinct, then the equality (1.1) may be rewritten in the form 2n j,i=1 α j α i z j − z i 1 = 0 (1.2) where the real numbers α 1 , . . . , α 2n sum to zero with each α k ∈ {−1, 1} and z k is an x j or y i depending on the sign of α k . In this way we see that Theorem 1.1 provides specific instances of non-trivial equality in the 1-negative type inequalities for L 1 (Ω, µ). In this paper we study non-trivial p-polygonal equalities in L p -spaces, 0 < p < ∞. These are equalities that can be expressed (after simplification) in the form where {z 1 , . . . , z n } is a subset of L p (Ω, µ) and α 1 , . . . , α n are non-zero real numbers such that α 1 +· · ·+α n = 0. Such equalities are especially enlightening if 0 < p ≤ 2. In this case, L p (Ω, µ) has p-negative type but it does not have q-negative type for any q > p. So if 0 < p ≤ 2 we may view each non-trivial p-polygonal equality as being an instance of non-trivial equality in a p-negative type inequality for L p (Ω, µ), and vice-versa. Theorems 4.6 and 5.2 classify all non-trivial p-polygonal equalities in L p (Ω, µ), 0 < p ≤ 2. Corollaries 4.9 and 5.3 then classify the subsets of L p (Ω, µ), 0 < p ≤ 2, that have strict p-negative type. Our approach in the case 0 < p < 2 is based on a new property of L p -spaces that we call virtual degeneracy. Specialization to the case p = 1 reveals a more general form of Theorem 1.1. The Hilbert space case p = 2 is notably different on account of the parallelogram identity and is thus treated separately. In the case p > 2 we obtain partial results about the collection of all non-trivial p-polygonal equalities in L p (Ω, µ). One reason for studying p-polygonal equalities in L p -spaces is that they preclude the existence of certain types of isometry. For example, Theorem 4.15 shows that if 0 < p < ∞ and if (X, d) is a metric space that has strict q-negative type for some q ≥ p, then: (1) (X, d) is not isometric to any linear subspace W of L p (Ω, µ) that contains a pair of disjointly supported non-zero vectors, and (2) (X, d) is not isometric to any subset of L p (Ω, µ) that has non-empty interior. Furthermore, in the case p = 2, it follows that we also have: (3) (X, d) is not isometric to any affinely dependent subset of L 2 (Ω, µ). These theorems are, in fact, special instances of a more general embedding principle (Theorem 3.24): If (Y, ρ) is a metric space whose supremal p-negative type ℘ is finite and if (X, d) is a metric space that has strict q-negative type for some q ≥ ℘, then (X, d) is not isometric to any metric subspace of (Y, ρ) that admits a non-trivial p 1 -polygonal equality for some p 1 ∈ . It is notable in all of these instances that the metric space (X, d) can, for example, be any ultrametric space. As a result we obtain new insights into sophisticated embedding theorems of Lemin and Shkarin . As a basic technique used throughout the paper we do not deal directly with equalities of the form (1.3). We instead work with non-trivial weighted generalized roundness equalities with exponent p. These are an equivalent family of equalities that can be expressed (after simplification) in the form (1. 4) where x 1 , . . . , x s , y 1 , . . . , y t ∈ L p (Ω, µ), {x j : 1 ≤ j ≤ s} ∩ {y i : 1 ≤ i ≤ t} = ∅, m 1 , . . . , m s > 0, n 1 , . . . , n t > 0, and m 1 + · · · + m s = n 1 + · · · + n t . We derive the precise transition between (1.3) and (1.4) in Lemma 3.13 and Theorem 3. 18. The organization of the paper is as follows. In Section 2 we recall the notions of negative type and generalized roundness. In Section 3 we introduce the notion of non-trivial p-polygonal equalities in metric spaces and examine their bearing on the existence of isometries. In Section 4 we focus on non-trivial ppolygonal equalities in L p -spaces (p = 2) and introduce the notion of virtual degeneracy. All results in Section 4 are equally valid for real or complex L p -spaces. Section 5 is dedicated to studying 2-polygonal equalities in real or complex inner product and Hilbert spaces. Section 6 considers virtually degenerate linear subspaces of L p -spaces, 0 < p < ∞. Such linear subspaces do not have q-negative type for any q > p. Lemma 6.4 and Theorem 6.5 provide ways to construct virtually degenerate linear subspaces of L p (Ω, µ), 0 < p < ∞. Section 7 completes the paper with a discussion of open problems. Throughout the paper we use N = {1, 2, 3, . . .} to denote the set of all natural numbers. Whenever sums are indexed over the empty set they are defined to be 0. All measures are non-trivial and positive. All L p -spaces are endowed with the usual (quasi) norm and are assumed to be at least two-dimensional. Negative type and generalized roundness The notions of negative type and generalized roundness recalled below in Definition 2.1 were formally introduced and studied by Menger , Schoenberg and Enflo . Menger and Schoenberg were interested in determining which metric spaces can be isometrically embedded into a Hilbert space. Enflo's interest, on the other hand, was to construct a separable metric space that admits no uniform embedding into any Hilbert space. More recently, there has been interest in the notion of "strict" p-negative type, particularly as it pertains to the geometry of finite metric spaces. In the present work we will see that strict p-negative type can also have a role to play in certain infinite-dimensional settings. Papers that have been instrumental in developing properties of metrics of strict p-negative type include . Definition 2.1. Let p ≥ 0 and let (X, d) be a metric space. It is worth noting that if we set D p = (d(z j , z i ) p ) j,i and let ·, · denote the usual inner product on R n , the inequalities (2.1) may be expressed more succinctly as: Negative type holds on closed intervals by a result of Schoenberg . Indeed, the set of all values of p for which a given metric space (X, d) has p-negative type is always an interval of the form or have obtained a version of Schoenberg's theorem that deals with strict negative type. Theorem 2.2 (Li and Weston ). Let (X, d) be a metric space. If (X, d) has p-negative type for some p > 0, then (X, d) has strict q-negative type for all q such that 0 ≤ q < p. In the case of finite metric spaces a more definitive statement holds. Theorem 2.3 (Li and Weston ). A finite metric space (X, d) has strict p-negative type if and only if p < ℘(X). Theorem 2.3 is specific to finite metric spaces. The supremal p-negative type of an infinite metric space may or may not be strict. This may be seen from examples in and . It is important to note that if a metric space (X, d) has ℘-negative type but not strict ℘-negative type for some ℘ > 0, then ℘ = ℘(X) as a corollary of Theorem 2.2. Moreover, under these conditions, there must exist a subset {z 1 , . . . , z n } ⊆ X and an n-tuple α = (α 1 , . . . , α n ) Clearly, if some α k = 0 in this setting, then we may discard the pair (z k , α k ) from the configuration without disrupting the underlying equalities. In such situations, we may therefore assume that every α k is non-zero. The following fundamental fact is central to the development of the rest of this paper. Theorem 2.4 (Schoenberg ). Let 0 < p ≤ 2 and suppose that (Ω, µ) is a measure space. Then L p (Ω, µ) has p-negative type but it does not have q-negative type for any q > p. In other words, ℘(L p ) = p. The purpose of this paper is to study equalities of the form (2.2) in L p -spaces with 0 < p < ∞ and where ℘ = p. Such a study is most meaningful in the case 0 < p ≤ 2 due to Theorem 2.4 but we will see that the case p > 2 also provides some interesting information. Poylgonal equalities in metric spaces In order to address cases of equality in (2.1) it is helpful to reformulate Definition 2.1 in terms of signed (s, t)-simplices and the corresponding p-simplex "gaps," the notions of which we now introduce. Definition 3.1. Let X be a set and suppose that s, t > 0 are integers. A signed (s, t)-simplex in X is a collection of (not necessarily distinct) points x 1 , . . . , x s , y 1 , . . . , y t ∈ X together with a corresponding collection of real numbers m 1 , . . . , m s , n 1 , . . . , n t that satisfy m 1 +· · ·+m s = n 1 +· · ·+n t . Such a configuration of points and real numbers will be denoted by D = s,t and will simply be called a simplex when no confusion can arise. Simplices with weights on the vertices were introduced by Weston to study the generalized roundness of finite metric spaces. In the author only considers positive weights. The approach being taken here appears to be more general but it is, in fact, equivalent by Lemma 3.13. The basis for the following definition is derived from the original formulation of generalized roundness that was introduced by Enflo in order to address a problem of Smirnov concerning the uniform structure of Hilbert spaces. We call γ p (D) the p-simplex gap of D in (X, d). In the formulation of Definition 3.1 the points x 1 , . . . , x s , y 1 , . . . , y t ∈ X are not required to be distinct. As we will see, this allows a high degree of flexibility but it also comes at some technical cost, the most important of which is the necessity of keeping track of repetitions of points using repeating numbers. We say that the simplex D is degenerate if m(z) = n(z) for all z ∈ S(D). In relation to Definition 3.3 it is important to note that some of the sums defining m(z) or n(z), z ∈ S(D), may be indexed over the empty set ∅. The convention in this paper is that all such sums are equal to 0. By Definition 3.1, m(z) = n(z). The full significance of this remark will become apparent as we proceed. There are various ways that we may refine a signed (s, t)-simplex D = s,t in a metric space (X, d) without altering any of the values of the p-simplex gaps γ p (D), p > 0. The following lemmas describe three such scenarios. The first lemma is particularly simple and is stated without proof. Notation. The refinement procedure used to form the simplex D ′′ in the statement of Lemma 3.6 will be denoted: There is a useful variant of the second refinement procedure. Proof. If we set y t+1 = x 1 , then we may insert the pair y t+1 (0) into the simplex D without altering any of the simplex gaps or repeating numbers. Now apply Lemma 2 to refine the simplex D in the following way: Notation. The refinement procedure used to form the simplex D ′′′ in the statement of Lemma 3.7 will be denoted: It is worth noting that the refinement procedures described in Lemmas 3.5 -3.7 preserve degeneracy: Any refinement of a degenerate simplex will also be degenerate. More generally, we may use refinement procedures to formulate a notion of equivalent signed simplices. Definition 3.8. Let D 1 , D 2 be signed simplices in a metric space (X, d). We say that D 1 is equivalent to D 2 , denoted D 1 ≻ D 2 , if D 2 can be obtained from D 1 by finitely many applications of the three refinement procedures described in Lemmas 3.5 -3.7. Moreover, it follows from (2), that D 1 is degenerate if and only if D 2 is degenerate. The notion of passing to an equivalent simplex affords an important characterization of degeneracy. is degenerate if and only if it is equivalent to a signed simplex D ∅ that has no non-zero weights. t is a given degenerate simplex. We may assume, by applying Lemma 3.5 finitely often if necessary, that the degenerate simplex D has the following property: the points x 1 , . . . , x s are pairwise distinct and the points y 1 , . . . , y t are pairwise distinct. (This forces s = t because D is degenerate.) Let z ∈ S(D) be given. By assumption, m D (z) = n D (z). By relabeling the simplex, if necessary, we may assume that z = x 1 = y 1 . The property placed on D then ensures that The forward implication of the lemma follows by applying this process a finite number of times. As an immediate application of Lemma 3.10 we obtain the following corollary. In fact, the converse of Corollary 3.11 also holds, but this requires an appeal to Theorem 3.18. At this point it is helpful to introduce some additional descriptive terminology for simplices. (1) D is said to be pure if x j = y i for all j, i. (2) D is said to be full if the points x 1 , . . . , x s ∈ X are pairwise distinct and the points y 1 , . . . , y t ∈ X are pairwise distinct. (3) D is completely refined if it is full, pure and has no non-positive weights. The following lemma presents a fundamental dichotomy for a simplex in a metric space. , then exactly one of the following two statements must hold: (1) D is degenerate. (2) D is equivalent to a completely refined simplex D * * * . There is, by finitely many of applications of Lemma 3.5, a full simplex D ′ such that D ≻ D ′ , S(D) = S(D ′ ) and D ′ has identical repeating numbers to D. So we may as well assume from the outset that the given simplex D is full. There are five ways that we may then choose to refine the full simplex D to form a simplex D * such that D ≻ D * : If x j = y i for some j, i, then Lemma 3.6 allows us to form a simplex D * by implementing the appropriate refinement from the following list: If there is a j such that x j = y i for all i and m j < 0, then Lemma 3.7 allows us to form a simplex D * by implementing the following refinement: If there is an i such that y i = x j for all j and n i < 0, then Lemma 3.7 allows us to form a simplex D * by implementing the following refinement: Now implement the succession of all such possible refinements (1) -(3) (in any order) followed by the succession of all such possible refinements (4) -(5) (in any order) to produce a simplex D * * such that D ≻ D * * . By construction, each vertex in the simplex D * * has non-negative weight. Moreover, D is degenerate if all vertices in D * * have weight 0. On the other hand, D is non-degenerate if at least one vertex in D * * has positive weight. In the latter case, by deleting all vertices from D * * that have weight 0, it follows that D is equivalent to a completely refined simplex D * * * . , then the completely refined signed simplex that it reduces to is unique (modulo relabeling), and we can give it explicitly. To do this, let In the case of vector spaces we will have reason to consider balanced simplices. Proof. (⇒) Suppose Z admits a a non-degenerate balanced simplex D = s,t . By Lemma 3.16 and Lemma 3.13, we may assume that the simplex D is completely refined. By definition, we have m j x j = n i y i and m j = n i with at least one (and, in fact, all) m j = 0. By relabeling the elements of Z, if necessary, we may assume that x 1 = z 0 . Since m 1 = (n 1 + · · · + n t ) − (m 2 + · · · + m s ), we see that In other words, This shows that the set {z 1 − z 0 , z 2 − z 0 , . . . , z n − z 0 } has a non-empty linearly dependent subset. Hence the set Now suppose that the set {z 1 − z 0 , z 2 − z 0 , . . . , z n − z 0 } linearly dependent (when X is considered as a real vector space). Then there exist real numbers c 1 , . . . , c n , not all 0, such that Setting c 0 = −(c 1 + · · · + c n ), so that c 0 + c 1 + · · · + c n = 0, we see that c 0 z 0 + c 1 z 1 + · · · + c n z n = 0. Thus By construction, and we have already stated that not all of the c's are 0. By discarding any c's that are equal to 0, we deduce from (3.1) and (3.2) that the set Z = {z 0 , z 1 , . . . , z n } admits a non-degenerate balanced simplex D. (One half of the simplex D is {z j (c j ) : c j > 0} and the other half is The following theorem is a variation on a theme developed in Lennard et al. : Enflo's formulation of the generalized roundness of a metric space (X, d) coincides with sup{p : (X, d) has p-negative type}. This theme was also explored by Doust and Weston within the framework of strict negative type. The new ingredient in the following theorem is allowing simplices to include possibly negative weights on the vertices. Theorem 3.18. Let p ≥ 0 and let (X, d) be a metric space. Then the following conditions are equivalent: (1) (X, d) has p-negative type. As an immediate application of Theorem 3.18 we obtain the converse of Corollary 3.11. Corollary 3.19. Let D be a signed (s, t)-simplex in a metric space (X, d). If γ p (D) = 0 for all p ≥ 0, then D is degenerate. Proof. We prove the contrapositive. Suppose D is non-degenerate. By Remark 3.9 (3) and Lemma 3.13 we may assume that D is completely refined. Now, (S(D), d) is a finite metric space and thus has strict p-negative type for some p > 0. In particular, γ p (D) > 0 by Theorem 3.18. This completes the proof. We are now in a position to rigorously formulate the notion of a non-trivial p-polygonal equality. Definition 3.20. Let p ≥ 0 and let (X, d) be a metric space. A p-polygonal equality in (X, d) is an equality of the form γ p (D) = 0 where D is a signed simplex in X. If, moreover, the underlying simplex D is non-degenerate, we will say that the p-polygonal equality is non-trivial. The motivation for defining a non-trivial p-polygonal equality is clearly evident from Theorem 3.18. In fact, Theorem 3.18 implies the following useful lemmas. Lemma 3.21. Let p > 0 and let (X, d) be a metric space that has p-negative type. Then (X, d) has strict p-negative type if and only if it admits no non-trivial p-polygonal equality. Lemma 3.22. Let (X, d) be a metric space whose generalized roundness ℘ is non-zero and suppose that 0 ≤ p < ℘. Then (X, d) admits no non-trivial p-polygonal equalities. Proof. (X, d) has strict p-negative type by Theorem 2.2. Now apply Lemma 3.21. Lemma 3.23. Let p > 0. If a metric space (X, d) admits a non-trivial p-polygonal equality, then: (1) (X, d) does not have q-negative type for any q > p, and (2) (X, d) does not have strict p-negative type. Proof. Suppose (X, d) admits a non-trivial p-polygonal equality for some p > 0. If we assume that (X, d) has q-negative type for some q > p, then it must have strict p-negative type by Theorem 2.2. However, this would contradict Lemma 3.21. Properties of strict negative type and Lemma 3.23 imply the following non-embedding principle: Theorem 3.24. Let (Y, ρ) be a metric space whose generalized roundness ℘ is finite. Let (X, d) be a metric space that has strict q-negative type for some q ≥ ℘. Then, (X, d) is not isometric to any metric subspace of (Y, ρ) that admits a non-trivial p-polygonal equality for some p such that ℘ ≤ p ≤ q. Proof. Let Z ⊆ Y . Suppose that (Z, ρ) admits a non-trivial p-polygonal equality for some p ∈ . By Lemma 3.23, (Z, ρ) does not have strict p-negative type. On the other hand, (X, d) has strict p-negative type because p ≤ q. (This is a consequence of Theorem 2.2.) Hence (X, d) is not isometric to (Z, ρ). Remark 3.25. If, in the statement of Theorem 3.24, it is the case that ℘ ≤ p < q, then it suffices to assume that the metric space (X, d) has q-negative type. We will then have ℘(Z) ≤ p and ℘(X) ≥ q. Polygonal equalities and virtual degeneracy in L p -spaces In order to apply Theorem 3.24 we turn our attention to the study of p-polygonal equalities in L p -spaces, 0 < p < ∞. Our starting point is the following useful consequence of Corollary 3.11 and Lemma 3.22. Proof. (⇒) Suppose 0 ≤ p < ℘ and that γ p (D) = 0. By Lemma 3.22, (X, d) admits no non-trivial p-polygonal equalities. Hence D must be degenerate. It is worth recalling that the backward implication in the statement of Theorem 4.1 holds for all p > 0. The complex plane endowed with the usual metric has generalized roundness ℘ = 2. This leads to the following special case of Theorem 4.1 that will be used in the proof of Theorem 4.6. for almost all ω ∈ Ω. Now integrate to get the desired conclusion. In the case of ℓ (n) p as well as ℓ p the condition that defines virtual degeneracy will hold everywhere. There are other settings where this may occur but we will not discuss them here. The importance of virtually degenerate simplices in L p (Ω, µ) is that they give rise to a large class of non-trivial p-polygonal equalities. Lemma 4.5. Let 0 < p < ∞ and suppose that (Ω, µ) is a measure space. If D = s,t is a virtually degenerate simplex in L p (Ω, µ), then γ p (D) = 0. In other words, we have the non-trivial p-polygonal equality Proof. If we assume that D = s,t is a virtually degenerate simplex in L p (Ω, µ) then, by definition, we have for almost all ω ∈ Ω. Integrating over Ω with respect to µ gives the desired conclusion. Theorem 4.6. Let 0 < p < 2 and suppose that (Ω, µ) is a measure space. Given a non-degenerate signed (s, t)-simplex D = s,t in L p (Ω, µ), we have the non-trivial p-polygonal equality if and only if the simplex is virtually degenerate. Proof. (⇒) It suffices to assume that the scalar field of L p (Ω, µ) is the complex plane C. Let D = s,t be a given non-degenerate signed (s, t)-simplex in L p (Ω, µ) for which the equality (4.1) holds. Then D(ω) = s,t is a signed (s, t)-simplex in the complex plane for each ω ∈ Ω. Moreover, as the complex plane endowed with the usual metric has p-negative type, it follows that we have γ p (D(ω)) ≥ 0 for each ω ∈ Ω by Theorem 3.18. In other words, for each ω ∈ Ω. The inequalities (4.2) cannot be strict on any set of positive measure as this would imply thereby violating (4.1). So the inequalities (4.2) must hold at equality µ-a.e. on Ω. Therefore the family of signed (s, t)-simplices D(ω) = s,t , ω ∈ Ω, are degenerate in the complex plane µ-a.e. by the forward implication of Corollary 4.2. In other words, the simplex D is virtually degenerate. It is notable that the forward implication of Theorem 4.6 does not hold for p = 2: Every parallelogram in a Hilbert space gives rise to a non-trivial 2-polygonal equality due to the parallelogram identity but not all parallelograms are virtually degenerate. In the following section, Theorem 5.2 gives a complete description of the 2-polygonal equalities in any real or complex inner product space. The following lemma deals with degenerate simplices that have weight 1 on each vertex. This leads to a considerably more general form of Theorem 1.1 (Elsner et al. (1, 2, . . . , n) such that x π(k) = y k for each k, 1 ≤ k ≤ n. Proof. (⇒) Suppose that the simplex D = n,n in X is degenerate. Let S(D) denote the set of distinct points in X that appear in D. Say, S(D) = {z 1 , . . . , z l }. Because each vertex x j or y i in D has weight 1 we see that m(z k ) = |{j : x j = z k }| and n(z k ) = |{i : y i = z k }| for each k, 1 ≤ k ≤ l. For notational simplicity, we set m k = m(z k ) and n k = n(z k ) for each k, 1 ≤ k ≤ l. The assumption on D is that m k = n k for each k, 1 ≤ k ≤ l. By additionally setting m 0 = n 0 = 0, we may choose permutations φ(k) and σ(k) of (1, 2, . . . , n) so that z k = x φ(m0+···+m k−1 +1) = · · · = x φ(m0+···+m k ) = y σ(n0+···+n k−1 +1) = · · · = y σ(n0+···+n k ) for each k, 1 ≤ k ≤ l. (Points from each half of the simplex that are equal are now arranged in blocks of equal length.) It follows from our construction that x φ(k) = y σ(k) for each k, 1 ≤ k ≤ n. All that remains is to define the permutation π = φσ −1 . We then have x π(k) = y k for each k, 1 ≤ k ≤ n, as asserted. (⇐) Suppose there is a permutation π(k) of (1, 2, . . . , n) such that x π(k) = y k for each k, 1 ≤ k ≤ n. Let z ∈ S(D) be given. Once again it is the case that m(z) = |{j : x j = z}| and n(z) = |{i : y i = z}|. Because of the assumption on D we see that if z = y i , then z = x j where j = π(i). Hence n(z) ≤ m(z). However, it is also the case that x k = y π −1 (k) for each k, 1 ≤ k ≤ n. So, by the analogous argument, m(z) ≤ n(z) too. In a nutshell, m(z) = n(z). We conclude that D is degenerate. Corollary 4.10. Let 0 < p < 2 and suppose that (Ω, µ) is a measure space. If Z is a non-empty subset of L p (Ω, µ) that does not have strict p-negative type, then Z is an affinely dependent subset of L p (Ω, µ) (when L p (Ω, µ) is considered as a real vector space). The converse statement is not true in general. Proof. By Lemma 3.21, Z admits a non-trivial p-polygonal equality. So Z admits a virtually degenerate simplex D = s,t by Theorem 4.6. As before (with a slight abuse of notation), let S(D) = {x j , y i }. The simplex D is non-degenerate by definition of virtual degeneracy and balanced by Lemma 4.4. By Theorem 3.17, S(D), and hence Z, is an affinely dependent subset of X = L p (Ω, µ). The proof of the following lemma indicates that virtually degenerate simplices are easily constructed in L p -spaces. We will see that this has a number of interesting ramifications. (1) Any linear subspace of L p (Ω, µ) that contains a pair of disjointly supported non-zero vectors admits a virtually degenerate simplex. Proof. Suppose that 0 < p < ∞. Consider two disjointly supported non-zero vectors u, v ∈ L p (Ω, µ). Set x 1 = 0, x 2 = u + v, y 1 = u and y 2 = v. Then it is easy to check that D = 2,2 is a virtually degenerate simplex in L p (Ω, µ). Any linear subspace of L p (Ω, µ) that contains u and v also contains D. This establishes (1). On the other hand, every open ball in L p (Ω, µ) contains a translate of a dilation or contraction of the virtually degenerate simplex D. These operations preserve virtual degeneracy. Hence every open ball in L p (Ω, µ) contains a virtually degenerate simplex. This establishes (2). Remark 4.12. The condition on the vectors appearing in the statement of Lemma 4.11 is well understood when p ≥ 1. Indeed, it is germane to recall the following basic fact about L p -spaces, p = 2. Let 1 ≤ p < 2 or 2 < p < ∞. Then, vectors u, v ∈ L p (Ω, µ) are disjointly supported if and only if Note that (4.4) is the p-polygonal equality that arises from the simplex D in the proof of Lemma 4.11. The following definition is motivated by Lemma 4.11 (1). Definition 4.13. Let 0 < p < ∞ and suppose that (Ω, µ) is a measure space. A linear subspace W of L p (Ω, µ) is said to have Property E if there exists a pair of disjointly supported non-zero vectors u, v ∈ W . Linear subspaces of L p -spaces that have Property E cannot have strict p-negative type. (1) No linear subspace of L p (Ω, µ) with Property E has strict p-negative type. The next observation provides a general isometric embedding principle for L p -spaces (0 < p < ∞). Theorem 4.15. Let 0 < p < ∞ suppose that (Ω, µ) is a measure space. Let (X, d) be a metric space that has strict q-negative type for some q ≥ p. Then (X, d) is not isometric to any metric subspace of L p (Ω, µ) that admits a virtually degenerate simplex. In particular, (1) (X, d) is not isometric to any linear subspace W of L p (Ω, µ) that has Property E, and (2) (X, d) is not isometric to any metric subspace of L p (Ω, µ) that has non-empty interior. Proof. The generalized roundness of Y = L p (Ω, µ) is finite. Let Z be a metric subspace of L p (Ω, µ) that admits a virtually degenerate simplex. By Lemma 4.5, Z admits a non-trivial p-polygonal equality. As (X, d) is assumed to have strict q-negative for some q ≥ p, we deduce that (X, d) is not isometric to Z by Theorem 3.24. Parts (1) and (2) now follow directly from Lemma 4.11. The following special case of Theorem 4.15 is worth emphasizing. Proof. Let p, r, (Ω 1 , µ 1 ) and (Ω 2 , µ 2 ) be given as in the statement of the corollary. All non-empty subsets of L r (Ω 2 , µ 2 ) have r-negative type by Theorem 2.4 and hence strict p-negative type by Theorem 2.2. Now apply Theorem 4.15 with q = p. Polygonal equalities in real and complex inner product spaces Theorem 4.6 classifies all non-trivial p-polygonal equalities in L p (Ω, µ), 0 < p < 2, according to the notion of virtual degeneracy. In the present section we classify all non-trivial 2-polygonal equalities in L 2 (Ω, µ). Theorem 5.2 illustrates that there is a marked difference between the cases p < 2 and p = 2. This is because the real line does not have strict 2-negative type. The starting point is the following key lemma. Lemma 5.1. Let (X, ·, · ) be a real or complex inner product space with induced norm · . Let s, t > 0 be integers. Proof. It suffices to assume that (X, ·, · ) is a complex inner product space. (The argument for a real inner product space is entirely similar.) Let L and R denote the left and right sides of (5.1), respectively. The claim is that L = R. The first thing to notice is that On the other hand, Comparing the expressions (5.2) and (5.3) for L and R we see that the derivation of (5.1) will be complete if we can derive the following identity. Now let L ⊛ and R ⊛ denote the left and right sides of (5.4). Recalling that m 1 + · · · + m s = n 1 + · · · + n t we are now in a position to complete the proof. In fact, R ⊛ = n 1 + · · · + n t m 1 x 1 2 + · · · + m s x s 2 + m 1 + · · · + m s n 1 y 1 2 + · · · + n t y t = m 1 + · · · + m s m 1 x 1 2 + · · · + m s x s 2 + n 1 + · · · + n t n 1 y 1 2 + · · · + n t y t A special case of Lemma 5.1 for the Hilbert space L 2 (with s = t and m j = 1 = n i for all j, i) was noted in passing by Enflo and has also been recorded in the literature by several other authors. An immediate upshot of Theorem 3.18 and Lemma 5.1 is the well-known result that every inner product space has 2-negative type. More importantly, for our purposes, Lemma 5.1 leads directly to a complete description of the 2-polygonal equalities in any given real or complex inner product space. Theorem 5.2. Let D = s,t be a signed (s, t)-simplex in a real or complex inner product space X. Then the following conditions are equivalent: Proof. Immediate from Lemma 3.21 and Theorem 5.2. Corollary 5.4. Let Z be a non-empty metric subspace of a real or complex inner product space X. Then, Z has strict 2-negative type if and only if Z is an affinely independent subset of X (when X is considered as a real vector space). Proof. It suffices to assume that Z = {z 0 , z 1 , . . . z n } for some integer n > 0. The corollary then follows trivially from Corollary 5.3 and Theorem 3.17. There are a number of interesting ways to apply Corollary 5.4. For example, let (X, d) be an infinite metric space of cardinality ψ. The proof of Theorem 1.2 in Lemin may be easily adapted to establish the following result: If (X, d) has strict 2-negative type, then (X, d) may be isometrically embedded into a real inner product space I ψ of Hamel dimension ψ. By Corollary 5.4, the isometric image of (X, d) in I ψ must be affinely independent. Moreover, it follows from Corollary 5.4 that (X, d) may not be isometrically embedded into any real inner product space of Hamel dimension σ < ψ. Conversely, Corollary 5.4 ensures that if (X, d) is isometric to an affinely independent subset of a real inner product space of Hamel dimension ψ, then (X, d) has strict 2-negative type. In summary, we have established the following theorem. Theorem 5.5. A metric space of infinite cardinality ψ has strict 2-negative type if and only if it is isometric to an affinely independent subset of a real inner product space of Hamel dimension ψ. Remark 5.6. Theorem 3.3 in Faver et al. provides a version of Theorem 5.5 that is specific to finite metric spaces. The techniques developed in this paper are notably different from those employed in . It is a fundamental result of Schoenberg that every metric space of (strict) 2-negative type is isometric to a metric subspace of some real Hilbert space. Corollary 5.4 therefore leads to a version of Theorem 4.15 that is specific to Hilbert spaces. Theorem 5.7. A metric space has strict 2-negative type if and only if it is isometric to an affinely independent subset of some real Hilbert space. In particular, no metric space (X, d) of strict 2-negative type is isometric to any affinely dependent metric subspace of any Hilbert space H (when H is considered as a real vector space). Proof. The stated equivalence follows directly from and Corollary 5.4. If Z is an affinely dependent metric subspace of a Hilbert space H (when H is considered as a real vector space), then Z does not have strict 2-negative type by Corollary 5.4. In particular, Z is not isometric to any metric space (X, d) that has strict 2-negative type. We remark that in Theorem 5.5 or Theorem 5.7 the metric space could, for example, be any ultrametric space. This is because all ultrametric spaces have infinite generalized roundness by Theorem 5.1 in Faver et al. and thus strict 2-negative type by Theorem 2.2. Theorems 5.5 and 5.7 imply characterizations of strict p-negative type for all p such that 0 ≤ p ≤ 2. Indeed, suppose that 0 ≤ p ≤ 2 and that d is a metric on a set X. Then the so-called metric transform d p/2 is also a metric on X. Moreover, it is plainly evident that (X, d) has strict p-negative type if and only if (X, d p/2 ) has strict 2-negative type. Thus, combining Theorem 5.5 and 5.7, we obtain the following corollary. (1) A metric space (X, d) has strict p-negative type if and only if (X, d p/2 ) is isometric to an affinely independent subset of some real Hilbert space. (2) A metric space (X, d) of infinite cardinality ψ has strict p-negative type if and only if (X, d p/2 ) is isometric to an affinely independent subset of a real inner product space of Hamel dimension ψ. In relation to a problem of Lemin concerning the isometric embedding of ultrametric spaces into Banach spaces, Shkarin introduced the class M of all finite metric spaces (Z, d), Z = {z 0 , z 1 , . . . , z n }, which admit an isometric embedding φ : Z → (real) ℓ 2 such that the vectors {φ(z k ) − φ(z 0 ) : 1 ≤ k ≤ n} are linearly independent. As noted by Shkarin, it follows from the work of Lemin (as well as several other authors), that the class M contains all finite ultrametric spaces. However, every finite metric space of (strict) 2-negative type admits an isometric embedding into real ℓ 2 by Schoenberg . Combining this result with Corollary 5.4 we obtain a complete description of Shkarin's class M. The purpose of the next section is to take a closer look at linear subspaces of L p -spaces that admit virtually degenerate simplices. Virtually degenerate subspaces of L p -spaces Determining exactly which linear subspaces of L p (Ω, µ) admit a virtually degenerate simplex is a moot question. For clarity of exposition it is helpful to make the following definition. Definition 6.1. Let 0 < p < ∞ and let (Ω, µ) be a measure space. A linear subspace W of L p (Ω, µ) will be called virtually degenerate if it admits a virtually degenerate simplex. The following remark notes some basic structural properties of virtually degenerate linear subspaces of L p -spaces. Remark 6.2. Notice that if W is a virtually degenerate linear subspace of L p (Ω, µ), then: (1) W does not have q-negative type for any q > p, and (2) W does not have strict p-negative type. Moreover, provided 0 < p ≤ 2, it is the case that (3) W does have p-negative type. Of course, no normed linear space has (strict) q-negative type for any q > 2. This is because normed linear spaces are mid-point convex. So points (1), (2) and (3) are really only of interest when 0 < p < 2. It is necessarily the case that some L p -spaces contain linear subspaces that are not virtually degenerate. This is evident from the following celebrated theorem of Bretagnolle, Dacunha-Castelle and Krivine . Theorem 6.3 (Bretagnolle et al. ). Let 0 < p ≤ 2 and let X be a real quasi-normed space. Then X is linearly isometric to a subspace of some L p -space if and only if X has p-negative type. For instance, if 0 < p < q ≤ 2, then L q is linearly isometric to a subspace W of L p . As W has q-negative type, we see that it cannot be a virtually degenerate linear subspace of L p by Remark 6.2. Lemma 4.11 shows that every linear subspace of L p (Ω, µ) with Property E must be virtually degenerate. However, Property E is rather special and it is by no means necessary for virtual degeneracy. Lemma 6.4 provides one means for constructing virtually degenerate linear subspaces of L p (Ω, µ) that do not necessarily have Property E. We preface this lemma with some notational preliminaries. Theorem 6.5. If 0 < p < ∞, then ℓ p has an infinite-dimensional virtually degenerate linear subspace W without Property E. Proof. Let 0 < p < ∞. We construct an infinite-dimensional linear subspace W of ℓ p that does not have Property E but which satisfies the hypotheses of Lemma 6.4. The construction proceeds in the following manner. Let p n denote the nth prime number and define a vector x n = (x n (l)) ∈ ℓ p by setting: for all j, i by construction. Now let W denote the linear subspace of ℓ p spanned by the set S = {x n : n ≥ 1}. As x n is the only vector in S whose p n th coordinate is non-zero we see that S is linearly independent and hence W is infinite-dimensional. Consider two non-zero vectors x, y ∈ W . Say, where κ j , υ k = 0 for all j ∈ J, k ∈ K. We claim that x and y do not have disjoint support. Indeed, if there exists an i ∈ J ∩ K, then both x and y are non-zero in the p i th coordinate. On the other hand, if j ∈ J, k ∈ K and J ∩ K = ∅, then x(p j p k ) = κ j 2 −pj p k and y(p j p k ) = υ k 2 −pjp k are both non-zero. Thus the infinite-dimensional linear subspace W ⊂ ℓ p does not have Property E. However, as we have noted that any two basis vectors x i , x j of W satisfy the conditions of Lemma 6.4, we see that W is virtually degenerate. Note also that W has the stronger property that any finite set of vectors in W have intersecting support. Remark 6.6. It is worth noting that the preceding construction may be tweaked so that the resulting infinite-dimensional linear subspace W ⊂ ℓ p does not satisfy Property E or the condition in Lemma 6.4. As before we let p n denote the nth prime number but this time we define x n = (x n (l)) ∈ ℓ p as follows: x n (l) = p −l n if p n | l, 0 otherwise. Now let W denote the linear subspace of ℓ p spanned by the set S = {x n : n ≥ 1}. As x n is the only vector in S whose p n th coordinate is non-zero we see that S is linearly independent and hence W is infinite-dimensional. Consider two linearly independent vectors x, y ∈ W . Say, where κ j , υ k = 0 for all j ∈ J, k ∈ K. (If j / ∈ J, then we may set κ j = 0, and so on.) We claim that x and y have intersecting support, and that x and y are linearly independent. Indeed, if x and y share identical basis vectors then we need only consider the coordinates L = {p j | j ∈ J}. These coordinates lie in the support of x and y, and if x and y were linearly dependent on L we would have κ j = cυ j for some non-zero constant c and all j ∈ J, and this would imply that x and y are linearly dependent. If x and y do not share identical basis vectors, then we may assume without loss of generality that J \ K = ∅. If j ∈ J \ K and k ∈ K, then x is zero at at most one coordinate among p j p k , (p j p k ) 2 , (p j p k ) 3 , . . . by the uniqueness of any solution to κ j p −l j + κ k p −l k = 0 with respect to l. Moreover, y is non-zero on all of these coordinates. The vectors x and y are linearly independent when restricted to any two of these coordinates on which x is non-zero (by the uniqueness of any solution to κ j p −l j + cp −l k = 0 with respect to l), thereby showing that x and y are linearly independent. It follows that W does not satisfy the hypotheses of Lemma 6.4. We conclude this section with a comment on the special case p = 2. It is clear that every linear subspace of L 2 (Ω, µ) admits a non-degenerate balanced simplex. Therefore no linear subspace of L 2 (Ω, µ) has strict 2-negative type by Corollary 5.3. (In fact, no linear subspace of any normed space has strict 2-negative type by mid-point convexity.) This contrasts nicely with the case 0 < p < 2 where, as we have noted, L p (Ω, µ) may admit linear subspaces of strict p-negative type. For instance, there are linear subspaces of L p (0 < p < 2) that are linearly isometric to L 2 . Such subspaces have 2-negative type and hence strict p-negative type by Theorem 2.2. Open problems In the case p > 2 the classification of all non-trivial p-polygonal equalities in L p (Ω, µ) has not been completely settled by the techniques developed in this paper. This is because one cannot argue on the basis of strict p-negative type for values of p in the range (2, ∞). There are two impediments. One is described in Remark 2.5. The second impediment is that Corollary 4.2 does not hold for values of p in the range (2, ∞). Lemma 4.5 shows that virtual degeneracy is sufficient in the case p > 2. We do not know if it is necessary. For each p > 0 let C p denote the Schatten p-class. It is well-known that C 2 is a Hilbert space under the inner product x, y = tr(y * x), x, y ∈ C 2 . Thus the equality (5.1) stated in Lemma 5.1 is valid for C 2 . On the other hand, provided p = 2, ℘(C p ) = 0. This is due to Lennard et al. in the case p > 2, and Dahma and Lennard in the case 0 < p < 2. It therefore makes sense to ask whether or not C p , p = 2, admits any non-trivial p-polygonal equalities, and if so, whether or not they can be classified geometrically. If, for example, there exists a finite metric subspace X ⊂ C p such that ℘(X) = p, then C p will admit a non-trivial p-polygonal equality. This is a consequence of Theorem 2.3 and it motivates a more general problem. Given a Banach space B, determine all values p ≥ ℘(B) such that ℘(X) = p for some finite metric subspace X ⊂ B. It will then follow that the Banach space B admits a non-trivial p-polygonal equality for all such values of p. Section 6 provides a glimpse of the complexity of virtually degenerate subspaces of L p (Ω, µ). The interesting case is 0 < p < 2 and it would seem to be a worthwhile project to develop new ways to construct or identify virtually degenerate subspaces of L p (Ω, µ). The most challenging problem would appear to be the development of necessary and sufficient conditions for a linear subspace of L p (Ω, µ) to be virtually degenerate.
/** * Abstract calendar exception, to be implemented by more concrete exceptions thrown from our application. * {@link org.folio.calendar.exception.NonspecificCalendarException NonspecificCalendarException} should be used for otherwise unknown errors (e.g. generic Exception or Spring-related exceptions). */ @ToString(callSuper = true) public abstract class AbstractCalendarException extends RuntimeException { /** Constant <code>DEFAULT_STATUS_CODE</code> */ public static final HttpStatus DEFAULT_STATUS_CODE = HttpStatus.BAD_REQUEST; @Getter protected final ErrorCode errorCode; @Getter protected final HttpStatus statusCode; @Getter @NonNull protected final ExceptionParameters parameters; /** * Create an AbstractCalendarException with the given HTTP status code, error * code, message, and format. * * @param cause The exception which caused this (may be null) * @param parameters The parameters causing the exception * @param statusCode The Spring HTTP status code ({@link org.springframework.http.HttpStatus HttpStatus}) * @param errorCode An error code as described in the ErrorResponse API type * @param message A string for the error message */ protected AbstractCalendarException( Throwable cause, ExceptionParameters parameters, HttpStatus statusCode, ErrorCode errorCode, String message ) { super(message, cause); if (parameters == null) { parameters = new ExceptionParameters(); } this.parameters = parameters; this.errorCode = errorCode; this.statusCode = statusCode; } /** * Create a standardized error response for the rest API * * @return An ErrorResponse for API return */ protected ErrorResponse getErrorResponse() { ErrorResponse.ErrorResponseBuilder responseBuilder = ErrorResponse.builder(); responseBuilder = responseBuilder.timestamp(Instant.now()); responseBuilder = responseBuilder.status(this.getStatusCode().value()); // Can only have one exception at a time Error.ErrorBuilder errorBuilder = Error.builder(); errorBuilder = errorBuilder.code(this.getErrorCode()); errorBuilder = errorBuilder.message(this.getMessage()); for (StackTraceElement frame : this.getStackTrace()) { errorBuilder = errorBuilder.traceItem(frame.toString()); } if (this.getCause() != null) { errorBuilder = errorBuilder.traceItem("----------------- CAUSED BY -----------------"); errorBuilder = errorBuilder.traceItem(this.getCause().getMessage()); for (StackTraceElement frame : this.getCause().getStackTrace()) { errorBuilder = errorBuilder.traceItem(frame.toString()); } } Map<String, Object> errorParameters = new HashMap<>(); for (Entry<String, Object> parameter : this.getParameters().getMap().entrySet()) { errorParameters.put(parameter.getKey(), parameter.getValue()); } errorBuilder = errorBuilder.parameters(errorParameters); responseBuilder.error(errorBuilder.build()); return responseBuilder.build(); } /** * Get a ResponseEntity to be returned to the API * * @return {@link org.springframework.http.ResponseEntity} with {@link org.folio.calendar.domain.dto.ErrorResponse} body. */ public ResponseEntity<ErrorResponse> getErrorResponseEntity() { return new ResponseEntity<>(this.getErrorResponse(), this.getStatusCode()); } }
from .breadthFirstTraversal import breadthFirstTraversal from dataStructures.binarySearchTree.bst import BST from pytest import fixture @fixture func newBst() { return BST() @fixture func filledBst() { return BST([4, 3, 2, 1, 8, 6, 12, 9]) @fixture func leftBst() { return BST(range(9, -9, -2)) @fixture func rightBst() { return BST(range(-9, 9, 3)) func TestEmptyBstBreadthFirst(newBst) { breadthFirstTraversal(newBst) func TestFilledBstBreadthFirst(filledBst) { breadthFirstTraversal(filledBst) func TestLeftBstBreadthFirst(leftBst) { breadthFirstTraversal(leftBst) func TestRightBstBreadthFirst(rightBst) { breadthFirstTraversal(rightBst) func TestRightBstBreadthFirstOrdering(rightBst) { lst = [] rightBst.breadthFirst(lst.append) assert lst == list(range(-9, 9, 3))
/*++ Copyright (c) 1991-1999, Microsoft Corporation All rights reserved. Module Name: slitest.c Abstract: Test module for NLS API SetLocaleInfo. NOTE: This code was simply hacked together quickly in order to test the different code modules of the NLS component. This is NOT meant to be a formal regression test. Revision History: 07-14-93 JulieB Created. --*/ // // Include Files. // #include "nlstest.h" // // Constant Declarations. // #define BUFSIZE 100 // buffer size in wide chars #define LCTYPE_INVALID 0x0000002 // invalid LCTYPE // // Global Variables. // LCID Locale; WCHAR lpLCData[BUFSIZE]; WCHAR pTemp[BUFSIZE]; WCHAR pSList[BUFSIZE]; WCHAR pSTimeFormat[BUFSIZE]; WCHAR pSTime[BUFSIZE]; WCHAR pITime[BUFSIZE]; WCHAR pSShortDate[BUFSIZE]; WCHAR pSDate[BUFSIZE]; // // Forward Declarations. // BOOL InitSetLocInfo(); int SLI_BadParamCheck(); int SLI_NormalCase(); int SLI_Ansi(); //////////////////////////////////////////////////////////////////////////// // // TestSetLocaleInfo // // Test routine for SetLocaleInfoW API. // // 07-14-93 JulieB Created. //////////////////////////////////////////////////////////////////////////// int TestSetLocaleInfo() { int ErrCount = 0; // error count // // Print out what's being done. // printf("\n\nTESTING SetLocaleInfoW...\n\n"); // // Initialize global variables. // if (!InitSetLocInfo()) { printf("\nABORTED TestSetLocaleInfo: Could not Initialize.\n"); return (1); } // // Test bad parameters. // ErrCount += SLI_BadParamCheck(); // // Test normal cases. // ErrCount += SLI_NormalCase(); // // Test Ansi version. // ErrCount += SLI_Ansi(); // // Print out result. // printf("\nSetLocaleInfoW: ERRORS = %d\n", ErrCount); // // Return total number of errors found. // return (ErrCount); } //////////////////////////////////////////////////////////////////////////// // // InitSetLocInfo // // This routine initializes the global variables. If no errors were // encountered, then it returns TRUE. Otherwise, it returns FALSE. // // 07-14-93 JulieB Created. //////////////////////////////////////////////////////////////////////////// BOOL InitSetLocInfo() { // // Make a Locale. // Locale = MAKELCID(0x0409, 0); // // Save the SLIST value to be restored later. // if ( !GetLocaleInfoW( Locale, LOCALE_SLIST, pSList, BUFSIZE ) ) { printf("ERROR: Initialization SLIST - error = %d\n", GetLastError()); return (FALSE); } if ( !GetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, pSTimeFormat, BUFSIZE ) ) { printf("ERROR: Initialization STIMEFORMAT - error = %d\n", GetLastError()); return (FALSE); } if ( !GetLocaleInfoW( Locale, LOCALE_STIME, pSTime, BUFSIZE ) ) { printf("ERROR: Initialization STIME - error = %d\n", GetLastError()); return (FALSE); } if ( !GetLocaleInfoW( Locale, LOCALE_ITIME, pITime, BUFSIZE ) ) { printf("ERROR: Initialization ITIME - error = %d\n", GetLastError()); return (FALSE); } if ( !GetLocaleInfoW( Locale, LOCALE_SSHORTDATE, pSShortDate, BUFSIZE ) ) { printf("ERROR: Initialization SSHORTDATE - error = %d\n", GetLastError()); return (FALSE); } if ( !GetLocaleInfoW( Locale, LOCALE_SDATE, pSDate, BUFSIZE ) ) { printf("ERROR: Initialization SDATE - error = %d\n", GetLastError()); return (FALSE); } // // Return success. // return (TRUE); } //////////////////////////////////////////////////////////////////////////// // // SLI_BadParamCheck // // This routine passes in bad parameters to the API routines and checks to // be sure they are handled properly. The number of errors encountered // is returned to the caller. // // 07-14-93 JulieB Created. //////////////////////////////////////////////////////////////////////////// int SLI_BadParamCheck() { int NumErrors = 0; // error count - to be returned int rc; // return code // // Bad Locale. // // Variation 1 - Bad Locale rc = SetLocaleInfoW( (LCID)333, LOCALE_SLIST, L"," ); CheckReturnBadParam( rc, 0, ERROR_INVALID_PARAMETER, "Bad Locale", &NumErrors ); // // Null Pointers. // // Variation 1 - lpLCData = NULL rc = SetLocaleInfoW( Locale, LOCALE_SLIST, NULL ); CheckReturnBadParam( rc, 0, ERROR_INVALID_PARAMETER, "lpLCData NULL", &NumErrors ); // // Zero or Invalid Type. // // Variation 1 - LCType = invalid rc = SetLocaleInfoW( Locale, LCTYPE_INVALID, L"," ); CheckReturnBadParam( rc, 0, ERROR_INVALID_FLAGS, "LCType invalid", &NumErrors ); // Variation 2 - LCType = 0 rc = SetLocaleInfoW( Locale, 0, L"," ); CheckReturnBadParam( rc, 0, ERROR_INVALID_FLAGS, "LCType zero", &NumErrors ); // Variation 1 - Use CP ACP, LCType = invalid rc = SetLocaleInfoW( Locale, LOCALE_USE_CP_ACP | LCTYPE_INVALID, L"," ); CheckReturnBadParam( rc, 0, ERROR_INVALID_FLAGS, "Use CP ACP, LCType invalid", &NumErrors ); // // Return total number of errors found. // return (NumErrors); } //////////////////////////////////////////////////////////////////////////// // // SLI_NormalCase // // This routine tests the normal cases of the API routine. // // 07-14-93 JulieB Created. //////////////////////////////////////////////////////////////////////////// int SLI_NormalCase() { int NumErrors = 0; // error count - to be returned int rc; // return code #ifdef PERF DbgBreakPoint(); #endif // // Locales. // // Variation 1 - System Default Locale rc = SetLocaleInfoW( LOCALE_SYSTEM_DEFAULT, LOCALE_SLIST, L"::" ); CheckReturnEqual( rc, FALSE, "SET - system default locale", &NumErrors ); rc = GetLocaleInfoW( LOCALE_SYSTEM_DEFAULT, LOCALE_SLIST, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"::", "GET - system default locale", &NumErrors ); // Variation 2 - Current User Locale rc = SetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SLIST, L";;" ); CheckReturnEqual( rc, FALSE, "SET - current user locale", &NumErrors ); rc = GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_SLIST, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L";;", "GET - current user locale", &NumErrors ); // // Use CP ACP. // // Variation 1 - Use CP ACP, System Default Locale rc = SetLocaleInfoW( LOCALE_SYSTEM_DEFAULT, LOCALE_USE_CP_ACP | LOCALE_SLIST, L".." ); CheckReturnEqual( rc, FALSE, "SET - Use CP ACP, system default locale", &NumErrors ); rc = GetLocaleInfoW( LOCALE_SYSTEM_DEFAULT, LOCALE_USE_CP_ACP | LOCALE_SLIST, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"..", "GET - Use CP ACP, system default locale", &NumErrors ); // // LCTYPE values. // // Variation 1 - SLIST rc = SetLocaleInfoW( Locale, LOCALE_SLIST, L"::::" ); CheckReturnEqual( rc, TRUE, "SET - MAX SLIST", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SLIST, L"''" ); CheckReturnEqual( rc, FALSE, "SET - SLIST", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SLIST, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"''", "GET - SLIST", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SLIST, pSList ); CheckReturnEqual( rc, FALSE, "ReSET - SLIST", &NumErrors ); // Variation 2 - IMEASURE rc = GetLocaleInfoW( Locale, LOCALE_IMEASURE, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current IMEASURE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IMEASURE, L"2" ); CheckReturnEqual( rc, TRUE, "SET - invalid IMEASURE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IMEASURE, L"0" ); CheckReturnEqual( rc, FALSE, "SET - IMEASURE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IMEASURE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"0", "GET - IMEASURE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IMEASURE, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - IMEASURE", &NumErrors ); // Variation 3 - SDECIMAL rc = GetLocaleInfoW( Locale, LOCALE_SDECIMAL, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SDECIMAL", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDECIMAL, L"[][]" ); CheckReturnEqual( rc, TRUE, "SET - invalid SDECIMAL", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDECIMAL, L"6" ); CheckReturnEqual( rc, TRUE, "SET - invalid SDECIMAL (6)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDECIMAL, L"{" ); CheckReturnEqual( rc, FALSE, "SET - SDECIMAL", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SDECIMAL, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"{", "GET - SDECIMAL", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDECIMAL, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SDECIMAL", &NumErrors ); // Variation 4 - STHOUSAND rc = GetLocaleInfoW( Locale, LOCALE_STHOUSAND, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current STHOUSAND", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STHOUSAND, L"[][]" ); CheckReturnEqual( rc, TRUE, "SET - invalid STHOUSAND", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STHOUSAND, L"6" ); CheckReturnEqual( rc, TRUE, "SET - invalid STHOUSAND (6)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STHOUSAND, L"{" ); CheckReturnEqual( rc, FALSE, "SET - STHOUSAND", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STHOUSAND, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"{", "GET - STHOUSAND", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STHOUSAND, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - STHOUSAND", &NumErrors ); // Variation 5 - SGROUPING rc = GetLocaleInfoW( Locale, LOCALE_SGROUPING, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SGROUPING", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, L"3;" ); CheckReturnEqual( rc, TRUE, "SET - invalid SGROUPING 1", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, L"3;2;" ); CheckReturnEqual( rc, TRUE, "SET - invalid SGROUPING 2", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, L"10;0" ); CheckReturnEqual( rc, TRUE, "SET - invalid SGROUPING 3", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, L"3:0" ); CheckReturnEqual( rc, TRUE, "SET - invalid SGROUPING 4", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, L"5;0" ); CheckReturnEqual( rc, FALSE, "SET - SGROUPING", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SGROUPING, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"5;0", "GET - SGROUPING", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, L"3;2;0" ); CheckReturnEqual( rc, FALSE, "SET - SGROUPING", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SGROUPING, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"3;2;0", "GET - SGROUPING", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SGROUPING, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SGROUPING", &NumErrors ); // Variation 6 - IDIGITS rc = GetLocaleInfoW( Locale, LOCALE_IDIGITS, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current IDIGITS", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IDIGITS, L"a" ); CheckReturnEqual( rc, TRUE, "SET - invalid IDIGITS", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IDIGITS, L"5" ); CheckReturnEqual( rc, FALSE, "SET - IDIGITS", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IDIGITS, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"5", "GET - IDIGITS", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IDIGITS, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - IDIGITS", &NumErrors ); // Variation 7 - ILZERO rc = GetLocaleInfoW( Locale, LOCALE_ILZERO, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current ILZERO", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ILZERO, L"2" ); CheckReturnEqual( rc, TRUE, "SET - invalid ILZERO", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ILZERO, L"1" ); CheckReturnEqual( rc, FALSE, "SET - ILZERO", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ILZERO, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - ILZERO", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ILZERO, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - ILZERO", &NumErrors ); // Variation 8 - SCURRENCY rc = GetLocaleInfoW( Locale, LOCALE_SCURRENCY, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SCURRENCY", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SCURRENCY, L"[][][]" ); CheckReturnEqual( rc, TRUE, "SET - invalid SCURRENCY", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SCURRENCY, L"x5" ); CheckReturnEqual( rc, TRUE, "SET - invalid SCURRENCY (x5)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SCURRENCY, L"%@%" ); CheckReturnEqual( rc, FALSE, "SET - SCURRENCY", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SCURRENCY, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"%@%", "GET - SCURRENCY", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SCURRENCY, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SCURRENCY", &NumErrors ); // Variation 9 - SMONDECIMALSEP rc = GetLocaleInfoW( Locale, LOCALE_SMONDECIMALSEP, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SMONDECIMALSEP", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONDECIMALSEP, L"{}{}" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONDECIMALSEP", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONDECIMALSEP, L"6" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONDECIMALSEP (6)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONDECIMALSEP, L"%" ); CheckReturnEqual( rc, FALSE, "SET - SMONDECIMALSEP", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SMONDECIMALSEP, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"%", "GET - SMONDECIMALSEP", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONDECIMALSEP, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SMONDECIMALSEP", &NumErrors ); // Variation 10 - SMONTHOUSANDSEP rc = GetLocaleInfoW( Locale, LOCALE_SMONTHOUSANDSEP, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SMONTHOUSANDSEP", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONTHOUSANDSEP, L"{}{}" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONTHOUSANDSEP", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONTHOUSANDSEP, L"6" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONTHOUSANDSEP (6)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONTHOUSANDSEP, L"%" ); CheckReturnEqual( rc, FALSE, "SET - SMONTHOUSANDSEP", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SMONTHOUSANDSEP, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"%", "GET - SMONTHOUSANDSEP", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONTHOUSANDSEP, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SMONTHOUSANDSEP", &NumErrors ); // Variation 11 - SMONGROUPING rc = GetLocaleInfoW( Locale, LOCALE_SMONGROUPING, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SMONGROUPING", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, L"3;" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONGROUPING 1", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, L"3;2;" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONGROUPING 2", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, L"10;0" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONGROUPING 3", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, L"3:0" ); CheckReturnEqual( rc, TRUE, "SET - invalid SMONGROUPING 4", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, L"5;0" ); CheckReturnEqual( rc, FALSE, "SET - SMONGROUPING", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SMONGROUPING, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"5;0", "GET - SMONGROUPING", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, L"3;2;0" ); CheckReturnEqual( rc, FALSE, "SET - SMONGROUPING", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SMONGROUPING, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"3;2;0", "GET - SMONGROUPING", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SMONGROUPING, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SMONGROUPING", &NumErrors ); // Variation 12 - ICURRDIGITS rc = GetLocaleInfoW( Locale, LOCALE_ICURRDIGITS, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current ICURRDIGITS", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICURRDIGITS, L"aa" ); CheckReturnEqual( rc, TRUE, "SET - invalid ICURRDIGITS", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICURRDIGITS, L"85" ); CheckReturnEqual( rc, FALSE, "SET - ICURRDIGITS", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ICURRDIGITS, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"85", "GET - ICURRDIGITS", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICURRDIGITS, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - ICURRDIGITS", &NumErrors ); // Variation 13 - ICURRENCY rc = GetLocaleInfoW( Locale, LOCALE_ICURRENCY, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current ICURRENCY", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICURRENCY, L"4" ); CheckReturnEqual( rc, TRUE, "SET - invalid ICURRENCY", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICURRENCY, L"3" ); CheckReturnEqual( rc, FALSE, "SET - ICURRENCY", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ICURRENCY, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"3", "GET - ICURRENCY", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICURRENCY, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - ICURRENCY", &NumErrors ); // Variation 14 - INEGCURR rc = GetLocaleInfoW( Locale, LOCALE_INEGCURR, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current INEGCURR", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_INEGCURR, L"16" ); CheckReturnEqual( rc, TRUE, "SET - invalid INEGCURR", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_INEGCURR, L"13" ); CheckReturnEqual( rc, FALSE, "SET - INEGCURR", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_INEGCURR, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"13", "GET - INEGCURR", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_INEGCURR, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - INEGCURR", &NumErrors ); // Variation 15 - SPOSITIVESIGN rc = GetLocaleInfoW( Locale, LOCALE_SPOSITIVESIGN, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SPOSITIVESIGN", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SPOSITIVESIGN, L"{}{}{" ); CheckReturnEqual( rc, TRUE, "SET - invalid SPOSITIVESIGN", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SPOSITIVESIGN, L"x5" ); CheckReturnEqual( rc, TRUE, "SET - invalid SPOSITIVESIGN (x5)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SPOSITIVESIGN, L"[]" ); CheckReturnEqual( rc, FALSE, "SET - SPOSITIVESIGN", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SPOSITIVESIGN, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"[]", "GET - SPOSITIVESIGN", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SPOSITIVESIGN, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SPOSITIVESIGN", &NumErrors ); // Variation 16 - SNEGATIVESIGN rc = GetLocaleInfoW( Locale, LOCALE_SNEGATIVESIGN, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - SNEGATIVESIGN", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SNEGATIVESIGN, L"{}{}{" ); CheckReturnEqual( rc, TRUE, "SET - invalid SNEGATIVESIGN", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SNEGATIVESIGN, L"x5" ); CheckReturnEqual( rc, TRUE, "SET - invalid SNEGATIVESIGN (x5)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SNEGATIVESIGN, L"[]" ); CheckReturnEqual( rc, FALSE, "SET - SNEGATIVESIGN", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SNEGATIVESIGN, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"[]", "GET - SNEGATIVESIGN", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SNEGATIVESIGN, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SNEGATIVESIGN", &NumErrors ); // Variation 17 - STIMEFORMAT rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, L"HHHHHmmmmmsssssHHHHHmmmmmsssssHHHHHmmmmmsssssHHHHHmmmmmsssssHHHHHmmmmmsssssHHHHH" ); CheckReturnEqual( rc, TRUE, "SET - invalid STIMEFORMAT", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, L"tt HH/mm/ss" ); CheckReturnEqual( rc, FALSE, "SET - STIMEFORMAT", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"tt HH/mm/ss", "GET - STIMEFORMAT", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIME, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"/", "GET - STIME from STIMEFORMAT", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ITIME, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - ITIME from STIMEFORMAT", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ITLZERO, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - ITLZERO from STIMEFORMAT", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ITIMEMARKPOSN, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - ITIMEMARKPOSN from STIMEFORMAT", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, pSTimeFormat ); CheckReturnEqual( rc, FALSE, "ReSET - STIMEFORMAT", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIME, pSTime ); CheckReturnEqual( rc, FALSE, "ReSET - STIME from STIMEFORMAT", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ITIME, pITime ); CheckReturnEqual( rc, FALSE, "ReSET - ITIME from STIMEFORMAT", &NumErrors ); // Variation 18 - STIME rc = SetLocaleInfoW( Locale, LOCALE_STIME, L"{**}" ); CheckReturnEqual( rc, TRUE, "SET - invalid STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIME, L"x5" ); CheckReturnEqual( rc, TRUE, "SET - invalid STIME (x5)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, L"HH/mm/ss" ); CheckReturnEqual( rc, FALSE, "SET - STIMEFORMAT from STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIME, L"[]" ); CheckReturnEqual( rc, FALSE, "SET - STIME", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIME, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"[]", "GET - STIME", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"HH[]mm[]ss", "GET - STIMEFORMAT from STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIME, pSTime ); CheckReturnEqual( rc, FALSE, "ReSET - STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, pSTimeFormat ); CheckReturnEqual( rc, FALSE, "ReSET - STIMEFORMAT from STIME", &NumErrors ); // Variation 18.1 - STIME rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, L"HH/mm/ss' ('hh' oclock)'" ); CheckReturnEqual( rc, FALSE, "SET - STIMEFORMAT from STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIME, L"[]" ); CheckReturnEqual( rc, FALSE, "SET - STIME", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIME, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"[]", "GET - STIME", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"HH[]mm[]ss' ('hh' oclock)'", "GET - STIMEFORMAT from STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIME, pSTime ); CheckReturnEqual( rc, FALSE, "ReSET - STIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, pSTimeFormat ); CheckReturnEqual( rc, FALSE, "ReSET - STIMEFORMAT from STIME", &NumErrors ); // Variation 19 - ITIME rc = SetLocaleInfoW( Locale, LOCALE_ITIME, L"2" ); CheckReturnEqual( rc, TRUE, "SET - invalid ITIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, L"hh/mm/ss" ); CheckReturnEqual( rc, FALSE, "SET - STIMEFORMAT from ITIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ITIME, L"1" ); CheckReturnEqual( rc, FALSE, "SET - ITIME", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ITIME, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - ITIME", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"HH/mm/ss", "GET - STIMEFORMAT from ITIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ITIME, pITime ); CheckReturnEqual( rc, FALSE, "ReSET - ITIME", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_STIMEFORMAT, pSTimeFormat ); CheckReturnEqual( rc, FALSE, "ReSET - STIMEFORMAT from ITIME", &NumErrors ); // Variation 20 - S1159 rc = GetLocaleInfoW( Locale, LOCALE_S1159, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current S1159", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_S1159, L"123456789" ); CheckReturnEqual( rc, TRUE, "SET - invalid S1159", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_S1159, L"DAWN" ); CheckReturnEqual( rc, FALSE, "SET - S1159", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_S1159, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"DAWN", "GET - S1159", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_S1159, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - S1159", &NumErrors ); // Variation 21 - S2359 rc = GetLocaleInfoW( Locale, LOCALE_S2359, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - S2359", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_S2359, L"123456789" ); CheckReturnEqual( rc, TRUE, "SET - invalid S2359", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_S2359, L"DUSK" ); CheckReturnEqual( rc, FALSE, "SET - S2359", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_S2359, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"DUSK", "GET - S2359", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_S2359, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - S2359", &NumErrors ); // Variation 22 - SSHORTDATE rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, L"dddddMMMMMyyyyydddddMMMMMyyyyydddddMMMMMyyyyydddddMMMMMyyyyydddddMMMMMyyyyyddddd" ); CheckReturnEqual( rc, TRUE, "SET - invalid SSHORTDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, L"yyyy:MM:dd" ); CheckReturnEqual( rc, FALSE, "SET - SSHORTDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SSHORTDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"yyyy:MM:dd", "GET - SSHORTDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L":", "GET - SDATE from SSHORTDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"2", "GET - IDATE from SSHORTDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IMONLZERO, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - IMONLZERO from SSHORTDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IDAYLZERO, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - IDAYLZERO from SSHORTDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ICENTURY, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - ICENTURY from SSHORTDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, pSShortDate ); CheckReturnEqual( rc, FALSE, "ReSET - SSHORTDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDATE, pSDate ); CheckReturnEqual( rc, FALSE, "ReSET - SDATE from SSHORTDATE", &NumErrors ); // Variation 23 - SDATE rc = SetLocaleInfoW( Locale, LOCALE_SDATE, L"{}{}" ); CheckReturnEqual( rc, TRUE, "SET - invalid SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDATE, L"6" ); CheckReturnEqual( rc, TRUE, "SET - invalid SDATE (6)", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, L"yy:MM:dd" ); CheckReturnEqual( rc, FALSE, "SET - SSHORTDATE from SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDATE, L"+" ); CheckReturnEqual( rc, FALSE, "SET - SDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"+", "GET - SDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SSHORTDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"yy+MM+dd", "GET - SSHORTDATE from SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDATE, pSDate ); CheckReturnEqual( rc, FALSE, "ReSET - SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, pSShortDate ); CheckReturnEqual( rc, FALSE, "ReSET - SSHORTDATE from SDATE", &NumErrors ); // Variation 23.1 - SDATE rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, L"yy:MM:dd' ('ddd')'" ); CheckReturnEqual( rc, FALSE, "SET - SSHORTDATE from SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDATE, L"+" ); CheckReturnEqual( rc, FALSE, "SET - SDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"+", "GET - SDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SSHORTDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"yy+MM+dd' ('ddd')'", "GET - SSHORTDATE from SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SDATE, pSDate ); CheckReturnEqual( rc, FALSE, "ReSET - SDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SSHORTDATE, pSShortDate ); CheckReturnEqual( rc, FALSE, "ReSET - SSHORTDATE from SDATE", &NumErrors ); // Variation 24 - SLONGDATE rc = GetLocaleInfoW( Locale, LOCALE_SLONGDATE, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current SLONGDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SLONGDATE, L"dddddMMMMMyyyyydddddMMMMMyyyyydddddMMMMMyyyyydddddMMMMMyyyyydddddMMMMMyyyyyddddd" ); CheckReturnEqual( rc, TRUE, "SET - invalid SLONGDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SLONGDATE, L"yy, MMMM dd, dddd" ); CheckReturnEqual( rc, FALSE, "SET - SLONGDATE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_SLONGDATE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"yy, MMMM dd, dddd", "GET - SLONGDATE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_SLONGDATE, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - SLONGDATE", &NumErrors ); // Variation 25 - ICALENDARTYPE rc = GetLocaleInfoW( Locale, LOCALE_ICALENDARTYPE, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current ICALENDARTYPE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICALENDARTYPE, L"0" ); CheckReturnEqual( rc, TRUE, "SET - invalid ICALENDARTYPE 0", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICALENDARTYPE, L"8" ); CheckReturnEqual( rc, TRUE, "SET - invalid ICALENDARTYPE 8", &NumErrors ); rc = SetLocaleInfoW( 0x0411, LOCALE_ICALENDARTYPE, L"3" ); CheckReturnEqual( rc, FALSE, "SET - ICALENDARTYPE", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_ICALENDARTYPE, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"3", "GET - ICALENDARTYPE", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_ICALENDARTYPE, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - ICALENDARTYPE", &NumErrors ); // Variation 26 - IFIRSTDAYOFWEEK rc = GetLocaleInfoW( Locale, LOCALE_IFIRSTDAYOFWEEK, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current IFIRSTDAYOFWEEK", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTDAYOFWEEK, L"7" ); CheckReturnEqual( rc, TRUE, "SET - invalid IFIRSTDAYOFWEEK", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTDAYOFWEEK, L"3" ); CheckReturnEqual( rc, FALSE, "SET - IFIRSTDAYOFWEEK", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IFIRSTDAYOFWEEK, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"3", "GET - IFIRSTDAYOFWEEK", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTDAYOFWEEK, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - IFIRSTDAYOFWEEK", &NumErrors ); // Variation 27 - IFIRSTWEEKOFYEAR rc = GetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, pTemp, BUFSIZE ); CheckReturnEqual( rc, 0, "GET - current IFIRSTWEEKOFYEAR", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, L"3" ); CheckReturnEqual( rc, TRUE, "SET - invalid IFIRSTWEEKOFYEAR", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, L"1" ); CheckReturnEqual( rc, FALSE, "SET - IFIRSTWEEKOFYEAR", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"1", "GET - IFIRSTWEEKOFYEAR", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, L"2" ); CheckReturnEqual( rc, FALSE, "SET - IFIRSTWEEKOFYEAR 2", &NumErrors ); rc = GetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"2", "GET - IFIRSTWEEKOFYEAR 2", &NumErrors ); rc = SetLocaleInfoW( Locale, LOCALE_IFIRSTWEEKOFYEAR, pTemp ); CheckReturnEqual( rc, FALSE, "ReSET - IFIRSTWEEKOFYEAR", &NumErrors ); // // Return total number of errors found. // return (NumErrors); } //////////////////////////////////////////////////////////////////////////// // // SLI_Ansi // // This routine tests the Ansi version of the API routine. // // 07-14-93 JulieB Created. //////////////////////////////////////////////////////////////////////////// int SLI_Ansi() { int NumErrors = 0; // error count - to be returned int rc; // return code // // SetLocaleInfoA. // // Variation 1 - SList rc = SetLocaleInfoA( 0x0409, LOCALE_SLIST, "::" ); CheckReturnEqual( rc, FALSE, "SET - system default locale", &NumErrors ); rc = GetLocaleInfoW( 0x0409, LOCALE_SLIST, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"::", "GET - system default locale", &NumErrors ); // Variation 2 - Use CP ACP, SList rc = SetLocaleInfoA( 0x0409, LOCALE_USE_CP_ACP | LOCALE_SLIST, ".." ); CheckReturnEqual( rc, FALSE, "SET - Use CP ACP, system default locale", &NumErrors ); rc = GetLocaleInfoW( 0x0409, LOCALE_USE_CP_ACP | LOCALE_SLIST, lpLCData, BUFSIZE ); CheckReturnValidW( rc, -1, lpLCData, L"..", "GET - Use CP ACP, system default locale", &NumErrors ); // // Reset the slist value. // rc = SetLocaleInfoW( Locale, LOCALE_SLIST, pSList ); CheckReturnEqual( rc, FALSE, "ReSET - SLIST", &NumErrors ); // // Return total number of errors found. // return (NumErrors); }
<filename>cargo/vendor/windows-sys-0.32.0/src/Windows/Win32/Networking/ActiveDirectory/mod.rs #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)] #[link(name = "windows")] extern "system" { #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn ADsBuildEnumerator(padscontainer: IADsContainer, ppenumvariant: *mut super::super::System::Ole::IEnumVARIANT) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn ADsBuildVarArrayInt(lpdwobjecttypes: *mut u32, dwobjecttypes: u32, pvar: *mut super::super::System::Com::VARIANT) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn ADsBuildVarArrayStr(lpppathnames: *const super::super::Foundation::PWSTR, dwpathnames: u32, pvar: *mut super::super::System::Com::VARIANT) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsDecodeBinaryData(szsrcdata: super::super::Foundation::PWSTR, ppbdestdata: *mut *mut u8, pdwdestlen: *mut u32) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsEncodeBinaryData(pbsrcdata: *mut u8, dwsrclen: u32, ppszdestdata: *mut super::super::Foundation::PWSTR) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn ADsEnumerateNext(penumvariant: super::super::System::Ole::IEnumVARIANT, celements: u32, pvar: *mut super::super::System::Com::VARIANT, pcelementsfetched: *mut u32) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_System_Ole'*"] #[cfg(feature = "Win32_System_Ole")] pub fn ADsFreeEnumerator(penumvariant: super::super::System::Ole::IEnumVARIANT) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsGetLastError(lperror: *mut u32, lperrorbuf: super::super::Foundation::PWSTR, dwerrorbuflen: u32, lpnamebuf: super::super::Foundation::PWSTR, dwnamebuflen: u32) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsGetObject(lpszpathname: super::super::Foundation::PWSTR, riid: *const ::windows_sys::core::GUID, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsOpenObject(lpszpathname: super::super::Foundation::PWSTR, lpszusername: super::super::Foundation::PWSTR, lpszpassword: super::super::Foundation::PWSTR, dwreserved: ADS_AUTHENTICATION_ENUM, riid: *const ::windows_sys::core::GUID, ppobject: *mut *mut ::core::ffi::c_void) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsPropCheckIfWritable(pwzattr: super::super::Foundation::PWSTR, pwritableattrs: *const ADS_ATTR_INFO) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub fn ADsPropCreateNotifyObj(pappthddataobj: super::super::System::Com::IDataObject, pwzadsobjname: super::super::Foundation::PWSTR, phnotifyobj: *mut super::super::Foundation::HWND) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsPropGetInitInfo(hnotifyobj: super::super::Foundation::HWND, pinitparams: *mut ADSPROPINITPARAMS) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsPropSendErrorMessage(hnotifyobj: super::super::Foundation::HWND, perror: *mut ADSPROPERROR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsPropSetHwnd(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsPropSetHwndWithTitle(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND, ptztitle: *const i8) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsPropShowErrorDialog(hnotifyobj: super::super::Foundation::HWND, hpage: super::super::Foundation::HWND) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ADsSetLastError(dwerr: u32, pszerror: super::super::Foundation::PWSTR, pszprovider: super::super::Foundation::PWSTR); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn AdsFreeAdsValues(padsvalues: *mut ADSVALUE, dwnumvalues: u32); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn AdsTypeToPropVariant(padsvalues: *mut ADSVALUE, dwnumvalues: u32, pvariant: *mut super::super::System::Com::VARIANT) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn AllocADsMem(cb: u32) -> *mut ::core::ffi::c_void; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn AllocADsStr(pstr: super::super::Foundation::PWSTR) -> super::super::Foundation::PWSTR; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Security', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn BinarySDToSecurityDescriptor(psecuritydescriptor: *mut super::super::Security::SECURITY_DESCRIPTOR, pvarsec: *mut super::super::System::Com::VARIANT, pszservername: super::super::Foundation::PWSTR, username: super::super::Foundation::PWSTR, password: <PASSWORD>STR, dwflags: u32) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsAddSidHistoryA(hds: super::super::Foundation::HANDLE, flags: u32, srcdomain: super::super::Foundation::PSTR, srcprincipal: super::super::Foundation::PSTR, srcdomaincontroller: super::super::Foundation::PSTR, srcdomaincreds: *const ::core::ffi::c_void, dstdomain: super::super::Foundation::PSTR, dstprincipal: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsAddSidHistoryW(hds: super::super::Foundation::HANDLE, flags: u32, srcdomain: super::super::Foundation::PWSTR, srcprincipal: super::super::Foundation::PWSTR, srcdomaincontroller: super::super::Foundation::PWSTR, srcdomaincreds: *const ::core::ffi::c_void, dstdomain: super::super::Foundation::PWSTR, dstprincipal: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Networking_WinSock'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] pub fn DsAddressToSiteNamesA(computername: super::super::Foundation::PSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Networking_WinSock'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] pub fn DsAddressToSiteNamesExA(computername: super::super::Foundation::PSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PSTR, subnetnames: *mut *mut super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Networking_WinSock'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] pub fn DsAddressToSiteNamesExW(computername: super::super::Foundation::PWSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PWSTR, subnetnames: *mut *mut super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Networking_WinSock'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] pub fn DsAddressToSiteNamesW(computername: super::super::Foundation::PWSTR, entrycount: u32, socketaddresses: *const super::WinSock::SOCKET_ADDRESS, sitenames: *mut *mut super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindByInstanceA(servername: super::super::Foundation::PSTR, annotation: super::super::Foundation::PSTR, instanceguid: *const ::windows_sys::core::GUID, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindByInstanceW(servername: super::super::Foundation::PWSTR, annotation: super::super::Foundation::PWSTR, instanceguid: *const ::windows_sys::core::GUID, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PWSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindToISTGA(sitename: super::super::Foundation::PSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindToISTGW(sitename: super::super::Foundation::PWSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindWithCredA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindWithCredW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindWithSpnA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindWithSpnExA(domaincontrollername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindWithSpnExW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PWSTR, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindWithSpnW(domaincontrollername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, authidentity: *const ::core::ffi::c_void, serviceprincipalname: super::super::Foundation::PWSTR, phds: *mut super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsBindingSetTimeout(hds: super::super::Foundation::HANDLE, ctimeoutsecs: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_Shell'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] pub fn DsBrowseForContainerA(pinfo: *mut DSBROWSEINFOA) -> i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_Shell'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] pub fn DsBrowseForContainerW(pinfo: *mut DSBROWSEINFOW) -> i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsClientMakeSpnForTargetServerA(serviceclass: super::super::Foundation::PSTR, servicename: super::super::Foundation::PSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsClientMakeSpnForTargetServerW(serviceclass: super::super::Foundation::PWSTR, servicename: super::super::Foundation::PWSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackNamesA(hds: super::super::Foundation::HANDLE, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, cnames: u32, rpnames: *const super::super::Foundation::PSTR, ppresult: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackNamesW(hds: super::super::Foundation::HANDLE, flags: DS_NAME_FLAGS, formatoffered: DS_NAME_FORMAT, formatdesired: DS_NAME_FORMAT, cnames: u32, rpnames: *const super::super::Foundation::PWSTR, ppresult: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackSpn2A(pszspn: super::super::Foundation::PSTR, cspn: u32, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PSTR, pinstanceport: *mut u16) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackSpn2W(pszspn: super::super::Foundation::PWSTR, cspn: u32, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PWSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pinstanceport: *mut u16) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackSpn3W(pszspn: super::super::Foundation::PWSTR, cspn: u32, pchostname: *mut u32, hostname: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pportnumber: *mut u16, pcdomainname: *mut u32, domainname: super::super::Foundation::PWSTR, pcrealmname: *mut u32, realmname: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackSpn4W(pszspn: super::super::Foundation::PWSTR, cspn: u32, pchostname: *mut u32, hostname: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pcportname: *mut u32, portname: super::super::Foundation::PWSTR, pcdomainname: *mut u32, domainname: super::super::Foundation::PWSTR, pcrealmname: *mut u32, realmname: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackSpnA(pszspn: super::super::Foundation::PSTR, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PSTR, pinstanceport: *mut u16) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackSpnW(pszspn: super::super::Foundation::PWSTR, pcserviceclass: *mut u32, serviceclass: super::super::Foundation::PWSTR, pcservicename: *mut u32, servicename: super::super::Foundation::PWSTR, pcinstancename: *mut u32, instancename: super::super::Foundation::PWSTR, pinstanceport: *mut u16) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackUnquotedMangledRdnA(pszrdn: super::super::Foundation::PSTR, cchrdn: u32, pguid: *mut ::windows_sys::core::GUID, pedsmanglefor: *mut DS_MANGLE_FOR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsCrackUnquotedMangledRdnW(pszrdn: super::super::Foundation::PWSTR, cchrdn: u32, pguid: *mut ::windows_sys::core::GUID, pedsmanglefor: *mut DS_MANGLE_FOR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsDeregisterDnsHostRecordsA(servername: super::super::Foundation::PSTR, dnsdomainname: super::super::Foundation::PSTR, domainguid: *const ::windows_sys::core::GUID, dsaguid: *const ::windows_sys::core::GUID, dnshostname: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsDeregisterDnsHostRecordsW(servername: super::super::Foundation::PWSTR, dnsdomainname: super::super::Foundation::PWSTR, domainguid: *const ::windows_sys::core::GUID, dsaguid: *const ::windows_sys::core::GUID, dnshostname: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsEnumerateDomainTrustsA(servername: super::super::Foundation::PSTR, flags: u32, domains: *mut *mut DS_DOMAIN_TRUSTSA, domaincount: *mut u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsEnumerateDomainTrustsW(servername: super::super::Foundation::PWSTR, flags: u32, domains: *mut *mut DS_DOMAIN_TRUSTSW, domaincount: *mut u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsFreeDomainControllerInfoA(infolevel: u32, cinfo: u32, pinfo: *const ::core::ffi::c_void); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsFreeDomainControllerInfoW(infolevel: u32, cinfo: u32, pinfo: *const ::core::ffi::c_void); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsFreeNameResultA(presult: *const DS_NAME_RESULTA); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsFreeNameResultW(presult: *const DS_NAME_RESULTW); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsFreePasswordCredentials(authidentity: *const ::core::ffi::c_void); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsFreeSchemaGuidMapA(pguidmap: *const DS_SCHEMA_GUID_MAPA); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsFreeSchemaGuidMapW(pguidmap: *const DS_SCHEMA_GUID_MAPW); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsFreeSpnArrayA(cspn: u32, rpszspn: *mut super::super::Foundation::PSTR); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsFreeSpnArrayW(cspn: u32, rpszspn: *mut super::super::Foundation::PWSTR); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsGetDcCloseW(getdccontexthandle: GetDcContextHandle); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDcNameA(computername: super::super::Foundation::PSTR, domainname: super::super::Foundation::PSTR, domainguid: *const ::windows_sys::core::GUID, sitename: super::super::Foundation::PSTR, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDcNameW(computername: super::super::Foundation::PWSTR, domainname: super::super::Foundation::PWSTR, domainguid: *const ::windows_sys::core::GUID, sitename: super::super::Foundation::PWSTR, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Networking_WinSock'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] pub fn DsGetDcNextA(getdccontexthandle: super::super::Foundation::HANDLE, sockaddresscount: *mut u32, sockaddresses: *mut *mut super::WinSock::SOCKET_ADDRESS, dnshostname: *mut super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Networking_WinSock'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] pub fn DsGetDcNextW(getdccontexthandle: super::super::Foundation::HANDLE, sockaddresscount: *mut u32, sockaddresses: *mut *mut super::WinSock::SOCKET_ADDRESS, dnshostname: *mut super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDcOpenA(dnsname: super::super::Foundation::PSTR, optionflags: u32, sitename: super::super::Foundation::PSTR, domainguid: *const ::windows_sys::core::GUID, dnsforestname: super::super::Foundation::PSTR, dcflags: u32, retgetdccontext: *mut GetDcContextHandle) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDcOpenW(dnsname: super::super::Foundation::PWSTR, optionflags: u32, sitename: super::super::Foundation::PWSTR, domainguid: *const ::windows_sys::core::GUID, dnsforestname: super::super::Foundation::PWSTR, dcflags: u32, retgetdccontext: *mut GetDcContextHandle) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDcSiteCoverageA(servername: super::super::Foundation::PSTR, entrycount: *mut u32, sitenames: *mut *mut super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDcSiteCoverageW(servername: super::super::Foundation::PWSTR, entrycount: *mut u32, sitenames: *mut *mut super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDomainControllerInfoA(hds: super::super::Foundation::HANDLE, domainname: super::super::Foundation::PSTR, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetDomainControllerInfoW(hds: super::super::Foundation::HANDLE, domainname: super::super::Foundation::PWSTR, infolevel: u32, pcout: *mut u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Security_Authentication_Identity'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] pub fn DsGetForestTrustInformationW(servername: super::super::Foundation::PWSTR, trusteddomainname: super::super::Foundation::PWSTR, flags: u32, foresttrustinfo: *mut *mut super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetFriendlyClassName(pszobjectclass: super::super::Foundation::PWSTR, pszbuffer: super::super::Foundation::PWSTR, cchbuffer: u32) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub fn DsGetIcon(dwflags: u32, pszobjectclass: super::super::Foundation::PWSTR, cximage: i32, cyimage: i32) -> super::super::UI::WindowsAndMessaging::HICON; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetRdnW(ppdn: *mut super::super::Foundation::PWSTR, pcdn: *mut u32, ppkey: *mut super::super::Foundation::PWSTR, pckey: *mut u32, ppval: *mut super::super::Foundation::PWSTR, pcval: *mut u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetSiteNameA(computername: super::super::Foundation::PSTR, sitename: *mut super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetSiteNameW(computername: super::super::Foundation::PWSTR, sitename: *mut super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetSpnA(servicetype: DS_SPN_NAME_TYPE, serviceclass: super::super::Foundation::PSTR, servicename: super::super::Foundation::PSTR, instanceport: u16, cinstancenames: u16, pinstancenames: *const super::super::Foundation::PSTR, pinstanceports: *const u16, pcspn: *mut u32, prpszspn: *mut *mut super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsGetSpnW(servicetype: DS_SPN_NAME_TYPE, serviceclass: super::super::Foundation::PWSTR, servicename: super::super::Foundation::PWSTR, instanceport: u16, cinstancenames: u16, pinstancenames: *const super::super::Foundation::PWSTR, pinstanceports: *const u16, pcspn: *mut u32, prpszspn: *mut *mut super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsInheritSecurityIdentityA(hds: super::super::Foundation::HANDLE, flags: u32, srcprincipal: super::super::Foundation::PSTR, dstprincipal: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsInheritSecurityIdentityW(hds: super::super::Foundation::HANDLE, flags: u32, srcprincipal: super::super::Foundation::PWSTR, dstprincipal: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsIsMangledDnA(pszdn: super::super::Foundation::PSTR, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsIsMangledDnW(pszdn: super::super::Foundation::PWSTR, edsmanglefor: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsIsMangledRdnValueA(pszrdn: super::super::Foundation::PSTR, crdn: u32, edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsIsMangledRdnValueW(pszrdn: super::super::Foundation::PWSTR, crdn: u32, edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListDomainsInSiteA(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PSTR, ppdomains: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListDomainsInSiteW(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PWSTR, ppdomains: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListInfoForServerA(hds: super::super::Foundation::HANDLE, server: super::super::Foundation::PSTR, ppinfo: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListInfoForServerW(hds: super::super::Foundation::HANDLE, server: super::super::Foundation::PWSTR, ppinfo: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListRolesA(hds: super::super::Foundation::HANDLE, pproles: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListRolesW(hds: super::super::Foundation::HANDLE, pproles: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListServersForDomainInSiteA(hds: super::super::Foundation::HANDLE, domain: super::super::Foundation::PSTR, site: super::super::Foundation::PSTR, ppservers: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListServersForDomainInSiteW(hds: super::super::Foundation::HANDLE, domain: super::super::Foundation::PWSTR, site: super::super::Foundation::PWSTR, ppservers: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListServersInSiteA(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PSTR, ppservers: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListServersInSiteW(hds: super::super::Foundation::HANDLE, site: super::super::Foundation::PWSTR, ppservers: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListSitesA(hds: super::super::Foundation::HANDLE, ppsites: *mut *mut DS_NAME_RESULTA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsListSitesW(hds: super::super::Foundation::HANDLE, ppsites: *mut *mut DS_NAME_RESULTW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsMakePasswordCredentialsA(user: super::super::Foundation::PSTR, domain: super::super::Foundation::PSTR, password: <PASSWORD>::super::Foundation::PSTR, pauthidentity: *mut *mut ::core::ffi::c_void) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsMakePasswordCredentialsW(user: super::super::Foundation::PWSTR, domain: super::super::Foundation::PWSTR, password: <PASSWORD>::<PASSWORD>::<PASSWORD>::PWSTR, pauthidentity: *mut *mut ::core::ffi::c_void) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsMakeSpnA(serviceclass: super::super::Foundation::PSTR, servicename: super::super::Foundation::PSTR, instancename: super::super::Foundation::PSTR, instanceport: u16, referrer: super::super::Foundation::PSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsMakeSpnW(serviceclass: super::super::Foundation::PWSTR, servicename: super::super::Foundation::PWSTR, instancename: super::super::Foundation::PWSTR, instanceport: u16, referrer: super::super::Foundation::PWSTR, pcspnlength: *mut u32, pszspn: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsMapSchemaGuidsA(hds: super::super::Foundation::HANDLE, cguids: u32, rguids: *const ::windows_sys::core::GUID, ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsMapSchemaGuidsW(hds: super::super::Foundation::HANDLE, cguids: u32, rguids: *const ::windows_sys::core::GUID, ppguidmap: *mut *mut DS_SCHEMA_GUID_MAPW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Security_Authentication_Identity'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] pub fn DsMergeForestTrustInformationW(domainname: super::super::Foundation::PWSTR, newforesttrustinfo: *const super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION, oldforesttrustinfo: *const super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION, mergedforesttrustinfo: *mut *mut super::super::Security::Authentication::Identity::LSA_FOREST_TRUST_INFORMATION) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsQuerySitesByCostA(hds: super::super::Foundation::HANDLE, pszfromsite: super::super::Foundation::PSTR, rgsztosites: *const super::super::Foundation::PSTR, ctosites: u32, dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsQuerySitesByCostW(hds: super::super::Foundation::HANDLE, pwszfromsite: super::super::Foundation::PWSTR, rgwsztosites: *const super::super::Foundation::PWSTR, ctosites: u32, dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsQuoteRdnValueA(cunquotedrdnvaluelength: u32, psunquotedrdnvalue: super::super::Foundation::PSTR, pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsQuoteRdnValueW(cunquotedrdnvaluelength: u32, psunquotedrdnvalue: super::super::Foundation::PWSTR, pcquotedrdnvaluelength: *mut u32, psquotedrdnvalue: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsRemoveDsDomainA(hds: super::super::Foundation::HANDLE, domaindn: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsRemoveDsDomainW(hds: super::super::Foundation::HANDLE, domaindn: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsRemoveDsServerA(hds: super::super::Foundation::HANDLE, serverdn: super::super::Foundation::PSTR, domaindn: super::super::Foundation::PSTR, flastdcindomain: *mut super::super::Foundation::BOOL, fcommit: super::super::Foundation::BOOL) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsRemoveDsServerW(hds: super::super::Foundation::HANDLE, serverdn: super::super::Foundation::PWSTR, domaindn: super::super::Foundation::PWSTR, flastdcindomain: *mut super::super::Foundation::BOOL, fcommit: super::super::Foundation::BOOL) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaAddA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, sourcedsadn: super::super::Foundation::PSTR, transportdn: super::super::Foundation::PSTR, sourcedsaaddress: super::super::Foundation::PSTR, pschedule: *const SCHEDULE, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaAddW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, sourcedsadn: super::super::Foundation::PWSTR, transportdn: super::super::Foundation::PWSTR, sourcedsaaddress: super::super::Foundation::PWSTR, pschedule: *const SCHEDULE, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaConsistencyCheck(hds: super::super::Foundation::HANDLE, taskid: DS_KCC_TASKID, dwflags: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaDelA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, dsasrc: super::super::Foundation::PSTR, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaDelW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, dsasrc: super::super::Foundation::PWSTR, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsReplicaFreeInfo(infotype: DS_REPL_INFO_TYPE, pinfo: *const ::core::ffi::c_void); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaGetInfo2W(hds: super::super::Foundation::HANDLE, infotype: DS_REPL_INFO_TYPE, pszobject: super::super::Foundation::PWSTR, puuidforsourcedsaobjguid: *const ::windows_sys::core::GUID, pszattributename: super::super::Foundation::PWSTR, pszvalue: super::super::Foundation::PWSTR, dwflags: u32, dwenumerationcontext: u32, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaGetInfoW(hds: super::super::Foundation::HANDLE, infotype: DS_REPL_INFO_TYPE, pszobject: super::super::Foundation::PWSTR, puuidforsourcedsaobjguid: *const ::windows_sys::core::GUID, ppinfo: *mut *mut ::core::ffi::c_void) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaModifyA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, puuidsourcedsa: *const ::windows_sys::core::GUID, transportdn: super::super::Foundation::PSTR, sourcedsaaddress: super::super::Foundation::PSTR, pschedule: *const SCHEDULE, replicaflags: u32, modifyfields: u32, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaModifyW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, puuidsourcedsa: *const ::windows_sys::core::GUID, transportdn: super::super::Foundation::PWSTR, sourcedsaaddress: super::super::Foundation::PWSTR, pschedule: *const SCHEDULE, replicaflags: u32, modifyfields: u32, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaSyncA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, puuiddsasrc: *const ::windows_sys::core::GUID, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaSyncAllA(hds: super::super::Foundation::HANDLE, psznamecontext: super::super::Foundation::PSTR, ulflags: u32, pfncallback: isize, pcallbackdata: *const ::core::ffi::c_void, perrors: *mut *mut *mut DS_REPSYNCALL_ERRINFOA) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaSyncAllW(hds: super::super::Foundation::HANDLE, psznamecontext: super::super::Foundation::PWSTR, ulflags: u32, pfncallback: isize, pcallbackdata: *const ::core::ffi::c_void, perrors: *mut *mut *mut DS_REPSYNCALL_ERRINFOW) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaSyncW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, puuiddsasrc: *const ::windows_sys::core::GUID, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaUpdateRefsA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, dsadest: super::super::Foundation::PSTR, puuiddsadest: *const ::windows_sys::core::GUID, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaUpdateRefsW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, dsadest: super::super::Foundation::PWSTR, puuiddsadest: *const ::windows_sys::core::GUID, options: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaVerifyObjectsA(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PSTR, puuiddsasrc: *const ::windows_sys::core::GUID, uloptions: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsReplicaVerifyObjectsW(hds: super::super::Foundation::HANDLE, namecontext: super::super::Foundation::PWSTR, puuiddsasrc: *const ::windows_sys::core::GUID, uloptions: u32) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn DsRoleFreeMemory(buffer: *mut ::core::ffi::c_void); #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsRoleGetPrimaryDomainInformation(lpserver: super::super::Foundation::PWSTR, infolevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, buffer: *mut *mut u8) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsServerRegisterSpnA(operation: DS_SPN_WRITE_OP, serviceclass: super::super::Foundation::PSTR, userobjectdn: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsServerRegisterSpnW(operation: DS_SPN_WRITE_OP, serviceclass: super::super::Foundation::PWSTR, userobjectdn: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsUnBindA(phds: *const super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsUnBindW(phds: *const super::super::Foundation::HANDLE) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsUnquoteRdnValueA(cquotedrdnvaluelength: u32, psquotedrdnvalue: super::super::Foundation::PSTR, pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsUnquoteRdnValueW(cquotedrdnvaluelength: u32, psquotedrdnvalue: super::super::Foundation::PWSTR, pcunquotedrdnvaluelength: *mut u32, psunquotedrdnvalue: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsValidateSubnetNameA(subnetname: super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsValidateSubnetNameW(subnetname: super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsWriteAccountSpnA(hds: super::super::Foundation::HANDLE, operation: DS_SPN_WRITE_OP, pszaccount: super::super::Foundation::PSTR, cspn: u32, rpszspn: *const super::super::Foundation::PSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn DsWriteAccountSpnW(hds: super::super::Foundation::HANDLE, operation: DS_SPN_WRITE_OP, pszaccount: super::super::Foundation::PWSTR, cspn: u32, rpszspn: *const super::super::Foundation::PWSTR) -> u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn FreeADsMem(pmem: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn FreeADsStr(pstr: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn PropVariantToAdsType(pvariant: *mut super::super::System::Com::VARIANT, dwnumvariant: u32, ppadsvalues: *mut *mut ADSVALUE, pdwnumvalues: *mut u32) -> ::windows_sys::core::HRESULT; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub fn ReallocADsMem(poldmem: *mut ::core::ffi::c_void, cbold: u32, cbnew: u32) -> *mut ::core::ffi::c_void; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub fn ReallocADsStr(ppstr: *mut super::super::Foundation::PWSTR, pstr: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_Security', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub fn SecurityDescriptorToBinarySD(vvarsecdes: super::super::System::Com::VARIANT, ppsecuritydescriptor: *mut *mut super::super::Security::SECURITY_DESCRIPTOR, pdwsdlength: *mut u32, pszservername: super::super::Foundation::PWSTR, username: super::super::Foundation::PWSTR, password: super::super::Foundation::PWSTR, dwflags: u32) -> ::windows_sys::core::HRESULT; } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_CONTROL_ACCESS: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_CREATE_CHILD: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_DELETE_CHILD: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_DELETE_TREE: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_LIST: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_LIST_OBJECT: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_OPEN: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_READ_PROP: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_SELF: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ACTRL_DS_WRITE_PROP: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_REPL_AUTHENTICATION_MODE_MUTUAL_AUTH_REQUIRED: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE_PASS_THROUGH: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_FSMO_NAMING_STRING: &'static str = "naming"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_FSMO_NAMING_STRING_W: &'static str = "naming"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_FSMO_SCHEMA_STRING: &'static str = "schema"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_FSMO_SCHEMA_STRING_W: &'static str = "schema"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_FSMO_STRING: &'static str = "fsmo:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_FSMO_STRING_W: &'static str = "fsmo:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_INSTANCE_NAME_STRING: &'static str = "instance:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_INSTANCE_NAME_STRING_W: &'static str = "instance:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_PARTITION_STRING: &'static str = "partition:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_PARTITION_STRING_W: &'static str = "partition:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_SITE_NAME_STRING: &'static str = "site:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADAM_SCP_SITE_NAME_STRING_W: &'static str = "site:"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADSI_DIALECT_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSI_DIALECT_LDAP: ADSI_DIALECT_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSI_DIALECT_SQL: ADSI_DIALECT_ENUM = 1i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADSPROPERROR { pub hwndPage: super::super::Foundation::HWND, pub pszPageTitle: super::super::Foundation::PWSTR, pub pszObjPath: super::super::Foundation::PWSTR, pub pszObjClass: super::super::Foundation::PWSTR, pub hr: ::windows_sys::core::HRESULT, pub pszError: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADSPROPERROR {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADSPROPERROR { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADSPROPINITPARAMS { pub dwSize: u32, pub dwFlags: u32, pub hr: ::windows_sys::core::HRESULT, pub pDsObj: IDirectoryObject, pub pwzCN: super::super::Foundation::PWSTR, pub pWritableAttrs: *mut ADS_ATTR_INFO, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADSPROPINITPARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADSPROPINITPARAMS { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADSTYPEENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_INVALID: ADSTYPEENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_DN_STRING: ADSTYPEENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_CASE_EXACT_STRING: ADSTYPEENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_CASE_IGNORE_STRING: ADSTYPEENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_PRINTABLE_STRING: ADSTYPEENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_NUMERIC_STRING: ADSTYPEENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_BOOLEAN: ADSTYPEENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_INTEGER: ADSTYPEENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_OCTET_STRING: ADSTYPEENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_UTC_TIME: ADSTYPEENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_LARGE_INTEGER: ADSTYPEENUM = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_PROV_SPECIFIC: ADSTYPEENUM = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_OBJECT_CLASS: ADSTYPEENUM = 12i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_CASEIGNORE_LIST: ADSTYPEENUM = 13i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_OCTET_LIST: ADSTYPEENUM = 14i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_PATH: ADSTYPEENUM = 15i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_POSTALADDRESS: ADSTYPEENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_TIMESTAMP: ADSTYPEENUM = 17i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_BACKLINK: ADSTYPEENUM = 18i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_TYPEDNAME: ADSTYPEENUM = 19i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_HOLD: ADSTYPEENUM = 20i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_NETADDRESS: ADSTYPEENUM = 21i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_REPLICAPOINTER: ADSTYPEENUM = 22i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_FAXNUMBER: ADSTYPEENUM = 23i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_EMAIL: ADSTYPEENUM = 24i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_NT_SECURITY_DESCRIPTOR: ADSTYPEENUM = 25i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_UNKNOWN: ADSTYPEENUM = 26i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_DN_WITH_BINARY: ADSTYPEENUM = 27i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSTYPE_DN_WITH_STRING: ADSTYPEENUM = 28i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADSVALUE { pub dwType: ADSTYPEENUM, pub Anonymous: ADSVALUE_0, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADSVALUE {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADSVALUE { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub union ADSVALUE_0 { pub DNString: *mut u16, pub CaseExactString: *mut u16, pub CaseIgnoreString: *mut u16, pub PrintableString: *mut u16, pub NumericString: *mut u16, pub Boolean: u32, pub Integer: u32, pub OctetString: ADS_OCTET_STRING, pub UTCTime: super::super::Foundation::SYSTEMTIME, pub LargeInteger: i64, pub ClassName: *mut u16, pub ProviderSpecific: ADS_PROV_SPECIFIC, pub pCaseIgnoreList: *mut ADS_CASEIGNORE_LIST, pub pOctetList: *mut ADS_OCTET_LIST, pub pPath: *mut ADS_PATH, pub pPostalAddress: *mut ADS_POSTALADDRESS, pub Timestamp: ADS_TIMESTAMP, pub BackLink: ADS_BACKLINK, pub pTypedName: *mut ADS_TYPEDNAME, pub Hold: ADS_HOLD, pub pNetAddress: *mut ADS_NETADDRESS, pub pReplicaPointer: *mut ADS_REPLICAPOINTER, pub pFaxNumber: *mut ADS_FAXNUMBER, pub Email: ADS_EMAIL, pub SecurityDescriptor: ADS_NT_SECURITY_DESCRIPTOR, pub pDNWithBinary: *mut ADS_DN_WITH_BINARY, pub pDNWithString: *mut ADS_DN_WITH_STRING, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADSVALUE_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADSVALUE_0 { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_ACEFLAG_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_INHERIT_ACE: ADS_ACEFLAG_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_NO_PROPAGATE_INHERIT_ACE: ADS_ACEFLAG_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_INHERIT_ONLY_ACE: ADS_ACEFLAG_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_INHERITED_ACE: ADS_ACEFLAG_ENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_VALID_INHERIT_FLAGS: ADS_ACEFLAG_ENUM = 31i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_SUCCESSFUL_ACCESS: ADS_ACEFLAG_ENUM = 64i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACEFLAG_FAILED_ACCESS: ADS_ACEFLAG_ENUM = 128i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_ACETYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_ALLOWED: ADS_ACETYPE_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_DENIED: ADS_ACETYPE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_AUDIT: ADS_ACETYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_ALLOWED_OBJECT: ADS_ACETYPE_ENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_DENIED_OBJECT: ADS_ACETYPE_ENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_AUDIT_OBJECT: ADS_ACETYPE_ENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_ALARM_OBJECT: ADS_ACETYPE_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK: ADS_ACETYPE_ENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_DENIED_CALLBACK: ADS_ACETYPE_ENUM = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_ALLOWED_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_ACCESS_DENIED_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = 12i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK: ADS_ACETYPE_ENUM = 13i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_ALARM_CALLBACK: ADS_ACETYPE_ENUM = 14i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_AUDIT_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = 15i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ACETYPE_SYSTEM_ALARM_CALLBACK_OBJECT: ADS_ACETYPE_ENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ATTR_APPEND: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ATTR_CLEAR: u32 = 1u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_ATTR_DEF { pub pszAttrName: super::super::Foundation::PWSTR, pub dwADsType: ADSTYPEENUM, pub dwMinRange: u32, pub dwMaxRange: u32, pub fMultiValued: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_ATTR_DEF {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_ATTR_DEF { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ATTR_DELETE: u32 = 4u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_ATTR_INFO { pub pszAttrName: super::super::Foundation::PWSTR, pub dwControlCode: u32, pub dwADsType: ADSTYPEENUM, pub pADsValues: *mut ADSVALUE, pub dwNumValues: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_ATTR_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_ATTR_INFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ATTR_UPDATE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_AUTHENTICATION_ENUM = u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SECURE_AUTHENTICATION: ADS_AUTHENTICATION_ENUM = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_USE_ENCRYPTION: ADS_AUTHENTICATION_ENUM = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_USE_SSL: ADS_AUTHENTICATION_ENUM = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_READONLY_SERVER: ADS_AUTHENTICATION_ENUM = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PROMPT_CREDENTIALS: ADS_AUTHENTICATION_ENUM = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NO_AUTHENTICATION: ADS_AUTHENTICATION_ENUM = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FAST_BIND: ADS_AUTHENTICATION_ENUM = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_USE_SIGNING: ADS_AUTHENTICATION_ENUM = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_USE_SEALING: ADS_AUTHENTICATION_ENUM = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_USE_DELEGATION: ADS_AUTHENTICATION_ENUM = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SERVER_BIND: ADS_AUTHENTICATION_ENUM = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NO_REFERRAL_CHASING: ADS_AUTHENTICATION_ENUM = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_AUTH_RESERVED: ADS_AUTHENTICATION_ENUM = 2147483648u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_BACKLINK { pub RemoteID: u32, pub ObjectName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_BACKLINK {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_BACKLINK { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_CASEIGNORE_LIST { pub Next: *mut ADS_CASEIGNORE_LIST, pub String: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_CASEIGNORE_LIST {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_CASEIGNORE_LIST { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_CHASE_REFERRALS_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_CHASE_REFERRALS_NEVER: ADS_CHASE_REFERRALS_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_CHASE_REFERRALS_SUBORDINATE: ADS_CHASE_REFERRALS_ENUM = 32i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_CHASE_REFERRALS_EXTERNAL: ADS_CHASE_REFERRALS_ENUM = 64i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_CHASE_REFERRALS_ALWAYS: ADS_CHASE_REFERRALS_ENUM = 96i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_CLASS_DEF { pub pszClassName: super::super::Foundation::PWSTR, pub dwMandatoryAttrs: u32, pub ppszMandatoryAttrs: *mut super::super::Foundation::PWSTR, pub optionalAttrs: u32, pub ppszOptionalAttrs: *mut *mut super::super::Foundation::PWSTR, pub dwNamingAttrs: u32, pub ppszNamingAttrs: *mut *mut super::super::Foundation::PWSTR, pub dwSuperClasses: u32, pub ppszSuperClasses: *mut *mut super::super::Foundation::PWSTR, pub fIsContainer: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_CLASS_DEF {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_CLASS_DEF { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_DEREFENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_DEREF_NEVER: ADS_DEREFENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_DEREF_SEARCHING: ADS_DEREFENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_DEREF_FINDING: ADS_DEREFENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_DEREF_ALWAYS: ADS_DEREFENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_DISPLAY_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_DISPLAY_FULL: ADS_DISPLAY_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_DISPLAY_VALUE_ONLY: ADS_DISPLAY_ENUM = 2i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_DN_WITH_BINARY { pub dwLength: u32, pub lpBinaryValue: *mut u8, pub pszDNString: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_DN_WITH_BINARY {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_DN_WITH_BINARY { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_DN_WITH_STRING { pub pszStringValue: super::super::Foundation::PWSTR, pub pszDNString: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_DN_WITH_STRING {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_DN_WITH_STRING { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_EMAIL { pub Address: super::super::Foundation::PWSTR, pub Type: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_EMAIL {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_EMAIL { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_ESCAPE_MODE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ESCAPEDMODE_DEFAULT: ADS_ESCAPE_MODE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ESCAPEDMODE_ON: ADS_ESCAPE_MODE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ESCAPEDMODE_OFF: ADS_ESCAPE_MODE_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_ESCAPEDMODE_OFF_EX: ADS_ESCAPE_MODE_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_EXT_INITCREDENTIALS: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_EXT_INITIALIZE_COMPLETE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_EXT_MAXEXTDISPID: u32 = 16777215u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_EXT_MINEXTDISPID: u32 = 1u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_FAXNUMBER { pub TelephoneNumber: super::super::Foundation::PWSTR, pub NumberOfBits: u32, pub Parameters: *mut u8, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_FAXNUMBER {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_FAXNUMBER { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_FLAGTYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FLAG_OBJECT_TYPE_PRESENT: ADS_FLAGTYPE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FLAG_INHERITED_OBJECT_TYPE_PRESENT: ADS_FLAGTYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_FORMAT_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_WINDOWS: ADS_FORMAT_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_WINDOWS_NO_SERVER: ADS_FORMAT_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_WINDOWS_DN: ADS_FORMAT_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_WINDOWS_PARENT: ADS_FORMAT_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_X500: ADS_FORMAT_ENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_X500_NO_SERVER: ADS_FORMAT_ENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_X500_DN: ADS_FORMAT_ENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_X500_PARENT: ADS_FORMAT_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_SERVER: ADS_FORMAT_ENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_PROVIDER: ADS_FORMAT_ENUM = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_FORMAT_LEAF: ADS_FORMAT_ENUM = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_GROUP_TYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_GROUP_TYPE_GLOBAL_GROUP: ADS_GROUP_TYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP: ADS_GROUP_TYPE_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_GROUP_TYPE_LOCAL_GROUP: ADS_GROUP_TYPE_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_GROUP_TYPE_UNIVERSAL_GROUP: ADS_GROUP_TYPE_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_GROUP_TYPE_SECURITY_ENABLED: ADS_GROUP_TYPE_ENUM = -2147483648i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_HOLD { pub ObjectName: super::super::Foundation::PWSTR, pub Amount: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_HOLD {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_HOLD { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_NAME_INITTYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_INITTYPE_DOMAIN: ADS_NAME_INITTYPE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_INITTYPE_SERVER: ADS_NAME_INITTYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_INITTYPE_GC: ADS_NAME_INITTYPE_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_NAME_TYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_1779: ADS_NAME_TYPE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_CANONICAL: ADS_NAME_TYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_NT4: ADS_NAME_TYPE_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_DISPLAY: ADS_NAME_TYPE_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_DOMAIN_SIMPLE: ADS_NAME_TYPE_ENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_ENTERPRISE_SIMPLE: ADS_NAME_TYPE_ENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_GUID: ADS_NAME_TYPE_ENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_UNKNOWN: ADS_NAME_TYPE_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_USER_PRINCIPAL_NAME: ADS_NAME_TYPE_ENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_CANONICAL_EX: ADS_NAME_TYPE_ENUM = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_SERVICE_PRINCIPAL_NAME: ADS_NAME_TYPE_ENUM = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME: ADS_NAME_TYPE_ENUM = 12i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct ADS_NETADDRESS { pub AddressType: u32, pub AddressLength: u32, pub Address: *mut u8, } impl ::core::marker::Copy for ADS_NETADDRESS {} impl ::core::clone::Clone for ADS_NETADDRESS { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct ADS_NT_SECURITY_DESCRIPTOR { pub dwLength: u32, pub lpValue: *mut u8, } impl ::core::marker::Copy for ADS_NT_SECURITY_DESCRIPTOR {} impl ::core::clone::Clone for ADS_NT_SECURITY_DESCRIPTOR { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_OBJECT_INFO { pub pszRDN: super::super::Foundation::PWSTR, pub pszObjectDN: super::super::Foundation::PWSTR, pub pszParentDN: super::super::Foundation::PWSTR, pub pszSchemaDN: super::super::Foundation::PWSTR, pub pszClassName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_OBJECT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_OBJECT_INFO { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct ADS_OCTET_LIST { pub Next: *mut ADS_OCTET_LIST, pub Length: u32, pub Data: *mut u8, } impl ::core::marker::Copy for ADS_OCTET_LIST {} impl ::core::clone::Clone for ADS_OCTET_LIST { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct ADS_OCTET_STRING { pub dwLength: u32, pub lpValue: *mut u8, } impl ::core::marker::Copy for ADS_OCTET_STRING {} impl ::core::clone::Clone for ADS_OCTET_STRING { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_OPTION_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_SERVERNAME: ADS_OPTION_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_REFERRALS: ADS_OPTION_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_PAGE_SIZE: ADS_OPTION_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_SECURITY_MASK: ADS_OPTION_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_MUTUAL_AUTH_STATUS: ADS_OPTION_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_QUOTA: ADS_OPTION_ENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_PASSWORD_PORTNUMBER: ADS_OPTION_ENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_PASSWORD_METHOD: ADS_OPTION_ENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_ACCUMULATIVE_MODIFICATION: ADS_OPTION_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_OPTION_SKIP_SID_LOOKUP: ADS_OPTION_ENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_PASSWORD_ENCODING_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PASSWORD_ENCODE_REQUIRE_SSL: ADS_PASSWORD_ENCODING_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PASSWORD_ENCODE_CLEAR: ADS_PASSWORD_ENCODING_ENUM = 1i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_PATH { pub Type: u32, pub VolumeName: super::super::Foundation::PWSTR, pub Path: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_PATH {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_PATH { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_PATHTYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PATH_FILE: ADS_PATHTYPE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PATH_FILESHARE: ADS_PATHTYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PATH_REGISTRY: ADS_PATHTYPE_ENUM = 3i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_POSTALADDRESS { pub PostalAddress: [super::super::Foundation::PWSTR; 6], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_POSTALADDRESS {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_POSTALADDRESS { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_PREFERENCES_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_ASYNCHRONOUS: ADS_PREFERENCES_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_DEREF_ALIASES: ADS_PREFERENCES_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_SIZE_LIMIT: ADS_PREFERENCES_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_TIME_LIMIT: ADS_PREFERENCES_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_ATTRIBTYPES_ONLY: ADS_PREFERENCES_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_SEARCH_SCOPE: ADS_PREFERENCES_ENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_TIMEOUT: ADS_PREFERENCES_ENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_PAGESIZE: ADS_PREFERENCES_ENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_PAGED_TIME_LIMIT: ADS_PREFERENCES_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_CHASE_REFERRALS: ADS_PREFERENCES_ENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_SORT_ON: ADS_PREFERENCES_ENUM = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_CACHE_RESULTS: ADS_PREFERENCES_ENUM = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADSIPROP_ADSIFLAG: ADS_PREFERENCES_ENUM = 12i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_PROPERTY_OPERATION_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PROPERTY_CLEAR: ADS_PROPERTY_OPERATION_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PROPERTY_UPDATE: ADS_PROPERTY_OPERATION_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PROPERTY_APPEND: ADS_PROPERTY_OPERATION_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_PROPERTY_DELETE: ADS_PROPERTY_OPERATION_ENUM = 4i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct ADS_PROV_SPECIFIC { pub dwLength: u32, pub lpValue: *mut u8, } impl ::core::marker::Copy for ADS_PROV_SPECIFIC {} impl ::core::clone::Clone for ADS_PROV_SPECIFIC { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_REPLICAPOINTER { pub ServerName: super::super::Foundation::PWSTR, pub ReplicaType: u32, pub ReplicaNumber: u32, pub Count: u32, pub ReplicaAddressHints: *mut ADS_NETADDRESS, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_REPLICAPOINTER {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_REPLICAPOINTER { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_RIGHTS_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DELETE: ADS_RIGHTS_ENUM = 65536i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_READ_CONTROL: ADS_RIGHTS_ENUM = 131072i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_WRITE_DAC: ADS_RIGHTS_ENUM = 262144i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_WRITE_OWNER: ADS_RIGHTS_ENUM = 524288i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_SYNCHRONIZE: ADS_RIGHTS_ENUM = 1048576i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_ACCESS_SYSTEM_SECURITY: ADS_RIGHTS_ENUM = 16777216i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_GENERIC_READ: ADS_RIGHTS_ENUM = -2147483648i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_GENERIC_WRITE: ADS_RIGHTS_ENUM = 1073741824i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_GENERIC_EXECUTE: ADS_RIGHTS_ENUM = 536870912i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_GENERIC_ALL: ADS_RIGHTS_ENUM = 268435456i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_CREATE_CHILD: ADS_RIGHTS_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_DELETE_CHILD: ADS_RIGHTS_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_ACTRL_DS_LIST: ADS_RIGHTS_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_SELF: ADS_RIGHTS_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_READ_PROP: ADS_RIGHTS_ENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_WRITE_PROP: ADS_RIGHTS_ENUM = 32i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_DELETE_TREE: ADS_RIGHTS_ENUM = 64i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_LIST_OBJECT: ADS_RIGHTS_ENUM = 128i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_RIGHT_DS_CONTROL_ACCESS: ADS_RIGHTS_ENUM = 256i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SCOPEENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SCOPE_BASE: ADS_SCOPEENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SCOPE_ONELEVEL: ADS_SCOPEENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SCOPE_SUBTREE: ADS_SCOPEENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SD_CONTROL_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_OWNER_DEFAULTED: ADS_SD_CONTROL_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_GROUP_DEFAULTED: ADS_SD_CONTROL_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_DACL_PRESENT: ADS_SD_CONTROL_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_DACL_DEFAULTED: ADS_SD_CONTROL_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_SACL_PRESENT: ADS_SD_CONTROL_ENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_SACL_DEFAULTED: ADS_SD_CONTROL_ENUM = 32i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_DACL_AUTO_INHERIT_REQ: ADS_SD_CONTROL_ENUM = 256i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_SACL_AUTO_INHERIT_REQ: ADS_SD_CONTROL_ENUM = 512i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_DACL_AUTO_INHERITED: ADS_SD_CONTROL_ENUM = 1024i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_SACL_AUTO_INHERITED: ADS_SD_CONTROL_ENUM = 2048i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_DACL_PROTECTED: ADS_SD_CONTROL_ENUM = 4096i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_SACL_PROTECTED: ADS_SD_CONTROL_ENUM = 8192i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_CONTROL_SE_SELF_RELATIVE: ADS_SD_CONTROL_ENUM = 32768i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SD_FORMAT_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_FORMAT_IID: ADS_SD_FORMAT_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_FORMAT_RAW: ADS_SD_FORMAT_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_FORMAT_HEXSTRING: ADS_SD_FORMAT_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SD_REVISION_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SD_REVISION_DS: ADS_SD_REVISION_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SEARCHPREF_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_ASYNCHRONOUS: ADS_SEARCHPREF_ENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_DEREF_ALIASES: ADS_SEARCHPREF_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_SIZE_LIMIT: ADS_SEARCHPREF_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_TIME_LIMIT: ADS_SEARCHPREF_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_ATTRIBTYPES_ONLY: ADS_SEARCHPREF_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_SEARCH_SCOPE: ADS_SEARCHPREF_ENUM = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_TIMEOUT: ADS_SEARCHPREF_ENUM = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_PAGESIZE: ADS_SEARCHPREF_ENUM = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_PAGED_TIME_LIMIT: ADS_SEARCHPREF_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_CHASE_REFERRALS: ADS_SEARCHPREF_ENUM = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_SORT_ON: ADS_SEARCHPREF_ENUM = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_CACHE_RESULTS: ADS_SEARCHPREF_ENUM = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_DIRSYNC: ADS_SEARCHPREF_ENUM = 12i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_TOMBSTONE: ADS_SEARCHPREF_ENUM = 13i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_VLV: ADS_SEARCHPREF_ENUM = 14i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_ATTRIBUTE_QUERY: ADS_SEARCHPREF_ENUM = 15i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_SECURITY_MASK: ADS_SEARCHPREF_ENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_DIRSYNC_FLAG: ADS_SEARCHPREF_ENUM = 17i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SEARCHPREF_EXTENDED_DN: ADS_SEARCHPREF_ENUM = 18i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SECURITY_INFO_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SECURITY_INFO_OWNER: ADS_SECURITY_INFO_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SECURITY_INFO_GROUP: ADS_SECURITY_INFO_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SECURITY_INFO_DACL: ADS_SECURITY_INFO_ENUM = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SECURITY_INFO_SACL: ADS_SECURITY_INFO_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SETTYPE_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SETTYPE_FULL: ADS_SETTYPE_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SETTYPE_PROVIDER: ADS_SETTYPE_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SETTYPE_SERVER: ADS_SETTYPE_ENUM = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SETTYPE_DN: ADS_SETTYPE_ENUM = 4i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_SORTKEY { pub pszAttrType: super::super::Foundation::PWSTR, pub pszReserved: super::super::Foundation::PWSTR, pub fReverseorder: super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_SORTKEY {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_SORTKEY { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_STATUSENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_STATUS_S_OK: ADS_STATUSENUM = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_STATUS_INVALID_SEARCHPREF: ADS_STATUSENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_STATUS_INVALID_SEARCHPREFVALUE: ADS_STATUSENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_SYSTEMFLAG_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_DISALLOW_DELETE: ADS_SYSTEMFLAG_ENUM = -2147483648i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME: ADS_SYSTEMFLAG_ENUM = 1073741824i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE: ADS_SYSTEMFLAG_ENUM = 536870912i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE: ADS_SYSTEMFLAG_ENUM = 268435456i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME: ADS_SYSTEMFLAG_ENUM = 134217728i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE: ADS_SYSTEMFLAG_ENUM = 67108864i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_CR_NTDS_NC: ADS_SYSTEMFLAG_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_CR_NTDS_DOMAIN: ADS_SYSTEMFLAG_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED: ADS_SYSTEMFLAG_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED: ADS_SYSTEMFLAG_ENUM = 4i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct ADS_TIMESTAMP { pub WholeSeconds: u32, pub EventID: u32, } impl ::core::marker::Copy for ADS_TIMESTAMP {} impl ::core::clone::Clone for ADS_TIMESTAMP { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_TYPEDNAME { pub ObjectName: super::super::Foundation::PWSTR, pub Level: u32, pub Interval: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_TYPEDNAME {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_TYPEDNAME { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type ADS_USER_FLAG_ENUM = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_SCRIPT: ADS_USER_FLAG_ENUM = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_ACCOUNTDISABLE: ADS_USER_FLAG_ENUM = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_HOMEDIR_REQUIRED: ADS_USER_FLAG_ENUM = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_LOCKOUT: ADS_USER_FLAG_ENUM = 16i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_PASSWD_NOTREQD: ADS_USER_FLAG_ENUM = 32i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_PASSWD_CANT_CHANGE: ADS_USER_FLAG_ENUM = 64i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED: ADS_USER_FLAG_ENUM = 128i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_TEMP_DUPLICATE_ACCOUNT: ADS_USER_FLAG_ENUM = 256i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_NORMAL_ACCOUNT: ADS_USER_FLAG_ENUM = 512i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_INTERDOMAIN_TRUST_ACCOUNT: ADS_USER_FLAG_ENUM = 2048i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_WORKSTATION_TRUST_ACCOUNT: ADS_USER_FLAG_ENUM = 4096i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_SERVER_TRUST_ACCOUNT: ADS_USER_FLAG_ENUM = 8192i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_DONT_EXPIRE_PASSWD: ADS_USER_FLAG_ENUM = 65536i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_MNS_LOGON_ACCOUNT: ADS_USER_FLAG_ENUM = 131072i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_SMARTCARD_REQUIRED: ADS_USER_FLAG_ENUM = 262144i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_TRUSTED_FOR_DELEGATION: ADS_USER_FLAG_ENUM = 524288i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_NOT_DELEGATED: ADS_USER_FLAG_ENUM = 1048576i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_USE_DES_KEY_ONLY: ADS_USER_FLAG_ENUM = 2097152i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_DONT_REQUIRE_PREAUTH: ADS_USER_FLAG_ENUM = 4194304i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_PASSWORD_EXPIRED: ADS_USER_FLAG_ENUM = 8388608i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION: ADS_USER_FLAG_ENUM = 16777216i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ADS_VLV { pub dwBeforeCount: u32, pub dwAfterCount: u32, pub dwOffset: u32, pub dwContentCount: u32, pub pszTarget: super::super::Foundation::PWSTR, pub dwContextIDLength: u32, pub lpContextID: *mut u8, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ADS_VLV {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ADS_VLV { fn clone(&self) -> Self { *self } } pub const ADSystemInfo: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1354117759, data2: 45009, data3: 4562, data4: [156, 185, 0, 0, 248, 122, 54, 158] }; pub const ADsSecurityUtility: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4067477066, data2: 65464, data3: 19172, data4: [133, 254, 58, 117, 229, 52, 121, 102] }; pub const AccessControlEntry: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3076177920, data2: 39901, data3: 4560, data4: [133, 44, 0, 192, 79, 216, 213, 3] }; pub const AccessControlList: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3093209170, data2: 39901, data3: 4560, data4: [133, 44, 0, 192, 79, 216, 213, 3] }; pub const BackLink: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4240412783, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DSDISPLAYSPECOPTIONS: &'static str = "DsDisplaySpecOptions"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DSOBJECTNAMES: &'static str = "DsObjectNames"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DSOP_DS_SELECTION_LIST: &'static str = "CFSTR_DSOP_DS_SELECTION_LIST"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DSPROPERTYPAGEINFO: &'static str = "DsPropPageInfo"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DSQUERYPARAMS: &'static str = "DsQueryParameters"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DSQUERYSCOPE: &'static str = "DsQueryScope"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CFSTR_DS_DISPLAY_SPEC_OPTIONS: &'static str = "DsDisplaySpecOptions"; pub const CLSID_CommonQuery: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2210160320, data2: 28458, data3: 4560, data4: [161, 196, 0, 170, 0, 193, 110, 101] }; pub const CLSID_DsAdminCreateObj: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3808534537, data2: 63745, data3: 4562, data4: [130, 185, 0, 192, 79, 104, 146, 139] }; pub const CLSID_DsDisplaySpecifier: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 448047296, data2: 27147, data3: 4562, data4: [173, 73, 0, 192, 79, 163, 26, 134] }; pub const CLSID_DsDomainTreeBrowser: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 379091210, data2: 58036, data3: 4560, data4: [176, 177, 0, 192, 79, 216, 220, 166] }; pub const CLSID_DsFindAdvanced: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2213429219, data2: 22489, data3: 4560, data4: [185, 50, 0, 160, 36, 171, 45, 187] }; pub const CLSID_DsFindComputer: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 369125120, data2: 34733, data3: 4560, data4: [145, 64, 0, 170, 0, 193, 110, 101] }; pub const CLSID_DsFindContainer: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3249785842, data2: 34922, data3: 4560, data4: [145, 64, 0, 170, 0, 193, 110, 101] }; pub const CLSID_DsFindDomainController: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1401715582, data2: 53854, data3: 4560, data4: [151, 66, 0, 160, 201, 6, 175, 69] }; pub const CLSID_DsFindFrsMembers: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2496547608, data2: 46035, data3: 4561, data4: [185, 180, 0, 192, 79, 216, 213, 176] }; pub const CLSID_DsFindObjects: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2213429217, data2: 22489, data3: 4560, data4: [185, 50, 0, 160, 36, 171, 45, 187] }; pub const CLSID_DsFindPeople: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2213429218, data2: 22489, data3: 4560, data4: [185, 50, 0, 160, 36, 171, 45, 187] }; pub const CLSID_DsFindPrinter: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3044536432, data2: 32482, data3: 4560, data4: [145, 63, 0, 170, 0, 193, 110, 101] }; pub const CLSID_DsFindVolume: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3249785841, data2: 34922, data3: 4560, data4: [145, 64, 0, 170, 0, 193, 110, 101] }; pub const CLSID_DsFindWriteableDomainController: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2092888185, data2: 43652, data3: 17483, data4: [188, 112, 104, 228, 18, 131, 234, 188] }; pub const CLSID_DsFolderProperties: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2656166096, data2: 28175, data3: 4562, data4: [150, 1, 0, 192, 79, 163, 26, 134] }; pub const CLSID_DsObjectPicker: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 399953112, data2: 15227, data3: 4562, data4: [185, 224, 0, 192, 79, 216, 219, 247] }; pub const CLSID_DsPropertyPages: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 222680368, data2: 30283, data3: 4560, data4: [161, 202, 0, 170, 0, 193, 110, 101] }; pub const CLSID_DsQuery: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2317608542, data2: 12738, data3: 4560, data4: [137, 28, 0, 160, 36, 171, 45, 187] }; pub const CLSID_MicrosoftDS: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4262629616, data2: 53181, data3: 4559, data4: [163, 48, 0, 170, 0, 193, 110, 101] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQFF_ISOPTIONAL: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQFF_NOGLOBALPAGES: u32 = 1u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub struct CQFORM { pub cbStruct: u32, pub dwFlags: u32, pub clsid: ::windows_sys::core::GUID, pub hIcon: super::super::UI::WindowsAndMessaging::HICON, pub pszTitle: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::marker::Copy for CQFORM {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::clone::Clone for CQFORM { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub struct CQPAGE { pub cbStruct: u32, pub dwFlags: u32, pub pPageProc: LPCQPAGEPROC, pub hInstance: super::super::Foundation::HINSTANCE, pub idPageName: i32, pub idPageTemplate: i32, pub pDlgProc: super::super::UI::WindowsAndMessaging::DLGPROC, pub lParam: super::super::Foundation::LPARAM, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::marker::Copy for CQPAGE {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::clone::Clone for CQPAGE { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_CLEARFORM: u32 = 6u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_ENABLE: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_GETPARAMETERS: u32 = 5u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_HANDLERSPECIFIC: u32 = 268435456u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_HELP: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_INITIALIZE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_PERSIST: u32 = 7u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_RELEASE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const CQPM_SETDEFAULTPARAMETERS: u32 = 9u32; pub const CaseIgnoreList: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 368609877, data2: 18048, data3: 4561, data4: [163, 180, 0, 192, 79, 185, 80, 220] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DBDTF_RETURNEXTERNAL: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DBDTF_RETURNFQDN: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DBDTF_RETURNINBOUND: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DBDTF_RETURNINOUTBOUND: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DBDTF_RETURNMIXEDDOMAINS: u32 = 2u32; pub const DNWithBinary: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2124005539, data2: 63797, data3: 4562, data4: [186, 150, 0, 192, 79, 182, 208, 209] }; pub const DNWithString: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 860379084, data2: 63796, data3: 4562, data4: [186, 150, 0, 192, 79, 182, 208, 209] }; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DOMAINDESC { pub pszName: super::super::Foundation::PWSTR, pub pszPath: super::super::Foundation::PWSTR, pub pszNCName: super::super::Foundation::PWSTR, pub pszTrustParent: super::super::Foundation::PWSTR, pub pszObjectClass: super::super::Foundation::PWSTR, pub ulFlags: u32, pub fDownLevel: super::super::Foundation::BOOL, pub pdChildList: *mut DOMAINDESC, pub pdNextSibling: *mut DOMAINDESC, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DOMAINDESC {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DOMAINDESC { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DOMAIN_CONTROLLER_INFOA { pub DomainControllerName: super::super::Foundation::PSTR, pub DomainControllerAddress: super::super::Foundation::PSTR, pub DomainControllerAddressType: u32, pub DomainGuid: ::windows_sys::core::GUID, pub DomainName: super::super::Foundation::PSTR, pub DnsForestName: super::super::Foundation::PSTR, pub Flags: u32, pub DcSiteName: super::super::Foundation::PSTR, pub ClientSiteName: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DOMAIN_CONTROLLER_INFOA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DOMAIN_CONTROLLER_INFOA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DOMAIN_CONTROLLER_INFOW { pub DomainControllerName: super::super::Foundation::PWSTR, pub DomainControllerAddress: super::super::Foundation::PWSTR, pub DomainControllerAddressType: u32, pub DomainGuid: ::windows_sys::core::GUID, pub DomainName: super::super::Foundation::PWSTR, pub DnsForestName: super::super::Foundation::PWSTR, pub Flags: u32, pub DcSiteName: super::super::Foundation::PWSTR, pub ClientSiteName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DOMAIN_CONTROLLER_INFOW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DOMAIN_CONTROLLER_INFOW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DOMAIN_TREE { pub dsSize: u32, pub dwCount: u32, pub aDomains: [DOMAINDESC; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DOMAIN_TREE {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DOMAIN_TREE { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NEWOBJ_CTX_CLEANUP: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NEWOBJ_CTX_COMMIT: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NEWOBJ_CTX_POSTCOMMIT: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NEWOBJ_CTX_PRECOMMIT: u32 = 1u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub struct DSA_NEWOBJ_DISPINFO { pub dwSize: u32, pub hObjClassIcon: super::super::UI::WindowsAndMessaging::HICON, pub lpszWizTitle: super::super::Foundation::PWSTR, pub lpszContDisplayName: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::marker::Copy for DSA_NEWOBJ_DISPINFO {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] impl ::core::clone::Clone for DSA_NEWOBJ_DISPINFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NOTIFY_DEL: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NOTIFY_FLAG_ADDITIONAL_DATA: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NOTIFY_MOV: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NOTIFY_PROP: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSA_NOTIFY_REN: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBF_DISPLAYNAME: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBF_ICONLOCATION: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBF_STATE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBID_BANNER: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBID_CONTAINERLIST: u32 = 257u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSBITEMA { pub cbStruct: u32, pub pszADsPath: super::super::Foundation::PWSTR, pub pszClass: super::super::Foundation::PWSTR, pub dwMask: u32, pub dwState: u32, pub dwStateMask: u32, pub szDisplayName: [super::super::Foundation::CHAR; 64], pub szIconLocation: [super::super::Foundation::CHAR; 260], pub iIconResID: i32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSBITEMA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSBITEMA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSBITEMW { pub cbStruct: u32, pub pszADsPath: super::super::Foundation::PWSTR, pub pszClass: super::super::Foundation::PWSTR, pub dwMask: u32, pub dwState: u32, pub dwStateMask: u32, pub szDisplayName: [u16; 64], pub szIconLocation: [u16; 260], pub iIconResID: i32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSBITEMW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSBITEMW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_CHECKBOXES: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_DONTSIGNSEAL: u32 = 33554432u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_ENTIREDIRECTORY: u32 = 589824u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_EXPANDONOPEN: u32 = 262144u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_HASCREDENTIALS: u32 = 2097152u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_IGNORETREATASLEAF: u32 = 4194304u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_INCLUDEHIDDEN: u32 = 131072u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_NOBUTTONS: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_NOLINES: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_NOLINESATROOT: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_NOROOT: u32 = 65536u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_RETURNOBJECTCLASS: u32 = 16777216u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_RETURN_FORMAT: u32 = 1048576u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBI_SIMPLEAUTHENTICATE: u32 = 8388608u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBM_CHANGEIMAGESTATE: u32 = 102u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBM_CONTEXTMENU: u32 = 104u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBM_HELP: u32 = 103u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBM_QUERYINSERT: u32 = 100u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBM_QUERYINSERTA: u32 = 101u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBM_QUERYINSERTW: u32 = 100u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_Shell'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] pub struct DSBROWSEINFOA { pub cbStruct: u32, pub hwndOwner: super::super::Foundation::HWND, pub pszCaption: super::super::Foundation::PSTR, pub pszTitle: super::super::Foundation::PSTR, pub pszRoot: super::super::Foundation::PWSTR, pub pszPath: super::super::Foundation::PWSTR, pub cchPath: u32, pub dwFlags: u32, pub pfnCallback: super::super::UI::Shell::BFFCALLBACK, pub lParam: super::super::Foundation::LPARAM, pub dwReturnFormat: u32, pub pUserName: super::super::Foundation::PWSTR, pub pPassword: super::super::Foundation::PWSTR, pub pszObjectClass: super::super::Foundation::PWSTR, pub cchObjectClass: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::marker::Copy for DSBROWSEINFOA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::clone::Clone for DSBROWSEINFOA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_Shell'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] pub struct DSBROWSEINFOW { pub cbStruct: u32, pub hwndOwner: super::super::Foundation::HWND, pub pszCaption: super::super::Foundation::PWSTR, pub pszTitle: super::super::Foundation::PWSTR, pub pszRoot: super::super::Foundation::PWSTR, pub pszPath: super::super::Foundation::PWSTR, pub cchPath: u32, pub dwFlags: u32, pub pfnCallback: super::super::UI::Shell::BFFCALLBACK, pub lParam: super::super::Foundation::LPARAM, pub dwReturnFormat: u32, pub pUserName: super::super::Foundation::PWSTR, pub pPassword: super::super::Foundation::PWSTR, pub pszObjectClass: super::super::Foundation::PWSTR, pub cchObjectClass: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::marker::Copy for DSBROWSEINFOW {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell"))] impl ::core::clone::Clone for DSBROWSEINFOW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBS_CHECKED: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBS_HIDDEN: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSBS_ROOT: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSB_MAX_DISPLAYNAME_CHARS: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSCCIF_HASWIZARDDIALOG: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSCCIF_HASWIZARDPRIMARYPAGE: u32 = 2u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSCLASSCREATIONINFO { pub dwFlags: u32, pub clsidWizardDialog: ::windows_sys::core::GUID, pub clsidWizardPrimaryPage: ::windows_sys::core::GUID, pub cWizardExtensions: u32, pub aWizardExtensions: [::windows_sys::core::GUID; 1], } impl ::core::marker::Copy for DSCLASSCREATIONINFO {} impl ::core::clone::Clone for DSCLASSCREATIONINFO { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSCOLUMN { pub dwFlags: u32, pub fmt: i32, pub cx: i32, pub idsName: i32, pub offsetProperty: i32, pub dwReserved: u32, } impl ::core::marker::Copy for DSCOLUMN {} impl ::core::clone::Clone for DSCOLUMN { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSDISPLAYSPECOPTIONS { pub dwSize: u32, pub dwFlags: u32, pub offsetAttribPrefix: u32, pub offsetUserName: u32, pub offsetPassword: u32, pub offsetServer: u32, pub offsetServerConfigPath: u32, } impl ::core::marker::Copy for DSDISPLAYSPECOPTIONS {} impl ::core::clone::Clone for DSDISPLAYSPECOPTIONS { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSDSOF_DONTSIGNSEAL: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSDSOF_DSAVAILABLE: u32 = 1073741824u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSDSOF_HASUSERANDSERVERINFO: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSDSOF_SIMPLEAUTHENTICATE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSECAF_NOTLISTED: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSGIF_DEFAULTISCONTAINER: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSGIF_GETDEFAULTICON: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSGIF_ISDISABLED: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSGIF_ISMASK: u32 = 15u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSGIF_ISNORMAL: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSGIF_ISOPEN: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSICCF_IGNORETREATASLEAF: u32 = 1u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSOBJECT { pub dwFlags: u32, pub dwProviderFlags: u32, pub offsetName: u32, pub offsetClass: u32, } impl ::core::marker::Copy for DSOBJECT {} impl ::core::clone::Clone for DSOBJECT { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSOBJECTNAMES { pub clsidNamespace: ::windows_sys::core::GUID, pub cItems: u32, pub aObjects: [DSOBJECT; 1], } impl ::core::marker::Copy for DSOBJECTNAMES {} impl ::core::clone::Clone for DSOBJECTNAMES { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOBJECT_ISCONTAINER: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOBJECT_READONLYPAGES: u32 = 2147483648u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_ALL_APP_PACKAGES: u32 = 2281701376u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS: u32 = 2147614720u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_ANONYMOUS: u32 = 2147483712u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER: u32 = 2147483680u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_BATCH: u32 = 2147483776u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_COMPUTERS: u32 = 2147483656u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP: u32 = 2147484160u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER: u32 = 2147483904u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_DIALUP: u32 = 2147484672u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS: u32 = 2147516416u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS: u32 = 2147483652u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_IIS_APP_POOL: u32 = 2214592512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_INTERACTIVE: u32 = 2147485696u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_INTERNET_USER: u32 = 2149580800u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_LOCAL_ACCOUNTS: u32 = 2415919104u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS: u32 = 2147483650u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_LOCAL_LOGON: u32 = 2164260864u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE: u32 = 2147745792u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_NETWORK: u32 = 2147487744u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE: u32 = 2148007936u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_OWNER_RIGHTS: u32 = 2151677952u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON: u32 = 2148532224u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_SERVICE: u32 = 2147491840u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_SERVICES: u32 = 2155872256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_SYSTEM: u32 = 2147500032u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER: u32 = 2147549184u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_THIS_ORG_CERT: u32 = 2181038080u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_USERS: u32 = 2147483649u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_DOWNLEVEL_FILTER_WORLD: u32 = 2147483664u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_BUILTIN_GROUPS: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_COMPUTERS: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_CONTACTS: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE: u32 = 512u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSOP_FILTER_FLAGS { pub Uplevel: DSOP_UPLEVEL_FILTER_FLAGS, pub flDownlevel: u32, } impl ::core::marker::Copy for DSOP_FILTER_FLAGS {} impl ::core::clone::Clone for DSOP_FILTER_FLAGS { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_GLOBAL_GROUPS_DL: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_GLOBAL_GROUPS_SE: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_INCLUDE_ADVANCED_VIEW: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_PASSWORDSETTINGS_OBJECTS: u32 = 8192u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_SERVICE_ACCOUNTS: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_UNIVERSAL_GROUPS_DL: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_UNIVERSAL_GROUPS_SE: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_USERS: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FILTER_WELL_KNOWN_PRINCIPALS: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FLAG_MULTISELECT: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK: u32 = 2u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSOP_INIT_INFO { pub cbSize: u32, pub pwzTargetComputer: super::super::Foundation::PWSTR, pub cDsScopeInfos: u32, pub aDsScopeInfos: *mut DSOP_SCOPE_INIT_INFO, pub flOptions: u32, pub cAttributesToFetch: u32, pub apwzAttributeNames: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSOP_INIT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSOP_INIT_INFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_PASSWORDSETTINGS_OBJECTS: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_SERVICE_ACCOUNTS: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_STARTING_SCOPE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_WANT_PROVIDER_GC: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_FLAG_WANT_SID_PATH: u32 = 16u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSOP_SCOPE_INIT_INFO { pub cbSize: u32, pub flType: u32, pub flScope: u32, pub FilterFlags: DSOP_FILTER_FLAGS, pub pwzDcName: super::super::Foundation::PWSTR, pub pwzADsPath: super::super::Foundation::PWSTR, pub hr: ::windows_sys::core::HRESULT, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSOP_SCOPE_INIT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSOP_SCOPE_INIT_INFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_GLOBAL_CATALOG: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_TARGET_COMPUTER: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSOP_SCOPE_TYPE_WORKGROUP: u32 = 128u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSOP_UPLEVEL_FILTER_FLAGS { pub flBothModes: u32, pub flMixedModeOnly: u32, pub flNativeModeOnly: u32, } impl ::core::marker::Copy for DSOP_UPLEVEL_FILTER_FLAGS {} impl ::core::clone::Clone for DSOP_UPLEVEL_FILTER_FLAGS { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSPROPERTYPAGEINFO { pub offsetString: u32, } impl ::core::marker::Copy for DSPROPERTYPAGEINFO {} impl ::core::clone::Clone for DSPROPERTYPAGEINFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROP_ATTRCHANGED_MSG: &'static str = "DsPropAttrChanged"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROVIDER_ADVANCED: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROVIDER_AD_LDS: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROVIDER_UNUSED_0: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROVIDER_UNUSED_1: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROVIDER_UNUSED_2: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSPROVIDER_UNUSED_3: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_ENABLEADMINFEATURES: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_ENABLEADVANCEDFEATURES: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_HASCREDENTIALS: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_NOCHOOSECOLUMNS: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_NOSAVE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_SAVELOCATION: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPF_SHOWHIDDENOBJECTS: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPM_GETCLASSLIST: u32 = 268435456u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSQPM_HELPTOPICS: u32 = 268435457u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSQUERYCLASSLIST { pub cbStruct: u32, pub cClasses: i32, pub offsetClass: [u32; 1], } impl ::core::marker::Copy for DSQUERYCLASSLIST {} impl ::core::clone::Clone for DSQUERYCLASSLIST { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSQUERYINITPARAMS { pub cbStruct: u32, pub dwFlags: u32, pub pDefaultScope: super::super::Foundation::PWSTR, pub pDefaultSaveLocation: super::super::Foundation::PWSTR, pub pUserName: super::super::Foundation::PWSTR, pub pPassword: super::super::Foundation::PWSTR, pub pServer: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSQUERYINITPARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSQUERYINITPARAMS { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSQUERYPARAMS { pub cbStruct: u32, pub dwFlags: u32, pub hInstance: super::super::Foundation::HINSTANCE, pub offsetQuery: i32, pub iColumns: i32, pub dwReserved: u32, pub aColumns: [DSCOLUMN; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSQUERYPARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSQUERYPARAMS { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DSROLE_MACHINE_ROLE = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRole_RoleStandaloneWorkstation: DSROLE_MACHINE_ROLE = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRole_RoleMemberWorkstation: DSROLE_MACHINE_ROLE = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRole_RoleStandaloneServer: DSROLE_MACHINE_ROLE = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRole_RoleMemberServer: DSROLE_MACHINE_ROLE = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRole_RoleBackupDomainController: DSROLE_MACHINE_ROLE = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRole_RolePrimaryDomainController: DSROLE_MACHINE_ROLE = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DSROLE_OPERATION_STATE = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleOperationIdle: DSROLE_OPERATION_STATE = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleOperationActive: DSROLE_OPERATION_STATE = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleOperationNeedReboot: DSROLE_OPERATION_STATE = 2i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSROLE_OPERATION_STATE_INFO { pub OperationState: DSROLE_OPERATION_STATE, } impl ::core::marker::Copy for DSROLE_OPERATION_STATE_INFO {} impl ::core::clone::Clone for DSROLE_OPERATION_STATE_INFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSROLE_PRIMARY_DOMAIN_GUID_PRESENT: u32 = 16777216u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DSROLE_PRIMARY_DOMAIN_INFO_BASIC { pub MachineRole: DSROLE_MACHINE_ROLE, pub Flags: u32, pub DomainNameFlat: super::super::Foundation::PWSTR, pub DomainNameDns: super::super::Foundation::PWSTR, pub DomainForestName: super::super::Foundation::PWSTR, pub DomainGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DSROLE_PRIMARY_DOMAIN_INFO_BASIC {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DSROLE_PRIMARY_DOMAIN_INFO_BASIC { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRolePrimaryDomainInfoBasic: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleUpgradeStatus: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleOperationState: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSROLE_PRIMARY_DS_MIXED_MODE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSROLE_PRIMARY_DS_READONLY: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSROLE_PRIMARY_DS_RUNNING: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DSROLE_SERVER_STATE = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleServerUnknown: DSROLE_SERVER_STATE = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleServerPrimary: DSROLE_SERVER_STATE = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DsRoleServerBackup: DSROLE_SERVER_STATE = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSROLE_UPGRADE_IN_PROGRESS: u32 = 4u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DSROLE_UPGRADE_STATUS_INFO { pub OperationState: u32, pub PreviousServerState: DSROLE_SERVER_STATE, } impl ::core::marker::Copy for DSROLE_UPGRADE_STATUS_INFO {} impl ::core::clone::Clone for DSROLE_UPGRADE_STATUS_INFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSSSF_DONTSIGNSEAL: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSSSF_DSAVAILABLE: u32 = 2147483648u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DSSSF_SIMPLEAUTHENTICATE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_AVOID_SELF: u32 = 16384u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BACKGROUND_ONLY: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_LONGHORN: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2000: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2003: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2003_WITH_MIXED_DOMAINS: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2008: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2008R2: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2012: u32 = 5u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2012R2: u32 = 6u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN2016: u32 = 7u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN7: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WIN8: u32 = 5u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WINBLUE: u32 = 6u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_BEHAVIOR_WINTHRESHOLD: u32 = 7u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_CLOSEST_FLAG: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DIRECTORY_SERVICE_10_REQUIRED: u32 = 8388608u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DIRECTORY_SERVICE_6_REQUIRED: u32 = 524288u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DIRECTORY_SERVICE_8_REQUIRED: u32 = 2097152u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DIRECTORY_SERVICE_9_REQUIRED: u32 = 4194304u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DIRECTORY_SERVICE_PREFERRED: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DIRECTORY_SERVICE_REQUIRED: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DNS_CONTROLLER_FLAG: u32 = 536870912u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DNS_DOMAIN_FLAG: u32 = 1073741824u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DNS_FOREST_FLAG: u32 = 2147483648u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_1A { pub NetbiosName: super::super::Foundation::PSTR, pub DnsHostName: super::super::Foundation::PSTR, pub SiteName: super::super::Foundation::PSTR, pub ComputerObjectName: super::super::Foundation::PSTR, pub ServerObjectName: super::super::Foundation::PSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_CONTROLLER_INFO_1A {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_CONTROLLER_INFO_1A { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_1W { pub NetbiosName: super::super::Foundation::PWSTR, pub DnsHostName: super::super::Foundation::PWSTR, pub SiteName: super::super::Foundation::PWSTR, pub ComputerObjectName: super::super::Foundation::PWSTR, pub ServerObjectName: super::super::Foundation::PWSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_CONTROLLER_INFO_1W {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_CONTROLLER_INFO_1W { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_2A { pub NetbiosName: super::super::Foundation::PSTR, pub DnsHostName: super::super::Foundation::PSTR, pub SiteName: super::super::Foundation::PSTR, pub SiteObjectName: super::super::Foundation::PSTR, pub ComputerObjectName: super::super::Foundation::PSTR, pub ServerObjectName: super::super::Foundation::PSTR, pub NtdsDsaObjectName: super::super::Foundation::PSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows_sys::core::GUID, pub ComputerObjectGuid: ::windows_sys::core::GUID, pub ServerObjectGuid: ::windows_sys::core::GUID, pub NtdsDsaObjectGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_CONTROLLER_INFO_2A {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_CONTROLLER_INFO_2A { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_2W { pub NetbiosName: super::super::Foundation::PWSTR, pub DnsHostName: super::super::Foundation::PWSTR, pub SiteName: super::super::Foundation::PWSTR, pub SiteObjectName: super::super::Foundation::PWSTR, pub ComputerObjectName: super::super::Foundation::PWSTR, pub ServerObjectName: super::super::Foundation::PWSTR, pub NtdsDsaObjectName: super::super::Foundation::PWSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows_sys::core::GUID, pub ComputerObjectGuid: ::windows_sys::core::GUID, pub ServerObjectGuid: ::windows_sys::core::GUID, pub NtdsDsaObjectGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_CONTROLLER_INFO_2W {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_CONTROLLER_INFO_2W { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_3A { pub NetbiosName: super::super::Foundation::PSTR, pub DnsHostName: super::super::Foundation::PSTR, pub SiteName: super::super::Foundation::PSTR, pub SiteObjectName: super::super::Foundation::PSTR, pub ComputerObjectName: super::super::Foundation::PSTR, pub ServerObjectName: super::super::Foundation::PSTR, pub NtdsDsaObjectName: super::super::Foundation::PSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub fIsRodc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows_sys::core::GUID, pub ComputerObjectGuid: ::windows_sys::core::GUID, pub ServerObjectGuid: ::windows_sys::core::GUID, pub NtdsDsaObjectGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_CONTROLLER_INFO_3A {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_CONTROLLER_INFO_3A { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_CONTROLLER_INFO_3W { pub NetbiosName: super::super::Foundation::PWSTR, pub DnsHostName: super::super::Foundation::PWSTR, pub SiteName: super::super::Foundation::PWSTR, pub SiteObjectName: super::super::Foundation::PWSTR, pub ComputerObjectName: super::super::Foundation::PWSTR, pub ServerObjectName: super::super::Foundation::PWSTR, pub NtdsDsaObjectName: super::super::Foundation::PWSTR, pub fIsPdc: super::super::Foundation::BOOL, pub fDsEnabled: super::super::Foundation::BOOL, pub fIsGc: super::super::Foundation::BOOL, pub fIsRodc: super::super::Foundation::BOOL, pub SiteObjectGuid: ::windows_sys::core::GUID, pub ComputerObjectGuid: ::windows_sys::core::GUID, pub ServerObjectGuid: ::windows_sys::core::GUID, pub NtdsDsaObjectGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_CONTROLLER_INFO_3W {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_CONTROLLER_INFO_3W { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DOMAIN_DIRECT_INBOUND: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DOMAIN_DIRECT_OUTBOUND: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DOMAIN_IN_FOREST: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DOMAIN_NATIVE_MODE: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DOMAIN_PRIMARY: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DOMAIN_TREE_ROOT: u32 = 4u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_TRUSTSA { pub NetbiosDomainName: super::super::Foundation::PSTR, pub DnsDomainName: super::super::Foundation::PSTR, pub Flags: u32, pub ParentIndex: u32, pub TrustType: u32, pub TrustAttributes: u32, pub DomainSid: super::super::Foundation::PSID, pub DomainGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_TRUSTSA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_TRUSTSA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_DOMAIN_TRUSTSW { pub NetbiosDomainName: super::super::Foundation::PWSTR, pub DnsDomainName: super::super::Foundation::PWSTR, pub Flags: u32, pub ParentIndex: u32, pub TrustType: u32, pub TrustAttributes: u32, pub DomainSid: super::super::Foundation::PSID, pub DomainGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_DOMAIN_TRUSTSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_DOMAIN_TRUSTSW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DS_10_FLAG: u32 = 65536u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DS_8_FLAG: u32 = 16384u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DS_9_FLAG: u32 = 32768u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DS_FLAG: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_EXIST_ADVISORY_MODE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_FORCE_REDISCOVERY: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_FULL_SECRET_DOMAIN_6_FLAG: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_GC_FLAG: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_GC_SERVER_REQUIRED: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_GFTI_UPDATE_TDO: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_GFTI_VALID_FLAGS: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_GOOD_TIMESERV_FLAG: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_GOOD_TIMESERV_PREFERRED: u32 = 8192u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_INSTANCETYPE_IS_NC_HEAD: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_INSTANCETYPE_NC_COMING: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_INSTANCETYPE_NC_GOING: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_INSTANCETYPE_NC_IS_WRITEABLE: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_IP_REQUIRED: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_IS_DNS_NAME: u32 = 131072u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_IS_FLAT_NAME: u32 = 65536u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KCC_FLAG_ASYNC_OP: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KCC_FLAG_DAMPED: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_KCC_TASKID = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KCC_TASKID_UPDATE_TOPOLOGY: DS_KCC_TASKID = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KDC_FLAG: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KDC_REQUIRED: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KEY_LIST_FLAG: u32 = 131072u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_KEY_LIST_SUPPORT_REQUIRED: u32 = 16777216u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_LDAP_FLAG: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_LIST_ACCOUNT_OBJECT_FOR_SERVER: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_LIST_DNS_HOST_NAME_FOR_SERVER: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_LIST_DSA_OBJECT_FOR_SERVER: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_MANGLE_FOR = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_MANGLE_UNKNOWN: DS_MANGLE_FOR = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_MANGLE_OBJECT_RDN_FOR_DELETION: DS_MANGLE_FOR = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_MANGLE_OBJECT_RDN_FOR_NAME_CONFLICT: DS_MANGLE_FOR = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_NAME_ERROR = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_NO_ERROR: DS_NAME_ERROR = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_RESOLVING: DS_NAME_ERROR = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_NOT_FOUND: DS_NAME_ERROR = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_NOT_UNIQUE: DS_NAME_ERROR = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_NO_MAPPING: DS_NAME_ERROR = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_DOMAIN_ONLY: DS_NAME_ERROR = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING: DS_NAME_ERROR = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_ERROR_TRUST_REFERRAL: DS_NAME_ERROR = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_NAME_FLAGS = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_NO_FLAGS: DS_NAME_FLAGS = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_FLAG_SYNTACTICAL_ONLY: DS_NAME_FLAGS = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_FLAG_EVAL_AT_DC: DS_NAME_FLAGS = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_FLAG_GCVERIFY: DS_NAME_FLAGS = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NAME_FLAG_TRUST_REFERRAL: DS_NAME_FLAGS = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_NAME_FORMAT = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_UNKNOWN_NAME: DS_NAME_FORMAT = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_FQDN_1779_NAME: DS_NAME_FORMAT = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NT4_ACCOUNT_NAME: DS_NAME_FORMAT = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DISPLAY_NAME: DS_NAME_FORMAT = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_UNIQUE_ID_NAME: DS_NAME_FORMAT = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_CANONICAL_NAME: DS_NAME_FORMAT = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_USER_PRINCIPAL_NAME: DS_NAME_FORMAT = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_CANONICAL_NAME_EX: DS_NAME_FORMAT = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SERVICE_PRINCIPAL_NAME: DS_NAME_FORMAT = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SID_OR_SID_HISTORY_NAME: DS_NAME_FORMAT = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_DNS_DOMAIN_NAME: DS_NAME_FORMAT = 12i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULTA { pub cItems: u32, pub rItems: *mut DS_NAME_RESULT_ITEMA, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_NAME_RESULTA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_NAME_RESULTA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULTW { pub cItems: u32, pub rItems: *mut DS_NAME_RESULT_ITEMW, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_NAME_RESULTW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_NAME_RESULTW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULT_ITEMA { pub status: u32, pub pDomain: super::super::Foundation::PSTR, pub pName: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_NAME_RESULT_ITEMA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_NAME_RESULT_ITEMA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_NAME_RESULT_ITEMW { pub status: u32, pub pDomain: super::super::Foundation::PWSTR, pub pName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_NAME_RESULT_ITEMW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_NAME_RESULT_ITEMW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NDNC_FLAG: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_NOTIFY_AFTER_SITE_RECORDS: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ONLY_DO_SITE_NAME: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ONLY_LDAP_NEEDED: u32 = 32768u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_PDC_FLAG: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_PDC_REQUIRED: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_PING_FLAGS: u32 = 1048575u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_PROP_ADMIN_PREFIX: &'static str = "admin"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_PROP_SHELL_PREFIX: &'static str = "shell"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_ASYNCHRONOUS_OPERATION: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_ASYNCHRONOUS_REPLICA: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_CRITICAL: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_DISABLE_NOTIFICATION: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_DISABLE_PERIODIC: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_INITIAL: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_INTERSITE_MESSAGING: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_NEVER_NOTIFY: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_NONGC_RO_REPLICA: u32 = 16777216u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_PERIODIC: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_SELECT_SECRETS: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_TWO_WAY: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_USE_COMPRESSION: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPADD_WRITEABLE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_ASYNCHRONOUS_OPERATION: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_IGNORE_ERRORS: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_INTERSITE_MESSAGING: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_LOCAL_ONLY: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_NO_SOURCE: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_REF_OK: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPDEL_WRITEABLE: u32 = 2u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_META_DATA { pub pszAttributeName: super::super::Foundation::PWSTR, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_ATTR_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_ATTR_META_DATA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_META_DATA_2 { pub pszAttributeName: super::super::Foundation::PWSTR, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub pszLastOriginatingDsaDN: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_ATTR_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_ATTR_META_DATA_2 { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_META_DATA_BLOB { pub oszAttributeName: u32, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub oszLastOriginatingDsaDN: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_ATTR_META_DATA_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_ATTR_META_DATA_BLOB { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_VALUE_META_DATA { pub cNumEntries: u32, pub dwEnumerationContext: u32, pub rgMetaData: [DS_REPL_VALUE_META_DATA; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_ATTR_VALUE_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_ATTR_VALUE_META_DATA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_VALUE_META_DATA_2 { pub cNumEntries: u32, pub dwEnumerationContext: u32, pub rgMetaData: [DS_REPL_VALUE_META_DATA_2; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_ATTR_VALUE_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_ATTR_VALUE_META_DATA_2 { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_ATTR_VALUE_META_DATA_EXT { pub cNumEntries: u32, pub dwEnumerationContext: u32, pub rgMetaData: [DS_REPL_VALUE_META_DATA_EXT; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_ATTR_VALUE_META_DATA_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_ATTR_VALUE_META_DATA_EXT { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DS_REPL_CURSOR { pub uuidSourceDsaInvocationID: ::windows_sys::core::GUID, pub usnAttributeFilter: i64, } impl ::core::marker::Copy for DS_REPL_CURSOR {} impl ::core::clone::Clone for DS_REPL_CURSOR { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DS_REPL_CURSORS { pub cNumCursors: u32, pub dwReserved: u32, pub rgCursor: [DS_REPL_CURSOR; 1], } impl ::core::marker::Copy for DS_REPL_CURSORS {} impl ::core::clone::Clone for DS_REPL_CURSORS { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSORS_2 { pub cNumCursors: u32, pub dwEnumerationContext: u32, pub rgCursor: [DS_REPL_CURSOR_2; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_CURSORS_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_CURSORS_2 { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSORS_3W { pub cNumCursors: u32, pub dwEnumerationContext: u32, pub rgCursor: [DS_REPL_CURSOR_3W; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_CURSORS_3W {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_CURSORS_3W { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSOR_2 { pub uuidSourceDsaInvocationID: ::windows_sys::core::GUID, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_CURSOR_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_CURSOR_2 { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSOR_3W { pub uuidSourceDsaInvocationID: ::windows_sys::core::GUID, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub pszSourceDsaDN: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_CURSOR_3W {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_CURSOR_3W { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_CURSOR_BLOB { pub uuidSourceDsaInvocationID: ::windows_sys::core::GUID, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub oszSourceDsaDN: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_CURSOR_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_CURSOR_BLOB { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_REPL_INFO_TYPE = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_NEIGHBORS: DS_REPL_INFO_TYPE = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_CURSORS_FOR_NC: DS_REPL_INFO_TYPE = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_METADATA_FOR_OBJ: DS_REPL_INFO_TYPE = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES: DS_REPL_INFO_TYPE = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_KCC_DSA_LINK_FAILURES: DS_REPL_INFO_TYPE = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_PENDING_OPS: DS_REPL_INFO_TYPE = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_METADATA_FOR_ATTR_VALUE: DS_REPL_INFO_TYPE = 6i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_CURSORS_2_FOR_NC: DS_REPL_INFO_TYPE = 7i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_CURSORS_3_FOR_NC: DS_REPL_INFO_TYPE = 8i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_METADATA_2_FOR_OBJ: DS_REPL_INFO_TYPE = 9i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE: DS_REPL_INFO_TYPE = 10i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_METADATA_EXT_FOR_ATTR_VALUE: DS_REPL_INFO_TYPE = 11i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_INFO_TYPE_MAX: DS_REPL_INFO_TYPE = 12i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_KCC_DSA_FAILURESW { pub cNumEntries: u32, pub dwReserved: u32, pub rgDsaFailure: [DS_REPL_KCC_DSA_FAILUREW; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_KCC_DSA_FAILURESW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_KCC_DSA_FAILURESW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_KCC_DSA_FAILUREW { pub pszDsaDN: super::super::Foundation::PWSTR, pub uuidDsaObjGuid: ::windows_sys::core::GUID, pub ftimeFirstFailure: super::super::Foundation::FILETIME, pub cNumFailures: u32, pub dwLastResult: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_KCC_DSA_FAILUREW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_KCC_DSA_FAILUREW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_KCC_DSA_FAILUREW_BLOB { pub oszDsaDN: u32, pub uuidDsaObjGuid: ::windows_sys::core::GUID, pub ftimeFirstFailure: super::super::Foundation::FILETIME, pub cNumFailures: u32, pub dwLastResult: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_KCC_DSA_FAILUREW_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_KCC_DSA_FAILUREW_BLOB { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_COMPRESS_CHANGES: u32 = 268435456u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_DISABLE_SCHEDULED_SYNC: u32 = 134217728u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_DO_SCHEDULED_SYNCS: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_FULL_SYNC_IN_PROGRESS: u32 = 65536u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_FULL_SYNC_NEXT_PACKET: u32 = 131072u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_GCSPN: u32 = 1048576u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS: u32 = 67108864u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_NEVER_SYNCED: u32 = 2097152u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_NONGC_RO_REPLICA: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS: u32 = 536870912u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET: u32 = 1073741824u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_PREEMPTED: u32 = 16777216u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_RETURN_OBJECT_PARENTS: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_SELECT_SECRETS: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_SYNC_ON_STARTUP: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_TWO_WAY_SYNC: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_NBR_WRITEABLE: u32 = 16u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_NEIGHBORSW { pub cNumNeighbors: u32, pub dwReserved: u32, pub rgNeighbor: [DS_REPL_NEIGHBORW; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_NEIGHBORSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_NEIGHBORSW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_NEIGHBORW { pub pszNamingContext: super::super::Foundation::PWSTR, pub pszSourceDsaDN: super::super::Foundation::PWSTR, pub pszSourceDsaAddress: super::super::Foundation::PWSTR, pub pszAsyncIntersiteTransportDN: super::super::Foundation::PWSTR, pub dwReplicaFlags: u32, pub dwReserved: u32, pub uuidNamingContextObjGuid: ::windows_sys::core::GUID, pub uuidSourceDsaObjGuid: ::windows_sys::core::GUID, pub uuidSourceDsaInvocationID: ::windows_sys::core::GUID, pub uuidAsyncIntersiteTransportObjGuid: ::windows_sys::core::GUID, pub usnLastObjChangeSynced: i64, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub ftimeLastSyncAttempt: super::super::Foundation::FILETIME, pub dwLastSyncResult: u32, pub cNumConsecutiveSyncFailures: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_NEIGHBORW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_NEIGHBORW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_NEIGHBORW_BLOB { pub oszNamingContext: u32, pub oszSourceDsaDN: u32, pub oszSourceDsaAddress: u32, pub oszAsyncIntersiteTransportDN: u32, pub dwReplicaFlags: u32, pub dwReserved: u32, pub uuidNamingContextObjGuid: ::windows_sys::core::GUID, pub uuidSourceDsaObjGuid: ::windows_sys::core::GUID, pub uuidSourceDsaInvocationID: ::windows_sys::core::GUID, pub uuidAsyncIntersiteTransportObjGuid: ::windows_sys::core::GUID, pub usnLastObjChangeSynced: i64, pub usnAttributeFilter: i64, pub ftimeLastSyncSuccess: super::super::Foundation::FILETIME, pub ftimeLastSyncAttempt: super::super::Foundation::FILETIME, pub dwLastSyncResult: u32, pub cNumConsecutiveSyncFailures: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_NEIGHBORW_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_NEIGHBORW_BLOB { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OBJ_META_DATA { pub cNumEntries: u32, pub dwReserved: u32, pub rgMetaData: [DS_REPL_ATTR_META_DATA; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_OBJ_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_OBJ_META_DATA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OBJ_META_DATA_2 { pub cNumEntries: u32, pub dwReserved: u32, pub rgMetaData: [DS_REPL_ATTR_META_DATA_2; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_OBJ_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_OBJ_META_DATA_2 { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OPW { pub ftimeEnqueued: super::super::Foundation::FILETIME, pub ulSerialNumber: u32, pub ulPriority: u32, pub OpType: DS_REPL_OP_TYPE, pub ulOptions: u32, pub pszNamingContext: super::super::Foundation::PWSTR, pub pszDsaDN: super::super::Foundation::PWSTR, pub pszDsaAddress: super::super::Foundation::PWSTR, pub uuidNamingContextObjGuid: ::windows_sys::core::GUID, pub uuidDsaObjGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_OPW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_OPW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_OPW_BLOB { pub ftimeEnqueued: super::super::Foundation::FILETIME, pub ulSerialNumber: u32, pub ulPriority: u32, pub OpType: DS_REPL_OP_TYPE, pub ulOptions: u32, pub oszNamingContext: u32, pub oszDsaDN: u32, pub oszDsaAddress: u32, pub uuidNamingContextObjGuid: ::windows_sys::core::GUID, pub uuidDsaObjGuid: ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_OPW_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_OPW_BLOB { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_REPL_OP_TYPE = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_OP_TYPE_SYNC: DS_REPL_OP_TYPE = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_OP_TYPE_ADD: DS_REPL_OP_TYPE = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_OP_TYPE_DELETE: DS_REPL_OP_TYPE = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_OP_TYPE_MODIFY: DS_REPL_OP_TYPE = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPL_OP_TYPE_UPDATE_REFS: DS_REPL_OP_TYPE = 4i32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_PENDING_OPSW { pub ftimeCurrentOpStarted: super::super::Foundation::FILETIME, pub cNumPendingOps: u32, pub rgPendingOp: [DS_REPL_OPW; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_PENDING_OPSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_PENDING_OPSW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_QUEUE_STATISTICSW { pub ftimeCurrentOpStarted: super::super::Foundation::FILETIME, pub cNumPendingOps: u32, pub ftimeOldestSync: super::super::Foundation::FILETIME, pub ftimeOldestAdd: super::super::Foundation::FILETIME, pub ftimeOldestMod: super::super::Foundation::FILETIME, pub ftimeOldestDel: super::super::Foundation::FILETIME, pub ftimeOldestUpdRefs: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_QUEUE_STATISTICSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_QUEUE_STATISTICSW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA { pub pszAttributeName: super::super::Foundation::PWSTR, pub pszObjectDn: super::super::Foundation::PWSTR, pub cbData: u32, pub pbData: *mut u8, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_VALUE_META_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_VALUE_META_DATA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_2 { pub pszAttributeName: super::super::Foundation::PWSTR, pub pszObjectDn: super::super::Foundation::PWSTR, pub cbData: u32, pub pbData: *mut u8, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub pszLastOriginatingDsaDN: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_VALUE_META_DATA_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_VALUE_META_DATA_2 { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_BLOB { pub oszAttributeName: u32, pub oszObjectDn: u32, pub cbData: u32, pub obData: u32, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub oszLastOriginatingDsaDN: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_VALUE_META_DATA_BLOB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_VALUE_META_DATA_BLOB { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_BLOB_EXT { pub oszAttributeName: u32, pub oszObjectDn: u32, pub cbData: u32, pub obData: u32, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub oszLastOriginatingDsaDN: u32, pub dwUserIdentifier: u32, pub dwPriorLinkState: u32, pub dwCurrentLinkState: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_VALUE_META_DATA_BLOB_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_VALUE_META_DATA_BLOB_EXT { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPL_VALUE_META_DATA_EXT { pub pszAttributeName: super::super::Foundation::PWSTR, pub pszObjectDn: super::super::Foundation::PWSTR, pub cbData: u32, pub pbData: *mut u8, pub ftimeDeleted: super::super::Foundation::FILETIME, pub ftimeCreated: super::super::Foundation::FILETIME, pub dwVersion: u32, pub ftimeLastOriginatingChange: super::super::Foundation::FILETIME, pub uuidLastOriginatingDsaInvocationID: ::windows_sys::core::GUID, pub usnOriginatingChange: i64, pub usnLocalChange: i64, pub pszLastOriginatingDsaDN: super::super::Foundation::PWSTR, pub dwUserIdentifier: u32, pub dwPriorLinkState: u32, pub dwCurrentLinkState: u32, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPL_VALUE_META_DATA_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPL_VALUE_META_DATA_EXT { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_ASYNCHRONOUS_OPERATION: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_UPDATE_ADDRESS: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_UPDATE_FLAGS: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_UPDATE_INSTANCE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_UPDATE_RESULT: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_UPDATE_SCHEDULE: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_UPDATE_TRANSPORT: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPMOD_WRITEABLE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_CROSS_SITE_BOUNDARIES: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_DO_NOT_SYNC: u32 = 8u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_ERRINFOA { pub pszSvrId: super::super::Foundation::PSTR, pub error: DS_REPSYNCALL_ERROR, pub dwWin32Err: u32, pub pszSrcId: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPSYNCALL_ERRINFOA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPSYNCALL_ERRINFOA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_ERRINFOW { pub pszSvrId: super::super::Foundation::PWSTR, pub error: DS_REPSYNCALL_ERROR, pub dwWin32Err: u32, pub pszSrcId: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPSYNCALL_ERRINFOW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPSYNCALL_ERRINFOW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_REPSYNCALL_ERROR = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER: DS_REPSYNCALL_ERROR = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_WIN32_ERROR_REPLICATING: DS_REPSYNCALL_ERROR = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_SERVER_UNREACHABLE: DS_REPSYNCALL_ERROR = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_REPSYNCALL_EVENT = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_EVENT_ERROR: DS_REPSYNCALL_EVENT = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_EVENT_SYNC_STARTED: DS_REPSYNCALL_EVENT = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_EVENT_SYNC_COMPLETED: DS_REPSYNCALL_EVENT = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_EVENT_FINISHED: DS_REPSYNCALL_EVENT = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_ID_SERVERS_BY_DN: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_NO_OPTIONS: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_PUSH_CHANGES_OUTWARD: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_SKIP_INITIAL_CHECK: u32 = 16u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_SYNCA { pub pszSrcId: super::super::Foundation::PSTR, pub pszDstId: super::super::Foundation::PSTR, pub pszNC: super::super::Foundation::PSTR, pub pguidSrc: *mut ::windows_sys::core::GUID, pub pguidDst: *mut ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPSYNCALL_SYNCA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPSYNCALL_SYNCA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_SYNCW { pub pszSrcId: super::super::Foundation::PWSTR, pub pszDstId: super::super::Foundation::PWSTR, pub pszNC: super::super::Foundation::PWSTR, pub pguidSrc: *mut ::windows_sys::core::GUID, pub pguidDst: *mut ::windows_sys::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPSYNCALL_SYNCW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPSYNCALL_SYNCW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY: u32 = 2u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_UPDATEA { pub event: DS_REPSYNCALL_EVENT, pub pErrInfo: *mut DS_REPSYNCALL_ERRINFOA, pub pSync: *mut DS_REPSYNCALL_SYNCA, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPSYNCALL_UPDATEA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPSYNCALL_UPDATEA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_REPSYNCALL_UPDATEW { pub event: DS_REPSYNCALL_EVENT, pub pErrInfo: *mut DS_REPSYNCALL_ERRINFOW, pub pSync: *mut DS_REPSYNCALL_SYNCW, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_REPSYNCALL_UPDATEW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_REPSYNCALL_UPDATEW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_ABANDONED: u32 = 32768u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_ADD_REFERENCE: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_ASYNCHRONOUS_OPERATION: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_ASYNCHRONOUS_REPLICA: u32 = 1048576u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_CRITICAL: u32 = 2097152u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_FORCE: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_FULL: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_FULL_IN_PROGRESS: u32 = 4194304u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_INITIAL: u32 = 8192u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_INITIAL_IN_PROGRESS: u32 = 65536u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_INTERSITE_MESSAGING: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_NEVER_COMPLETED: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_NEVER_NOTIFY: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_NONGC_RO_REPLICA: u32 = 16777216u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_NOTIFICATION: u32 = 524288u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_NO_DISCARD: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_PARTIAL_ATTRIBUTE_SET: u32 = 131072u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_PERIODIC: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_PREEMPTED: u32 = 8388608u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_REQUEUE: u32 = 262144u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_SELECT_SECRETS: u32 = 32768u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_TWO_WAY: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_URGENT: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_USE_COMPRESSION: u32 = 16384u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPSYNC_WRITEABLE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPUPD_ADD_REFERENCE: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPUPD_ASYNCHRONOUS_OPERATION: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPUPD_DELETE_REFERENCE: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPUPD_REFERENCE_GCSPN: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_REPUPD_WRITEABLE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_RETURN_DNS_NAME: u32 = 1073741824u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_RETURN_FLAT_NAME: u32 = 2147483648u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ROLE_DOMAIN_OWNER: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ROLE_INFRASTRUCTURE_OWNER: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ROLE_PDC_OWNER: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ROLE_RID_OWNER: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_ROLE_SCHEMA_OWNER: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SCHEMA_GUID_ATTR: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SCHEMA_GUID_ATTR_SET: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SCHEMA_GUID_CLASS: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SCHEMA_GUID_CONTROL_RIGHT: u32 = 4u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_SCHEMA_GUID_MAPA { pub guid: ::windows_sys::core::GUID, pub guidType: u32, pub pName: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_SCHEMA_GUID_MAPA {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_SCHEMA_GUID_MAPA { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct DS_SCHEMA_GUID_MAPW { pub guid: ::windows_sys::core::GUID, pub guidType: u32, pub pName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DS_SCHEMA_GUID_MAPW {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DS_SCHEMA_GUID_MAPW { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SCHEMA_GUID_NOT_FOUND: u32 = 0u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub struct DS_SELECTION { pub pwzName: super::super::Foundation::PWSTR, pub pwzADsPath: super::super::Foundation::PWSTR, pub pwzClass: super::super::Foundation::PWSTR, pub pwzUPN: super::super::Foundation::PWSTR, pub pvarFetchedAttributes: *mut super::super::System::Com::VARIANT, pub flScopeType: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::marker::Copy for DS_SELECTION {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::clone::Clone for DS_SELECTION { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_System_Com', 'Win32_System_Ole'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub struct DS_SELECTION_LIST { pub cItems: u32, pub cFetchedAttributes: u32, pub aDsSelection: [DS_SELECTION; 1], } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::marker::Copy for DS_SELECTION_LIST {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] impl ::core::clone::Clone for DS_SELECTION_LIST { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SELECT_SECRET_DOMAIN_6_FLAG: u32 = 2048u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct DS_SITE_COST_INFO { pub errorCode: u32, pub cost: u32, } impl ::core::marker::Copy for DS_SITE_COST_INFO {} impl ::core::clone::Clone for DS_SITE_COST_INFO { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_SPN_NAME_TYPE = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_DNS_HOST: DS_SPN_NAME_TYPE = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_DN_HOST: DS_SPN_NAME_TYPE = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_NB_HOST: DS_SPN_NAME_TYPE = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_DOMAIN: DS_SPN_NAME_TYPE = 3i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_NB_DOMAIN: DS_SPN_NAME_TYPE = 4i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_SERVICE: DS_SPN_NAME_TYPE = 5i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub type DS_SPN_WRITE_OP = i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_ADD_SPN_OP: DS_SPN_WRITE_OP = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_REPLACE_SPN_OP: DS_SPN_WRITE_OP = 1i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SPN_DELETE_SPN_OP: DS_SPN_WRITE_OP = 2i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SYNCED_EVENT_NAME: &'static str = "NTDSInitialSyncsCompleted"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_SYNCED_EVENT_NAME_W: &'static str = "NTDSInitialSyncsCompleted"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_TIMESERV_FLAG: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_TIMESERV_REQUIRED: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_TRY_NEXTCLOSEST_SITE: u32 = 262144u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_WEB_SERVICE_REQUIRED: u32 = 1048576u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_WRITABLE_FLAG: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_WRITABLE_REQUIRED: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const DS_WS_FLAG: u32 = 8192u32; pub const Email: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2408753239, data2: 18318, data3: 4561, data4: [163, 180, 0, 192, 79, 185, 80, 220] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FACILITY_BACKUP: u32 = 2047u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FACILITY_NTDSB: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FACILITY_SYSTEM: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FLAG_DISABLABLE_OPTIONAL_FEATURE: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FLAG_DOMAIN_OPTIONAL_FEATURE: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FLAG_FOREST_OPTIONAL_FEATURE: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FLAG_SERVER_OPTIONAL_FEATURE: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FRSCONN_MAX_PRIORITY: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const FRSCONN_PRIORITY_MASK: u32 = 1879048192u32; pub const FaxNumber: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2768642581, data2: 18049, data3: 4561, data4: [163, 180, 0, 192, 79, 185, 80, 220] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_COMPUTRS_CONTAINER_A: &'static str = "aa312825768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_COMPUTRS_CONTAINER_W: &'static str = "aa312825768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_DELETED_OBJECTS_CONTAINER_A: &'static str = "18e2ea80684f11d2b9aa00c04f79f805"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_DELETED_OBJECTS_CONTAINER_W: &'static str = "18e2ea80684f11d2b9aa00c04f79f805"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_DOMAIN_CONTROLLERS_CONTAINER_A: &'static str = "a361b2ffffd211d1aa4b00c04fd7d83a"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_DOMAIN_CONTROLLERS_CONTAINER_W: &'static str = "a361b2ffffd211d1aa4b00c04fd7d83a"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A: &'static str = "22b70c67d56e4efb91e9300fca3dc1aa"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W: &'static str = "22b70c67d56e4efb91e9300fca3dc1aa"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_INFRASTRUCTURE_CONTAINER_A: &'static str = "2fbac1870ade11d297c400c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_INFRASTRUCTURE_CONTAINER_W: &'static str = "2fbac1870ade11d297c400c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_KEYS_CONTAINER_W: &'static str = "<KEY>"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_LOSTANDFOUND_CONTAINER_A: &'static str = "ab8153b7768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_LOSTANDFOUND_CONTAINER_W: &'static str = "ab8153b7768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_MANAGED_SERVICE_ACCOUNTS_CONTAINER_W: &'static str = "<KEY>"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A: &'static str = "f4be92a4c777485e878e9421d53087db"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W: &'static str = "f4be92a4c777485e878e9421d53087db"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_NTDS_QUOTAS_CONTAINER_A: &'static str = "6227f0af1fc2410d8e3bb10615bb5b0f"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_NTDS_QUOTAS_CONTAINER_W: &'static str = "6227f0af1fc2410d8e3bb10615bb5b0f"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_PRIVILEGED_ACCESS_MANAGEMENT_OPTIONAL_FEATURE_A: &'static str = "73e843ece8cc4046b4ab07ffe4ab5bcd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_PRIVILEGED_ACCESS_MANAGEMENT_OPTIONAL_FEATURE_W: &'static str = "73e843ece8cc4046b4ab07ffe4ab5bcd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_PROGRAM_DATA_CONTAINER_A: &'static str = "09460c08ae1e4a4ea0f64aee7daa1e5a"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_PROGRAM_DATA_CONTAINER_W: &'static str = "09460c08ae1e4a4ea0f64aee7daa1e5a"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_RECYCLE_BIN_OPTIONAL_FEATURE_A: &'static str = "d8dc6d76d0ac5e44f3b9a7f9b6744f2a"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_RECYCLE_BIN_OPTIONAL_FEATURE_W: &'static str = "d8dc6d76d0ac5e44f3b9a7f9b6744f2a"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_SYSTEMS_CONTAINER_A: &'static str = "ab1d30f3768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_SYSTEMS_CONTAINER_W: &'static str = "ab1d30f3768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_USERS_CONTAINER_A: &'static str = "a9d1ca15768811d1aded00c04fd8d5cd"; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const GUID_USERS_CONTAINER_W: &'static str = "a9d1ca15768811d1aded00c04fd8d5cd"; pub type GetDcContextHandle = isize; pub const Hold: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3014475283, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; pub type IADs = *mut ::core::ffi::c_void; pub type IADsADSystemInfo = *mut ::core::ffi::c_void; pub type IADsAccessControlEntry = *mut ::core::ffi::c_void; pub type IADsAccessControlList = *mut ::core::ffi::c_void; pub type IADsAcl = *mut ::core::ffi::c_void; pub type IADsAggregatee = *mut ::core::ffi::c_void; pub type IADsAggregator = *mut ::core::ffi::c_void; pub type IADsBackLink = *mut ::core::ffi::c_void; pub type IADsCaseIgnoreList = *mut ::core::ffi::c_void; pub type IADsClass = *mut ::core::ffi::c_void; pub type IADsCollection = *mut ::core::ffi::c_void; pub type IADsComputer = *mut ::core::ffi::c_void; pub type IADsComputerOperations = *mut ::core::ffi::c_void; pub type IADsContainer = *mut ::core::ffi::c_void; pub type IADsDNWithBinary = *mut ::core::ffi::c_void; pub type IADsDNWithString = *mut ::core::ffi::c_void; pub type IADsDeleteOps = *mut ::core::ffi::c_void; pub type IADsDomain = *mut ::core::ffi::c_void; pub type IADsEmail = *mut ::core::ffi::c_void; pub type IADsExtension = *mut ::core::ffi::c_void; pub type IADsFaxNumber = *mut ::core::ffi::c_void; pub type IADsFileService = *mut ::core::ffi::c_void; pub type IADsFileServiceOperations = *mut ::core::ffi::c_void; pub type IADsFileShare = *mut ::core::ffi::c_void; pub type IADsGroup = *mut ::core::ffi::c_void; pub type IADsHold = *mut ::core::ffi::c_void; pub type IADsLargeInteger = *mut ::core::ffi::c_void; pub type IADsLocality = *mut ::core::ffi::c_void; pub type IADsMembers = *mut ::core::ffi::c_void; pub type IADsNameTranslate = *mut ::core::ffi::c_void; pub type IADsNamespaces = *mut ::core::ffi::c_void; pub type IADsNetAddress = *mut ::core::ffi::c_void; pub type IADsO = *mut ::core::ffi::c_void; pub type IADsOU = *mut ::core::ffi::c_void; pub type IADsObjectOptions = *mut ::core::ffi::c_void; pub type IADsOctetList = *mut ::core::ffi::c_void; pub type IADsOpenDSObject = *mut ::core::ffi::c_void; pub type IADsPath = *mut ::core::ffi::c_void; pub type IADsPathname = *mut ::core::ffi::c_void; pub type IADsPostalAddress = *mut ::core::ffi::c_void; pub type IADsPrintJob = *mut ::core::ffi::c_void; pub type IADsPrintJobOperations = *mut ::core::ffi::c_void; pub type IADsPrintQueue = *mut ::core::ffi::c_void; pub type IADsPrintQueueOperations = *mut ::core::ffi::c_void; pub type IADsProperty = *mut ::core::ffi::c_void; pub type IADsPropertyEntry = *mut ::core::ffi::c_void; pub type IADsPropertyList = *mut ::core::ffi::c_void; pub type IADsPropertyValue = *mut ::core::ffi::c_void; pub type IADsPropertyValue2 = *mut ::core::ffi::c_void; pub type IADsReplicaPointer = *mut ::core::ffi::c_void; pub type IADsResource = *mut ::core::ffi::c_void; pub type IADsSecurityDescriptor = *mut ::core::ffi::c_void; pub type IADsSecurityUtility = *mut ::core::ffi::c_void; pub type IADsService = *mut ::core::ffi::c_void; pub type IADsServiceOperations = *mut ::core::ffi::c_void; pub type IADsSession = *mut ::core::ffi::c_void; pub type IADsSyntax = *mut ::core::ffi::c_void; pub type IADsTimestamp = *mut ::core::ffi::c_void; pub type IADsTypedName = *mut ::core::ffi::c_void; pub type IADsUser = *mut ::core::ffi::c_void; pub type IADsWinNTSystemInfo = *mut ::core::ffi::c_void; pub type ICommonQuery = *mut ::core::ffi::c_void; pub type IDirectoryObject = *mut ::core::ffi::c_void; pub type IDirectorySchemaMgmt = *mut ::core::ffi::c_void; pub type IDirectorySearch = *mut ::core::ffi::c_void; pub type IDsAdminCreateObj = *mut ::core::ffi::c_void; pub type IDsAdminNewObj = *mut ::core::ffi::c_void; pub type IDsAdminNewObjExt = *mut ::core::ffi::c_void; pub type IDsAdminNewObjPrimarySite = *mut ::core::ffi::c_void; pub type IDsAdminNotifyHandler = *mut ::core::ffi::c_void; pub type IDsBrowseDomainTree = *mut ::core::ffi::c_void; pub type IDsDisplaySpecifier = *mut ::core::ffi::c_void; pub type IDsObjectPicker = *mut ::core::ffi::c_void; pub type IDsObjectPickerCredentials = *mut ::core::ffi::c_void; pub type IPersistQuery = *mut ::core::ffi::c_void; pub type IPrivateDispatch = *mut ::core::ffi::c_void; pub type IPrivateUnknown = *mut ::core::ffi::c_void; pub type IQueryForm = *mut ::core::ffi::c_void; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub type LPCQADDFORMSPROC = ::core::option::Option<unsafe extern "system" fn(lparam: super::super::Foundation::LPARAM, pform: *mut CQFORM) -> ::windows_sys::core::HRESULT>; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub type LPCQADDPAGESPROC = ::core::option::Option<unsafe extern "system" fn(lparam: super::super::Foundation::LPARAM, clsidform: *const ::windows_sys::core::GUID, ppage: *mut CQPAGE) -> ::windows_sys::core::HRESULT>; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation', 'Win32_UI_WindowsAndMessaging'*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub type LPCQPAGEPROC = ::core::option::Option<unsafe extern "system" fn(ppage: *mut CQPAGE, hwnd: super::super::Foundation::HWND, umsg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM) -> ::windows_sys::core::HRESULT>; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub type LPDSENUMATTRIBUTES = ::core::option::Option<unsafe extern "system" fn(lparam: super::super::Foundation::LPARAM, pszattributename: super::super::Foundation::PWSTR, pszdisplayname: super::super::Foundation::PWSTR, dwflags: u32) -> ::windows_sys::core::HRESULT>; pub const LargeInteger: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2457432565, data2: 2361, data3: 4561, data4: [139, 225, 0, 192, 79, 216, 213, 3] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSAPI_BIND_ALLOW_DELEGATION: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSAPI_BIND_FIND_BINDING: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSAPI_BIND_FORCE_KERBEROS: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_GC_TOPOLOGY: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_INTERSITE_GC_TOPOLOGY: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_INTERSITE_TOPOLOGY: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_MINIMIZE_HOPS_TOPOLOGY: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_NO_REASON: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_OSCILLATING_CONNECTION_TOPOLOGY: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_REDUNDANT_SERVER_TOPOLOGY: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_RING_TOPOLOGY: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_SERVER_FAILOVER_TOPOLOGY: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_SITE_FAILOVER_TOPOLOGY: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_KCC_STALE_SERVERS_TOPOLOGY: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_IGNORE_SCHEDULE_MASK: u32 = 2147483648u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_IS_GENERATED: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_RODC_TOPOLOGY: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_TWOWAY_SYNC: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_USER_OWNED_SCHEDULE: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSCONN_OPT_USE_NOTIFY: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_BLOCK_RPC: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_DISABLE_INBOUND_REPL: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_DISABLE_OUTBOUND_REPL: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_DISABLE_SPN_REGISTRATION: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_GENERATE_OWN_TOPO: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSDSA_OPT_IS_GC: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_DEFAULT_SERVER_REDUNDANCY: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED: u32 = 256u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_REDUNDANT_SERVER_TOPOLOGY_ENABLED: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_W2K3_BRIDGES_REQUIRED: u32 = 4096u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSETTINGS_OPT_W2K3_IGNORE_SCHEDULES: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSITECONN_OPT_DISABLE_COMPRESSION: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSITECONN_OPT_TWOWAY_SYNC: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSITECONN_OPT_USE_NOTIFY: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSITELINK_OPT_DISABLE_COMPRESSION: u32 = 4u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSITELINK_OPT_TWOWAY_SYNC: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSSITELINK_OPT_USE_NOTIFY: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSTRANSPORT_OPT_BRIDGES_REQUIRED: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const NTDSTRANSPORT_OPT_IGNORE_SCHEDULES: u32 = 1u32; pub const NameTranslate: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 659533343, data2: 13862, data3: 4561, data4: [163, 164, 0, 192, 79, 185, 80, 220] }; pub const NetAddress: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2964787783, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_System_Com', 'Win32_System_Com_StructuredStorage'*"] #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub struct OPENQUERYWINDOW { pub cbStruct: u32, pub dwFlags: u32, pub clsidHandler: ::windows_sys::core::GUID, pub pHandlerParameters: *mut ::core::ffi::c_void, pub clsidDefaultForm: ::windows_sys::core::GUID, pub pPersistQuery: IPersistQuery, pub Anonymous: OPENQUERYWINDOW_0, } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] impl ::core::marker::Copy for OPENQUERYWINDOW {} #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] impl ::core::clone::Clone for OPENQUERYWINDOW { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_System_Com', 'Win32_System_Com_StructuredStorage'*"] #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] pub union OPENQUERYWINDOW_0 { pub pFormParameters: *mut ::core::ffi::c_void, pub ppbFormParameters: super::super::System::Com::StructuredStorage::IPropertyBag, } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] impl ::core::marker::Copy for OPENQUERYWINDOW_0 {} #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Com_StructuredStorage"))] impl ::core::clone::Clone for OPENQUERYWINDOW_0 { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_DEFAULTFORM: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_HIDEMENUS: u32 = 1024u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_HIDESEARCHUI: u32 = 2048u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_ISSUEONOPEN: u32 = 64u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_LOADQUERY: u32 = 8u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_OKCANCEL: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_PARAMISPROPERTYBAG: u32 = 2147483648u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_REMOVEFORMS: u32 = 32u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_REMOVESCOPES: u32 = 16u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_SAVEQUERYONOK: u32 = 512u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_SHOWOPTIONAL: u32 = 128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const OQWF_SINGLESELECT: u32 = 4u32; pub const OctetList: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 306266127, data2: 18048, data3: 4561, data4: [163, 180, 0, 192, 79, 185, 80, 220] }; pub const Path: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2991819033, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; pub const Pathname: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 135073144, data2: 62497, data3: 4560, data4: [163, 110, 0, 192, 79, 185, 80, 220] }; pub const PostalAddress: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 175484877, data2: 18048, data3: 4561, data4: [163, 180, 0, 192, 79, 185, 80, 220] }; pub const PropertyEntry: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1926491586, data2: 42180, data3: 4560, data4: [133, 51, 0, 192, 79, 216, 213, 3] }; pub const PropertyValue: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2073966768, data2: 43388, data3: 4560, data4: [133, 52, 0, 192, 79, 216, 213, 3] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const QUERYFORM_CHANGESFORMLIST: u64 = 1u64; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const QUERYFORM_CHANGESOPTFORMLIST: u64 = 2u64; pub const ReplicaPointer: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4124162783, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct SCHEDULE { pub Size: u32, pub Bandwidth: u32, pub NumberOfSchedules: u32, pub Schedules: [SCHEDULE_HEADER; 1], } impl ::core::marker::Copy for SCHEDULE {} impl ::core::clone::Clone for SCHEDULE { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const SCHEDULE_BANDWIDTH: u32 = 1u32; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub struct SCHEDULE_HEADER { pub Type: u32, pub Offset: u32, } impl ::core::marker::Copy for SCHEDULE_HEADER {} impl ::core::clone::Clone for SCHEDULE_HEADER { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const SCHEDULE_INTERVAL: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const SCHEDULE_PRIORITY: u32 = 2u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const STATUS_SEVERITY_ERROR: u32 = 3u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const STATUS_SEVERITY_INFORMATIONAL: u32 = 1u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const STATUS_SEVERITY_SUCCESS: u32 = 0u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const STATUS_SEVERITY_WARNING: u32 = 2u32; pub const SecurityDescriptor: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3109615420, data2: 39901, data3: 4560, data4: [133, 44, 0, 192, 79, 216, 213, 3] }; pub const Timestamp: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2998850283, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; pub const TypedName: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3006350283, data2: 16512, data3: 4561, data4: [163, 172, 0, 192, 79, 185, 80, 220] }; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_APPLY: u32 = 2128u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_CHANGE: u32 = 2127u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_ERROR: u32 = 2134u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_EXIT: u32 = 2131u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_FOREGROUND: u32 = 2130u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_PAGEHWND: u32 = 2126u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_PAGEINIT: u32 = 2125u32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const WM_ADSPROP_NOTIFY_SETFOCUS: u32 = 2129u32; pub const WinNTSystemInfo: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1712860868, data2: 45009, data3: 4562, data4: [156, 185, 0, 0, 248, 122, 54, 158] }; #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ads_search_column { pub pszAttrName: super::super::Foundation::PWSTR, pub dwADsType: ADSTYPEENUM, pub pADsValues: *mut ADSVALUE, pub dwNumValues: u32, pub hReserved: super::super::Foundation::HANDLE, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ads_search_column {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ads_search_column { fn clone(&self) -> Self { *self } } #[repr(C)] #[doc = "*Required features: 'Win32_Networking_ActiveDirectory', 'Win32_Foundation'*"] #[cfg(feature = "Win32_Foundation")] pub struct ads_searchpref_info { pub dwSearchPref: ADS_SEARCHPREF_ENUM, pub vValue: ADSVALUE, pub dwStatus: ADS_STATUSENUM, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for ads_searchpref_info {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for ads_searchpref_info { fn clone(&self) -> Self { *self } } #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrAccessDenied: ::windows_sys::core::HRESULT = -939522189i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrAfterInitialization: ::windows_sys::core::HRESULT = -939522246i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrAlreadyInitialized: ::windows_sys::core::HRESULT = -939523066i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrAlreadyOpen: ::windows_sys::core::HRESULT = -939589627i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrAlreadyPrepared: ::windows_sys::core::HRESULT = -939522489i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBFInUse: ::windows_sys::core::HRESULT = -939523894i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBFNotSynchronous: ::windows_sys::core::HRESULT = -2013265720i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBFPageNotFound: ::windows_sys::core::HRESULT = -2013265719i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBackupDirectoryNotEmpty: ::windows_sys::core::HRESULT = -939523592i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBackupInProgress: ::windows_sys::core::HRESULT = -939523591i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBackupNotAllowedYet: ::windows_sys::core::HRESULT = -939523573i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadBackupDatabaseSize: ::windows_sys::core::HRESULT = -939523535i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadCheckpointSignature: ::windows_sys::core::HRESULT = -939523564i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadColumnId: ::windows_sys::core::HRESULT = -939522579i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadDbSignature: ::windows_sys::core::HRESULT = -939523565i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadItagSequence: ::windows_sys::core::HRESULT = -939522578i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadLogSignature: ::windows_sys::core::HRESULT = -939523566i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBadLogVersion: ::windows_sys::core::HRESULT = -939523582i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBufferTooSmall: ::windows_sys::core::HRESULT = -939523058i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrBufferTruncated: ::windows_sys::core::HRESULT = -2013264914i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCannotBeTagged: ::windows_sys::core::HRESULT = -939522575i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCannotRename: ::windows_sys::core::HRESULT = -939522790i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCheckpointCorrupt: ::windows_sys::core::HRESULT = -939523563i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCircularLogging: ::windows_sys::core::HRESULT = -939589621i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumn2ndSysMaint: ::windows_sys::core::HRESULT = -939522586i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnCannotIndex: ::windows_sys::core::HRESULT = -939522583i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnDoesNotFit: ::windows_sys::core::HRESULT = -939522593i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnDuplicate: ::windows_sys::core::HRESULT = -939522588i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnInUse: ::windows_sys::core::HRESULT = -939523050i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnIndexed: ::windows_sys::core::HRESULT = -939522591i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnLong: ::windows_sys::core::HRESULT = -939522595i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnMaxTruncated: ::windows_sys::core::HRESULT = -2013264408i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnNotFound: ::windows_sys::core::HRESULT = -939522589i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnNotUpdatable: ::windows_sys::core::HRESULT = -939523048i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnNull: ::windows_sys::core::HRESULT = -2013264916i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnSetNull: ::windows_sys::core::HRESULT = -2013264852i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrColumnTooBig: ::windows_sys::core::HRESULT = -939522590i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCommunicationError: ::windows_sys::core::HRESULT = -939589619i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrConsistentTimeMismatch: ::windows_sys::core::HRESULT = -939523545i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrContainerNotEmpty: ::windows_sys::core::HRESULT = -939523053i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrContentsExpired: ::windows_sys::core::HRESULT = -939589615i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCouldNotConnect: ::windows_sys::core::HRESULT = -939589625i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCreateIndexFailed: ::windows_sys::core::HRESULT = -2013264511i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrCurrencyStackOutOfMemory: ::windows_sys::core::HRESULT = -939523026i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseAttached: ::windows_sys::core::HRESULT = -2013264913i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseCorrupted: ::windows_sys::core::HRESULT = -939522890i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseDuplicate: ::windows_sys::core::HRESULT = -939522895i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseInUse: ::windows_sys::core::HRESULT = -939522894i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseInconsistent: ::windows_sys::core::HRESULT = -939523546i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseInvalidName: ::windows_sys::core::HRESULT = -939522892i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseInvalidPages: ::windows_sys::core::HRESULT = -939522891i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseLocked: ::windows_sys::core::HRESULT = -939522889i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDatabaseNotFound: ::windows_sys::core::HRESULT = -939522893i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDeleteBackupFileFail: ::windows_sys::core::HRESULT = -939523572i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDensityInvalid: ::windows_sys::core::HRESULT = -939522789i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDiskFull: ::windows_sys::core::HRESULT = -939522288i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrDiskIO: ::windows_sys::core::HRESULT = -939523074i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrError: ::windows_sys::core::HRESULT = -939589630i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrExistingLogFileHasBadSignature: ::windows_sys::core::HRESULT = -2013265362i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrExistingLogFileIsNotContiguous: ::windows_sys::core::HRESULT = -2013265361i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFLDKeyTooBig: ::windows_sys::core::HRESULT = -2013265520i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFLDNullKey: ::windows_sys::core::HRESULT = -2013265518i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFLDTooManySegments: ::windows_sys::core::HRESULT = -939523695i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFeatureNotAvailable: ::windows_sys::core::HRESULT = -939523095i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFileAccessDenied: ::windows_sys::core::HRESULT = -939523064i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFileClose: ::windows_sys::core::HRESULT = -939523994i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFileNotFound: ::windows_sys::core::HRESULT = -939522285i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFileOpenReadOnly: ::windows_sys::core::HRESULT = -2013264107i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrFullBackupNotTaken: ::windows_sys::core::HRESULT = -939589618i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrGivenLogFileHasBadSignature: ::windows_sys::core::HRESULT = -939523541i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrGivenLogFileIsNotContiguous: ::windows_sys::core::HRESULT = -939523540i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIllegalOperation: ::windows_sys::core::HRESULT = -939522784i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInTransaction: ::windows_sys::core::HRESULT = -939522988i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIncrementalBackupDisabled: ::windows_sys::core::HRESULT = -939589623i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexCantBuild: ::windows_sys::core::HRESULT = -939522695i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexDuplicate: ::windows_sys::core::HRESULT = -939522693i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexHasClustered: ::windows_sys::core::HRESULT = -939522688i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexHasPrimary: ::windows_sys::core::HRESULT = -939522694i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexInUse: ::windows_sys::core::HRESULT = -939523045i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexInvalidDef: ::windows_sys::core::HRESULT = -939522690i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexMustStay: ::windows_sys::core::HRESULT = -939522691i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrIndexNotFound: ::windows_sys::core::HRESULT = -939522692i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidBackup: ::windows_sys::core::HRESULT = -939523570i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidBackupSequence: ::windows_sys::core::HRESULT = -939523575i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidBookmark: ::windows_sys::core::HRESULT = -939523051i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidBufferSize: ::windows_sys::core::HRESULT = -939523049i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidCodePage: ::windows_sys::core::HRESULT = -939523033i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidColumnType: ::windows_sys::core::HRESULT = -939522585i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidCountry: ::windows_sys::core::HRESULT = -939523035i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidDatabase: ::windows_sys::core::HRESULT = -939523068i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidDatabaseId: ::windows_sys::core::HRESULT = -939523086i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidFilename: ::windows_sys::core::HRESULT = -939523052i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidHandle: ::windows_sys::core::HRESULT = -939589629i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidLanguageId: ::windows_sys::core::HRESULT = -939523034i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidLogSequence: ::windows_sys::core::HRESULT = -939523581i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidName: ::windows_sys::core::HRESULT = -939523094i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidObject: ::windows_sys::core::HRESULT = -939522780i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidOnSort: ::windows_sys::core::HRESULT = -939522394i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidOperation: ::windows_sys::core::HRESULT = -939522190i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidParam: ::windows_sys::core::HRESULT = -939589631i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidParameter: ::windows_sys::core::HRESULT = -939523093i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidPath: ::windows_sys::core::HRESULT = -939523073i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidRecips: ::windows_sys::core::HRESULT = -939589626i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidSesid: ::windows_sys::core::HRESULT = -939522992i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrInvalidTableId: ::windows_sys::core::HRESULT = -939522786i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrKeyChanged: ::windows_sys::core::HRESULT = -2013264302i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrKeyDuplicate: ::windows_sys::core::HRESULT = -939522491i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrKeyIsMade: ::windows_sys::core::HRESULT = -939522580i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrKeyNotMade: ::windows_sys::core::HRESULT = -939522488i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogBufferTooSmall: ::windows_sys::core::HRESULT = -939523579i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogCorrupted: ::windows_sys::core::HRESULT = -939522244i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogDiskFull: ::windows_sys::core::HRESULT = -939523567i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogFileCorrupt: ::windows_sys::core::HRESULT = -939523595i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogFileNotFound: ::windows_sys::core::HRESULT = -939589622i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogSequenceEnd: ::windows_sys::core::HRESULT = -939523577i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLogWriteFail: ::windows_sys::core::HRESULT = -939523586i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrLoggingDisabled: ::windows_sys::core::HRESULT = -939523580i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrMakeBackupDirectoryFail: ::windows_sys::core::HRESULT = -939523571i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrMissingExpiryToken: ::windows_sys::core::HRESULT = -939589617i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrMissingFullBackup: ::windows_sys::core::HRESULT = -939523536i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrMissingLogFile: ::windows_sys::core::HRESULT = -939523568i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrMissingPreviousLogFile: ::windows_sys::core::HRESULT = -939523587i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrMissingRestoreLogFiles: ::windows_sys::core::HRESULT = -939523539i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoBackup: ::windows_sys::core::HRESULT = -939523576i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoBackupDirectory: ::windows_sys::core::HRESULT = -939523593i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoCurrentIndex: ::windows_sys::core::HRESULT = -939522581i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoCurrentRecord: ::windows_sys::core::HRESULT = -939522493i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoFullRestore: ::windows_sys::core::HRESULT = -939589620i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoIdleActivity: ::windows_sys::core::HRESULT = -2013264862i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNoWriteLock: ::windows_sys::core::HRESULT = -2013264853i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNone: ::windows_sys::core::HRESULT = 0i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNotInTransaction: ::windows_sys::core::HRESULT = -939523042i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNotInitialized: ::windows_sys::core::HRESULT = -939523067i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNullInvalid: ::windows_sys::core::HRESULT = -939522592i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNullKeyDisallowed: ::windows_sys::core::HRESULT = -939523043i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrNyi: ::windows_sys::core::HRESULT = -1073741823i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrObjectDuplicate: ::windows_sys::core::HRESULT = -939522782i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrObjectNotFound: ::windows_sys::core::HRESULT = -939522791i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfBuffers: ::windows_sys::core::HRESULT = -939523082i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfCursors: ::windows_sys::core::HRESULT = -939523083i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfDatabaseSpace: ::windows_sys::core::HRESULT = -939523084i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfFileHandles: ::windows_sys::core::HRESULT = -939523076i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfMemory: ::windows_sys::core::HRESULT = -939523085i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfSessions: ::windows_sys::core::HRESULT = -939522995i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrOutOfThreads: ::windows_sys::core::HRESULT = -939523993i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrPMRecDeleted: ::windows_sys::core::HRESULT = -939523794i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrPatchFileMismatch: ::windows_sys::core::HRESULT = -939523544i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrPermissionDenied: ::windows_sys::core::HRESULT = -939522287i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrReadVerifyFailure: ::windows_sys::core::HRESULT = -939523078i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRecordClusteredChanged: ::windows_sys::core::HRESULT = -939522492i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRecordDeleted: ::windows_sys::core::HRESULT = -939523079i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRecordNotFound: ::windows_sys::core::HRESULT = -939522495i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRecordTooBig: ::windows_sys::core::HRESULT = -939523070i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRecoveredWithErrors: ::windows_sys::core::HRESULT = -939523569i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRemainingVersions: ::windows_sys::core::HRESULT = -2013265599i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRestoreInProgress: ::windows_sys::core::HRESULT = -939589628i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRestoreLogTooHigh: ::windows_sys::core::HRESULT = -939523542i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRestoreLogTooLow: ::windows_sys::core::HRESULT = -939523543i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrRestoreMapExists: ::windows_sys::core::HRESULT = -939589624i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrSeekNotEqual: ::windows_sys::core::HRESULT = -2013264881i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrSessionWriteConflict: ::windows_sys::core::HRESULT = -939522989i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTableDuplicate: ::windows_sys::core::HRESULT = -939522793i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTableEmpty: ::windows_sys::core::HRESULT = -2013264619i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTableInUse: ::windows_sys::core::HRESULT = -939522792i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTableLocked: ::windows_sys::core::HRESULT = -939522794i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTableNotEmpty: ::windows_sys::core::HRESULT = -939522788i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTaggedNotNULL: ::windows_sys::core::HRESULT = -939522582i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTempFileOpenError: ::windows_sys::core::HRESULT = -939522293i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTermInProgress: ::windows_sys::core::HRESULT = -939523096i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyActiveUsers: ::windows_sys::core::HRESULT = -939523037i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyAttachedDatabases: ::windows_sys::core::HRESULT = -939522291i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyColumns: ::windows_sys::core::HRESULT = -939523056i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyIO: ::windows_sys::core::HRESULT = -939523991i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyIndexes: ::windows_sys::core::HRESULT = -939523081i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyKeys: ::windows_sys::core::HRESULT = -939523080i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyOpenDatabases: ::windows_sys::core::HRESULT = -939523069i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyOpenIndexes: ::windows_sys::core::HRESULT = -939522686i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManyOpenTables: ::windows_sys::core::HRESULT = -939522785i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTooManySorts: ::windows_sys::core::HRESULT = -939522395i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrTransTooDeep: ::windows_sys::core::HRESULT = -939522993i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrUnknownExpiryTokenFormat: ::windows_sys::core::HRESULT = -939589616i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrUpdateNotPrepared: ::windows_sys::core::HRESULT = -939522487i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrVersionStoreOutOfMemory: ::windows_sys::core::HRESULT = -939523027i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrWriteConflict: ::windows_sys::core::HRESULT = -939522994i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrerrDataHasChanged: ::windows_sys::core::HRESULT = -939522485i32; #[doc = "*Required features: 'Win32_Networking_ActiveDirectory'*"] pub const hrwrnDataHasChanged: ::windows_sys::core::HRESULT = -2013264310i32;
<filename>src/app/java/pages/web/herokuapp/CheckboxesPage.java<gh_stars>1-10 package pages.web.herokuapp; import core.web.selenium.BaseWebPage; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; public class CheckboxesPage extends BaseWebPage { private final By checkBox1 = By.xpath("(//input[@type='checkbox'])[1]"); private final By checkBox2 = By.xpath("(//input[@type='checkbox'])[2]"); private final WebDriver pageDriver; public CheckboxesPage(WebDriver driver){ this.pageDriver = driver; } public boolean selectCheckBox1(){ selectCheckBox(getWebElement(pageDriver,checkBox1),pageDriver); return isSelected(getWebElement(pageDriver,checkBox1),pageDriver); } public boolean selectCheckBox2(){ selectCheckBox(getWebElement(pageDriver,checkBox2),pageDriver,true,"CheckBox2"); return isSelected(getWebElement(pageDriver,checkBox2),pageDriver); } public boolean deSelectCheckBox1(){ deSelectCheckBox(getWebElement(pageDriver,checkBox1),pageDriver); return isSelected(getWebElement(pageDriver,checkBox1),pageDriver); } public boolean deSelectCheckBox2(){ deSelectCheckBox(getWebElement(pageDriver,checkBox2),pageDriver,true,"CheckBox2"); return isSelected(getWebElement(pageDriver,checkBox2),pageDriver); } }
class Enumerations: """ Enumerations used in the context of the Swydo API. """ @unique class UserState(Enum): """ State of a User. """ revoked = auto() """User is Revoked.""" pending = auto() """User is Pending.""" active = auto() """User is Active.""" @unique class ComparePeriod(Enum): """ Period to compare, in a Report or ReportTemplate. """ previous = auto() """Compare to Previous Period""" lastYear = auto() """Compare to Last Year""" previousMonth = auto() """Compare to Previous Month"""
<reponame>Dimanaux/spring-aop-sample<gh_stars>1-10 package app.handlers; public interface Handler { String respond(String query); }
<reponame>KyleRogers/pitest<gh_stars>0 package org.pitest.mutationtest; import java.io.Serializable; import java.util.Objects; import org.pitest.classinfo.ClassName; import org.pitest.classinfo.HierarchicalClassId; public class ClassHistory implements Serializable { private static final long serialVersionUID = 1L; private final HierarchicalClassId id; private final String coverageId; public ClassHistory(final HierarchicalClassId id, final String coverageId) { this.id = id; this.coverageId = coverageId; } public HierarchicalClassId getId() { return this.id; } public String getCoverageId() { return this.coverageId; } public ClassName getName() { return this.id.getName(); } @Override public int hashCode() { return Objects.hash(id, coverageId); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final ClassHistory other = (ClassHistory) obj; return Objects.equals(id, other.id) && Objects.equals(coverageId, other.coverageId); } }
def log_episode_at_done(self): if self.is_log_episode: self.episode_video = self.episode_video.unsqueeze(0).unsqueeze(2) self.tf_summary.add_video( '{}/{}_{}'.format( self.get_log_tag(), 'log_episode', 'video', ), self.episode_video, self.current_checkpoint_by_frame, ) print('# INFO: [{}][log_episode_at_done][episode_video={}]'.format( self.get_log_tag(), self.episode_video.size(), )) self.episode_video = None self.is_log_episode = False self.last_time_log_episode = time.time() else: if self.last_time_log_episode is not None: if ((time.time() - self.last_time_log_episode) / 60.0 > self.args.log_episode_every_minutes): self.is_log_episode = True
<gh_stars>1000+ // Copyright (c) 1997 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL: https://github.com/CGAL/cgal/blob/v5.1/Polygon/include/CGAL/draw_polygon_2.h $ // $Id: draw_polygon_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : <NAME> <<EMAIL>> #ifndef CGAL_DRAW_POLYGON_2_H #define CGAL_DRAW_POLYGON_2_H #include <CGAL/Qt/Basic_viewer_qt.h> #ifdef DOXYGEN_RUNNING namespace CGAL { /*! \ingroup PkgDrawPolygon2 opens a new window and draws `ap`, an instance of the `CGAL::Polygon_2` class. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires CGAL_Qt5, and is only available if the flag CGAL_USE_BASIC_VIEWER is defined at compile time. \tparam P an instance of the `CGAL::Polygon_2` class. \param ap the polygon to draw. */ template<class P> void draw(const P& ap); } /* namespace CGAL */ #endif #ifdef CGAL_USE_BASIC_VIEWER #include <CGAL/Polygon_2.h> #include <CGAL/Random.h> namespace CGAL { // Viewer class for Polygon_2 template<class P2> class SimplePolygon2ViewerQt : public Basic_viewer_qt { typedef Basic_viewer_qt Base; typedef typename P2::Point_2 Point; public: /// Construct the viewer. /// @param ap2 the polygon to view /// @param title the title of the window SimplePolygon2ViewerQt(QWidget* parent, const P2& ap2, const char* title="Basic Polygon_2 Viewer") : // First draw: vertices; edges, faces; multi-color; no inverse normal Base(parent, title, true, true, true, false, false), p2(ap2) { compute_elements(); } protected: void compute_elements() { clear(); if (p2.is_empty()) return; Point prev=p2.vertex(p2.size()-1); CGAL::Color c(75,160,255); face_begin(c); for (typename P2::Vertex_const_iterator i=p2.vertices_begin(); i!=p2.vertices_end(); ++i) { add_point(*i); // Add vertex add_segment(prev, *i); // Add segment with previous point add_point_in_face(*i); // Add point in face prev=*i; } face_end(); } virtual void keyPressEvent(QKeyEvent *e) { // Test key pressed: // const ::Qt::KeyboardModifiers modifiers = e->modifiers(); // if ((e->key()==Qt::Key_PageUp) && (modifiers==Qt::NoButton)) { ... } // Call: * compute_elements() if the model changed, followed by // * redraw() if some viewing parameters changed that implies some // modifications of the buffers // (eg. type of normal, color/mono) // * update() just to update the drawing // Call the base method to process others/classicals key Base::keyPressEvent(e); } protected: const P2& p2; }; // Specialization of draw function. template<class T, class C> void draw(const CGAL::Polygon_2<T, C>& ap2, const char* title="Polygon_2 Basic Viewer") { #if defined(CGAL_TEST_SUITE) bool cgal_test_suite=true; #else bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE"); #endif if (!cgal_test_suite) { int argc=1; const char* argv[2]={"t2_viewer","\0"}; QApplication app(argc,const_cast<char**>(argv)); SimplePolygon2ViewerQt<CGAL::Polygon_2<T, C> > mainwindow(app.activeWindow(), ap2, title); mainwindow.show(); app.exec(); } } } // End namespace CGAL #endif // CGAL_USE_BASIC_VIEWER #endif // CGAL_DRAW_POLYGON_2_H
/** * Gets the worldServer by the given dimension. */ public WorldServer worldServerForDimension(int dimension) { WorldServer ret = net.minecraftforge.common.DimensionManager.getWorld(dimension); if (ret == null) { net.minecraftforge.common.DimensionManager.initDimension(dimension); ret = net.minecraftforge.common.DimensionManager.getWorld(dimension); } return ret; }
Charge carrier transport and electroluminescence in atomic layer deposited poly-GaN/c-Si heterojunction diodes In this work, we study the charge carrier transport and electroluminescence (EL) in thin-film polycrystalline (poly-) GaN/c-Si heterojunction diodes realized using a plasma enhanced atomic layer deposition process. The fabricated poly-GaN/p-Si diode with a native oxide at the interface showed a rectifying behavior (Ion/Ioff ratio ∼ 103 at ±3 V) with current-voltage characteristics reaching an ideality factor n of ∼5.17. The areal (Ja) and peripheral (Jp) components of the current density were extracted, and their temperature dependencies were studied. The space charge limited current (SCLC) in the presence of traps is identified as the dominant carrier transport mechanism for Ja in forward bias. An effective trap density of 4.6 × 1017/cm3 at a trap energy level of 0.13 eV below the GaN conduction band minimum was estimated by analyzing Ja. Other basic electrical properties of the material such as the free carrier concentration, effective density of states in the conduction band, electron mobility, and dielectric relaxation time were also determined from the current-voltage analysis in the SCLC regime. Further, infrared EL corresponding to the Si bandgap was observed from the fabricated diodes. The observed EL intensity from the GaN/p-Si heterojunction diode is ∼3 orders of magnitude higher as compared to the conventional Si only counterpart. The enhanced infrared light emission is attributed to the improved injector efficiency of the GaN/Si diode because of the wide bandgap of the poly-GaN layer and the resulting band discontinuity at the GaN/Si interface.In this work, we study the charge carrier transport and electroluminescence (EL) in thin-film polycrystalline (poly-) GaN/c-Si heterojunction diodes realized using a plasma enhanced atomic layer deposition process. The fabricated poly-GaN/p-Si diode with a native oxide at the interface showed a rectifying behavior (Ion/Ioff ratio ∼ 103 at ±3 V) with current-voltage characteristics reaching an ideality factor n of ∼5.17. The areal (Ja) and peripheral (Jp) components of the current density were extracted, and their temperature dependencies were studied. The space charge limited current (SCLC) in the presence of traps is identified as the dominant carrier transport mechanism for Ja in forward bias. An effective trap density of 4.6 × 1017/cm3 at a trap energy level of 0.13 eV below the GaN conduction band minimum was estimated by analyzing Ja. Other basic electrical properties of the material such as the free carrier concentration, effective density of states in the conduction band, electron mobility, and die...
Free market ideology, as represented in the nuanced ideas of Adam Smith or F.A. Hayek, has not outlived its purposefulness. Indeed, rejecting this ideology would be not just intellectually tragic. Rejection would be practically tragic, threatening the welfare and well-being of billions of people throughout the world. What we do need to reject is “free market ideology” as caricatured by critics and corrupted by politics. Now more than any time in my professional lifetime actual free market economics needs to capture the imaginations of young scientists, political intellectuals, and the general public, so that we can reverse the economic catastrophe we are starring down due to fiscal irresponsibility and monetary mischief. The dire fiscal situation in Europe and the US is not a matter of mere opinion; we have simply reached the tipping point of sustainable public expenditures. In order to address the problem, we need to revisit fundamental questions concerning the proper scale and scope of government in a free society. Sound economic reasoning, not flights of theoretical fantasy, is what is required for this task. The past thirty years proved the validity of Adam Smith’s assertion, “The natural effort of every individual to better his own condition…is so powerful, that it is alone, and without any assistance, not only capable of carrying on the society to wealth and prosperity, but of surmounting a hundred impertinent obstructions with which the folly of human laws too often encumbers its operations". During “the age of Milton Friedman”, as Andrei Shleifer dubed it, key developments in economic freedom—deregulation in the US and UK, the collapse of communism in East and Central Europe, and the opening up of the economies of China and India—allowed individuals to surmount government meddling in the economy. From 1980 to 2005, there were marked, world-wide improvements in life expectancy, education, democracy, and living standards as integration into a world economy delivered billions of individuals from poverty, ignorance and squalor. September 11, 2001 changed that. “The war on terror” justified another great expansion of the scale and scope of government . Thus, like the Great Depression before it, the Great Recession was preceded not by a “do nothing” administration that supported free market policies, but by an activist administration that embraced the power of government intervention and greatly expanded the role of government throughout the economy and society at large. The great free market economic thinkers from Adam Smith to F. A. Hayek would understand why this change happened. They never argued that individuals were hyper-rational actors possessed with full and complete information, operating in perfectly competitive markets. They only argued that individuals will pursue, in the best way they can, those activities that are in their interest to pursue. These thinkers knew that individuals are individuals, fallible but capable human actors plagued by alluring hopes and haunting fears, not lightening calculators of pleasure and pain. Human fallibility may cause “failures,” inefficient markets, but this very fallibility also sets in motion the market process of discovery and adjustment. A setting of private property rights, free pricing, and accurate profit and loss accounting aligns incentives and communicates information so that individuals realize the mutual gains from trade with one another. Efficient markets are an outcome of a process of discovery, learning, and adjustment, not an assumption going into the analysis. That process, however, operates within political, legal, and social institutions. Those institutions can promulgate policies that block discovery, inhibit learning, and prevent adjustment, causing the market to operate poorly. So rather than free market ideology being obsolete, what is needed is a reinvigorated ideological vision of the free market economy: a society of free and responsible individuals who have the opportunity to prosper in a market economy based on profit and loss and to live in caring communities. Yes, caring communities. The Adam Smith that wrote The Wealth of Nations also wrote The Theory of Moral Sentiments, and the F. A. Hayek that wrote Individualism and Economic Order also wrote about the corruption of morals in The Fatal Conceit. Our challenge today is to embrace the full scope of free market ideology so as to understand the preconditions under which we can live better together in a world of peace, prosperity, and progress. Read more in this debate: Deirdre McCloskey, Barry Schwartz, Dan Ariely. Please enable JavaScript to view the comments powered by Disqus. Disqus
//! This module is concerned with finding methods that a given type provides. //! For details about how this works in rustc, see the method lookup page in the //! [rustc guide](https://rust-lang.github.io/rustc-guide/method-lookup.html) //! and the corresponding code mostly in librustc_typeck/check/method/probe.rs. use std::sync::Arc; use rustc_hash::FxHashMap; use crate::{ HirDatabase, module_tree::ModuleId, Module, Crate, Name, Function, Trait, ids::TraitId, impl_block::{ImplId, ImplBlock, ImplItem}, ty::{AdtDef, Ty}, }; /// This is used as a key for indexing impls. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum TyFingerprint { Adt(AdtDef), // we'll also want to index impls for primitive types etc. } impl TyFingerprint { /// Creates a TyFingerprint for looking up an impl. Only certain types can /// have impls: if we have some `struct S`, we can have an `impl S`, but not /// `impl &S`. Hence, this will return `None` for reference types and such. fn for_impl(ty: &Ty) -> Option<TyFingerprint> { match ty { Ty::Adt { def_id, .. } => Some(TyFingerprint::Adt(*def_id)), _ => None, } } } #[derive(Debug, PartialEq, Eq)] pub struct CrateImplBlocks { /// To make sense of the ModuleIds, we need the source root. krate: Crate, impls: FxHashMap<TyFingerprint, Vec<(ModuleId, ImplId)>>, impls_by_trait: FxHashMap<TraitId, Vec<(ModuleId, ImplId)>>, } impl CrateImplBlocks { pub fn lookup_impl_blocks<'a>( &'a self, db: &'a impl HirDatabase, ty: &Ty, ) -> impl Iterator<Item = (Module, ImplBlock)> + 'a { let fingerprint = TyFingerprint::for_impl(ty); fingerprint .and_then(|f| self.impls.get(&f)) .into_iter() .flat_map(|i| i.iter()) .map(move |(module_id, impl_id)| { let module = Module { krate: self.krate, module_id: *module_id, }; let module_impl_blocks = db.impls_in_module(module); (module, ImplBlock::from_id(module_impl_blocks, *impl_id)) }) } pub fn lookup_impl_blocks_for_trait<'a>( &'a self, db: &'a impl HirDatabase, tr: &Trait, ) -> impl Iterator<Item = (Module, ImplBlock)> + 'a { let id = tr.id; self.impls_by_trait .get(&id) .into_iter() .flat_map(|i| i.iter()) .map(move |(module_id, impl_id)| { let module = Module { krate: self.krate, module_id: *module_id, }; let module_impl_blocks = db.impls_in_module(module); (module, ImplBlock::from_id(module_impl_blocks, *impl_id)) }) } fn collect_recursive(&mut self, db: &impl HirDatabase, module: &Module) { let module_impl_blocks = db.impls_in_module(module.clone()); for (impl_id, _) in module_impl_blocks.impls.iter() { let impl_block = ImplBlock::from_id(Arc::clone(&module_impl_blocks), impl_id); let target_ty = impl_block.target_ty(db); if let Some(target_ty_fp) = TyFingerprint::for_impl(&target_ty) { self.impls .entry(target_ty_fp) .or_insert_with(Vec::new) .push((module.module_id, impl_id)); } if let Some(tr) = impl_block.target_trait(db) { self.impls_by_trait .entry(tr.id) .or_insert_with(Vec::new) .push((module.module_id, impl_id)); } } for child in module.children(db) { self.collect_recursive(db, &child); } } pub(crate) fn impls_in_crate_query( db: &impl HirDatabase, krate: Crate, ) -> Arc<CrateImplBlocks> { let mut crate_impl_blocks = CrateImplBlocks { krate: krate.clone(), impls: FxHashMap::default(), impls_by_trait: FxHashMap::default(), }; if let Some(module) = krate.root_module(db) { crate_impl_blocks.collect_recursive(db, &module); } Arc::new(crate_impl_blocks) } } fn def_crate(db: &impl HirDatabase, ty: &Ty) -> Option<Crate> { match ty { Ty::Adt { def_id, .. } => def_id.krate(db), _ => None, } } impl Ty { // TODO: cache this as a query? // - if so, what signature? (TyFingerprint, Name)? // - or maybe cache all names and def_ids of methods per fingerprint? pub fn lookup_method(self, db: &impl HirDatabase, name: &Name) -> Option<Function> { self.iterate_methods(db, |f| { let sig = f.signature(db); if sig.name() == name && sig.has_self_param() { Some(f) } else { None } }) } // This would be nicer if it just returned an iterator, but that's really // complicated with all the cancelable operations pub fn iterate_methods<T>( self, db: &impl HirDatabase, mut callback: impl FnMut(Function) -> Option<T>, ) -> Option<T> { // For method calls, rust first does any number of autoderef, and then one // autoref (i.e. when the method takes &self or &mut self). We just ignore // the autoref currently -- when we find a method matching the given name, // we assume it fits. // Also note that when we've got a receiver like &S, even if the method we // find in the end takes &self, we still do the autoderef step (just as // rustc does an autoderef and then autoref again). for derefed_ty in self.autoderef(db) { let krate = match def_crate(db, &derefed_ty) { Some(krate) => krate, None => continue, }; let impls = db.impls_in_crate(krate); for (_, impl_block) in impls.lookup_impl_blocks(db, &derefed_ty) { for item in impl_block.items() { match item { ImplItem::Method(f) => { if let Some(result) = callback(f.clone()) { return Some(result); } } _ => {} } } } } None } }
Simultaneous transcatheter closure of ruptured sinus of Valsalva aneurysm and stent implantation for aortic coarctation Ruptured sinus of Valsalva aneurysm is a rare anomaly and an associated coarctation of aorta is even rarer. A combination of such defects is traditionally treated surgically. The surgery is necessarily staged and done through different approaches. We report successful simultaneous transcatheter treatment of both these defects performed in the same setting in an acutely ill adult male patient with a good intermediate-term follow-up. Introduction Ruptured sinus of Valsalva aneurysm (RSVA) is a rare, though well-recognized, clinical entity. It usually presents acutely or subacutely in adolescence to early adulthood. The aneurysm is usually congenital in origin and ruptures most commonly into a right-sided heart chamber. The association of RSVA with coarctation of aorta (CoA) is extremely rare. 1 Stent implantation for CoA in adults is considered to be an acceptable alternative to surgery. 2 In recent times, transcatheter closure (TCC) of RSVA is being proposed as a promising alternative to surgery in suitable patients. 3 We describe here interventional therapy by the transcatheter approach for CoA and RSVA in the same setting as in an acutely ill patient. Case report A 32-year-old male presented with rapidly progressive dyspnea over a period of 10 days (New York Heart Association (NYHA) Class III). On physical examination, he was in congestive heart failure (CHF) with tachycardia, raised jugular venous pressure with prominent ''V'' waves, and bounding brachial and weak femoral pulses. The blood pressure (BP) in both arms was 160/50 mm Hg. Auscultation revealed fine rales over lung bases and a grade IV/VI continuous murmur in lower left parasternal area. The electrocardiogram showed left ventricular hypertrophy and radiography was suggestive of cardiomegaly with increased pulmonary vascularity and rib notching. Transthoracic echocardiography (TTE) followed by i n d i a n h e a r t j o u r n a l 6 7 ( 2 0 1 5 ) s 8 1 -s 8 4 a r t i c l e i n f o The descending aortic pressure was 120/55 mm Hg, with a peak systolic gradient across the CoA of 30 mm Hg. The CoA was crossed with the help of 5F Judkins right (JR) coronary artery diagnostic catheter over a 0.035 00 exchange length straight-tipped glide wire and the catheter was exchanged with a pigtail catheter for diagnostic angiography in the descending aorta above the CoA (Fig. 1A, Video 1) and in the aortic root ( Fig The patient tolerated the procedure well and then we proceeded to perform TCC of RSVA. The RSVA was crossed from the aortic side using a 5F JR catheter over a 0.035 in. angled tip glide wire (Terumo Inc., Japan). This was exchanged for a 300 cm long noodle wire (St. Jude medical, Golden Valley, MN) that was snared with a 15 mm Amplatz gooseneck snare (ev3 Europe, Paris, France) from the superior vena cava (Fig. 2B, Video 4) and exteriorized out of the femoral vein. A stable arteriovenous wire loop was thus established, over which an 8F Amplatzer delivery sheath (St Jude Medical, St. Paul, MN) was placed in the ascending aorta. An initial attempt at placing the largest available (16 mm  14 mm) Amplatzer Duct Occluder (St Jude Medical, St. Paul, MN) failed, as the device slipped through the defect into the RA. Although we could have used the radial route, we re-crossed the RSVA from the femoral route, carefully manipulating the catheter and guidewire across the stented CoA segment and reestablishing the arteriovenous wire loop. Under TEE, and fluoroscopic and angiographic guidance, we were able to position a larger 18 mm  16 mm Lifetech Duct occluder (Shenzhen Lifetech Scientific Inc., China) through a 9F SteerEase sheath (Shenzhen Lifetech Scientific Inc., China) precisely across the defect (Fig. 2C, Video 5) taking care to avoid encroachment on the aortic valve and coronary arteries. After confirming no increase in AR or any residual shunt on TEE, the device was released by unscrewing the cable. A postprocedure angiogram in the aortic arch done through radial route confirmed optimal device position with complete occlusion of the defect and no increase in the grade of AR (Fig. 2D, Video 6) and good result across the stented coarctation segment (Fig. 1B, Video 2). Supplementary material related to this article can be found, in the online version, at doi:10.1016/j.ihj.2015.09.024. The total procedural and fluoroscopy times were 125 min and 36 min, respectively. In the immediate postprocedure i n d i a n h e a r t j o u r n a l 6 7 ( 2 0 1 5 ) s 8 1 -s 8 4 S82 period, there was significant improvement in the patient's clinical status. There was a hemoglobin drop of 1 g percent, not requiring any blood transfusion. At discharge three days later, his BP was normal (120/80 mm Hg) with no signs of heart failure. He was empirically treated with aspirin (150 mg/day) and clopidogrel (75 mg/day) for 6 weeks followed by aspirin for 6 months (150 mg/day). At 6-month follow-up, he remained in NYHA Class I, with well-controlled BP without any antihypertensive medications. Echocardiography revealed the device to be in situ with no residual shunt, no increase in the grade of AR, and no significant gradients across the stented CoA. Discussion Ruptured sinus of Valsalva aneurysm is a very rare entity. Although coexisting lesions like ventricular septal defect and AR are commonly described with RSVA, the association of RSVA and CoA is very rare. In a western series, coexisting CoA was documented in 4% (1/86) 4 while another Asian series reported a rate of 1 out of 57 RSVA cases. 5 Traditionally, a combination of RSVA and CoA has been treated surgically. However, recently, a combination of RSVA and incidentally detected CoA were dealt with by surgical correction of RSVA followed by stenting for a CoA four weeks later. 6 We have a fairly long and large experience of TCC of RSVA including interventional treatment of coexisting defects. 3,7 Hence we decided to offer interventional treatment of this rare combination of defects. This case report is unique that both RSVA and CoA were treated nonsurgically with a single procedure in an acutely ill patient. Unruptured aneurysms can remain undetected till they rupture into one of the chambers of the heart. Also, patients with isolated CoA may be incidentally detected due to high arm BP. However, patients with RSVA and a coexisting CoA present invariably with acute or subacute hemodynamic decompensation leading to a congested state. The rupture significantly increases the preload acutely while CoA results in chronic increase in afterload. Various strategies for management of these complex anatomical abnormalities include (i) single-stage surgical, (ii) two-stage surgical, and (iii) staged hybrid approach. Until recently, two-staged surgical approach is the most acceptable. 8 This contributes to the improvement of the patient's clinical condition, with the further advantage of enabling safe perfusion during the second stage of the repair (RSVA closure), a few weeks later. As CoA is approached by lateral thoracotomy and RSVA by median sternotomy, a twostaged procedure is an acceptable option after a gap of 4-6 weeks. 9 The consensus is that single surgical approach would increase excessively the risk of the procedure. A prerequisite for a single-stage repair is good biventricular function. 10 In patients with left ventricle (LV) dysfunction, simultaneous repair is a double-edged sword. Earlier repair of RSVA can markedly increase afterload, and on the other hand, earlier repair of CoA can significantly decrease peripheral vascular resistance, decreased perfusion, and aggravation of heart failure. Hence, in cases with severe LV dysfunction, staged surgical repair or staged hybrid procedure or staged transcatheter approach could be a better option. During transcatheter treatment, the sequence of intervention for the two lesions could be a matter of debate. Since RSVA is the ''culprit lesion'', it would seem logical to address it first. However, since the aortic end of the RSVA was large (measuring 11 mm), a reason for one of the failures in our previous experience, 3 we were not absolutely sure about the success of TCC. Indeed, after stenting of CoA, during the TCC of RSVA, we were unsuccessful in our first attempt with the 16/ 14 mm ADO. It has been our usual practice to use a device size 2-4 mm larger than the defect. 11 Upsizing the device may be necessary at times because of the flimsy (''wind-sock''-like) margins of the defect. Hence we prioritized the stenting of CoA with the initial goal of at least avoiding two different surgeries through different incisions and minimizing the complexity of one-stage surgical procedure by dealing with one of them (CoA) by transcatheter approach. However, this approach of intervening on CoA first increased the ''dwell-time'' of a large bore 12F femoral arterial sheath with a potential for arterial complication. Indeed, there was increased bleeding, albeit mild, during catheter exchanges through the check valve of the long 12F sheath, and we had to exchange for another short 12F sheath, after accessing the ascending aorta through the venous side with the Amplatzer delivery sheath. The radial access was thus ''well thought'' not only for controlled angiography during TCC of RSVA, but also it could have proven valuable for establishing the arteriovenous loop without traversing the intervened stented CoA. Poststenting, there was an immediate significant fall in the ascending aortic pressures, which could have decreased the magnitude of shunt through RSVA. Patient remained stable and hemodynamic parameters were under control, so we went ahead with TCC of RSVA. To the best of our knowledge, simultaneous transcatheter intervention of both RSVA and CoA has not been attempted before in an acutely ill patient presenting with heart failure. In our largest reported series of 20 cases of TCC of RSVA, we have previously documented successful simultaneous transcatheter intervention for both these lesions in a young female, presenting with secondary hypertension due to CoA who was incidentally detected to have a small RSVA requiring the smallest ADO device (6/4 mm). 3 In another case report, 12 balloon dilatation of CoA and coil occlusion of a small RSVA has been staged six weeks apart in a 9-year-old boy, detected to have a cardiac murmur on routine examination. Conclusion In summary, there has been limited literature on transcatheter interventional treatment of RSVA with coexisting CoA. Although technically challenging, our experience suggests that TCC of RSVA and simultaneous stent implantation for CoA is a safe and effective alternative to a more complex surgery requiring two different approaches in hemodynamically unstable patient.
<filename>RenderEngine/src/main/java/Kurama/geometry/assimp/AssimpAnimLoader2.java package Kurama.geometry.assimp; import Kurama.Math.Matrix; import Kurama.Math.Quaternion; import Kurama.Math.Transformation; import Kurama.Math.Vector; import Kurama.Mesh.Material; import Kurama.Mesh.Mesh; import Kurama.game.Game; import Kurama.geometry.MD5.Animation; import Kurama.geometry.MD5.AnimationFrame; import Kurama.geometry.MD5.Joint; import Kurama.geometry.MD5.MD5Utils; import Kurama.geometry.MeshBuilderHints; import Kurama.ComponentSystem.components.model.AnimatedModel; import Kurama.utils.Utils; import org.lwjgl.PointerBuffer; import org.lwjgl.assimp.*; import java.util.*; import static org.lwjgl.assimp.Assimp.*; public class AssimpAnimLoader2 { public static AnimatedModel load(Game game, String resourcePath, String texturesDir) throws Exception { return load(game, resourcePath, texturesDir, aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_FixInfacingNormals | aiProcess_LimitBoneWeights); } public static AnimatedModel load(Game game, String resourcePath, String texturesDir, int flags) throws Exception { String fileType = resourcePath.split("\\.")[1]; AIScene aiScene = aiImportFile(resourcePath, flags); if(aiScene == null) { throw new Exception("Error loading model"); } int numMaterials = aiScene.mNumMaterials(); PointerBuffer aiMaterials = aiScene.mMaterials(); List<Material> materials = new ArrayList<>(); for(int i=0; i < numMaterials; i++) { AIMaterial aiMat = AIMaterial.create(aiMaterials.get(i)); var mat = AssimpStaticLoader.processMaterial(aiMat, texturesDir, fileType); materials.add(mat); } Map<String, Bone> boneList = new HashMap<>(); //Map of bones with inverse bind transforms int numMeshes = aiScene.mNumMeshes(); PointerBuffer aiMeshes = aiScene.mMeshes(); List<Mesh> meshes = new ArrayList<>(); for(int i = 0;i < numMeshes; i++) { var aiMesh = AIMesh.create(aiMeshes.get(i)); var mesh = processMesh(aiMesh, materials, resourcePath, boneList); mesh.meshIdentifier = Utils.getUniqueID(); meshes.add(mesh); } Node root = buildNodeHierarchy(aiScene.mRootNode(), null); Matrix rootGlobalInverse = toMatrix(aiScene.mRootNode().mTransformation()).getInverse(); Map<String, Animation> animations = new HashMap<>(); int numAnimations = aiScene.mNumAnimations(); PointerBuffer aiAnimations = aiScene.mAnimations(); for(int i = 0;i < numAnimations; i++) { AIAnimation aiAnimation = AIAnimation.create(aiAnimations.get(i)); Animation anim = createAnimation(aiAnimation, root, boneList, rootGlobalInverse); animations.put(aiAnimation.mName().dataString(), anim); } String key1 = (String) animations.keySet().toArray()[0]; AnimatedModel model = new AnimatedModel(game, meshes, animations, animations.get(key1), Utils.getUniqueID()); return model; } public static List<Matrix> getUnbindMatrices(Map<String, Bone> boneMap) throws Exception { List<Matrix> results = new ArrayList<>(boneMap.size()); for(int i = 0;i < boneMap.size();i++) { Bone reqBone = null; for(var bone: boneMap.values()) { if(bone.boneId == i) { reqBone = bone; break; } } if(reqBone == null) { throw new Exception("could not find bone with id: "+i); } results.add(reqBone.unbindMatrix); } return results; } public static Animation createAnimation(AIAnimation aiAnimation, Node root, Map<String, Bone> boneMap, Matrix rootGlobalInverse) { int numNodes = aiAnimation.mNumChannels(); var numFrames = AINodeAnim.create(aiAnimation.mChannels().get(0)).mNumPositionKeys(); Animation finalAnimation = new Animation(aiAnimation.mName().dataString(), new ArrayList<>(), boneMap.size(), (float) (numFrames/aiAnimation.mDuration())); for(int frameNum = 0; frameNum < numFrames; frameNum++) { AnimationFrame frame = new AnimationFrame(numNodes); Joint[] joints = new Joint[numNodes]; recursiveAnimProcess(aiAnimation, joints, boneMap, root, frameNum, Matrix.getIdentityMatrix(4), null, rootGlobalInverse); frame.joints = Arrays.asList(joints); finalAnimation.animationFrames.add(frame); } return finalAnimation; } public static void recursiveAnimProcess(AIAnimation aiAnimation, Joint[] joints, Map<String, Bone> boneMap, Node currentNode, int frameNum, Matrix parentTransform, Bone parentBone, Matrix rootGlobalInverse) { Matrix nodeLocalTransform = currentNode.transformation; Matrix accTransform = null; if(boneMap.containsKey(currentNode.name)) { var currentBone = boneMap.get(currentNode.name); AINodeAnim animNode = findAIAnimNode(aiAnimation, currentNode.name); nodeLocalTransform = buildNodeTransformationMatrix(animNode, frameNum).getTransformationMatrix(); // builds 4x4 matrix from vec3 pos, vec3 scale, quat orient accTransform = parentTransform.matMul(nodeLocalTransform); Transformation finalTrans = new Transformation(rootGlobalInverse.matMul(accTransform.matMul(currentBone.unbindMatrix))); // finalTrans = new Transformation(Matrix.getIdentityMatrix(4)); int parentId = -1; if(parentBone != null) { currentBone.parentName = parentBone.boneName; parentId = parentBone.boneId; } parentBone = currentBone; var newJoint = new Joint(currentNode.name, parentId, finalTrans.pos, finalTrans.orientation, finalTrans.scale); newJoint.currentID = parentBone.boneId; joints[currentBone.boneId] = newJoint; // frame.joints.add(newJoint); //-1 simply because the parent ID would never be used later } else { accTransform = parentTransform.matMul(nodeLocalTransform); } for(var childNode: currentNode.children) { recursiveAnimProcess(aiAnimation, joints, boneMap, childNode, frameNum, accTransform, parentBone, rootGlobalInverse); } } private static Transformation buildNodeTransformationMatrix(AINodeAnim aiNodeAnim, int frame) { AIVectorKey.Buffer positionKeys = aiNodeAnim.mPositionKeys(); AIVectorKey.Buffer scalingKeys = aiNodeAnim.mScalingKeys(); AIQuatKey.Buffer rotationKeys = aiNodeAnim.mRotationKeys(); AIVectorKey aiVecKey; AIVector3D vec; Vector pos = null; Quaternion orient = null; Vector scale = null; int numPositions = aiNodeAnim.mNumPositionKeys(); if (numPositions > 0) { aiVecKey = positionKeys.get(Math.min(numPositions - 1, frame)); vec = aiVecKey.mValue(); pos = new Vector(vec.x(), vec.y(), vec.z()); } int numRotations = aiNodeAnim.mNumRotationKeys(); if (numRotations > 0) { AIQuatKey quatKey = rotationKeys.get(Math.min(numRotations - 1, frame)); AIQuaternion aiQuat = quatKey.mValue(); orient = new Quaternion(aiQuat.w(), aiQuat.x(), aiQuat.y(), aiQuat.z()); } int numScalingKeys = aiNodeAnim.mNumScalingKeys(); if (numScalingKeys > 0) { aiVecKey = scalingKeys.get(Math.min(numScalingKeys - 1, frame)); vec = aiVecKey.mValue(); scale = new Vector(vec.x(), vec.y(), vec.z()); } return new Transformation(orient, pos, scale); } private static AINodeAnim findAIAnimNode(AIAnimation aiAnimation, String nodeName) { AINodeAnim result = null; int numAnimNodes = aiAnimation.mNumChannels(); PointerBuffer aiChannels = aiAnimation.mChannels(); for (int i=0; i<numAnimNodes; i++) { AINodeAnim aiNodeAnim = AINodeAnim.create(aiChannels.get(i)); if ( nodeName.equals(aiNodeAnim.mNodeName().dataString())) { result = aiNodeAnim; break; } } return result; } public static Node buildNodeHierarchy(AINode aiNode, Node parent) { String nodeName = aiNode.mName().dataString(); var trans = toMatrix(aiNode.mTransformation()); Node node = new Node(nodeName, parent, trans); int numChildren = aiNode.mNumChildren(); PointerBuffer aiChildren = aiNode.mChildren(); for(int i = 0;i < numChildren; i++) { AINode aiChildNode = AINode.create(aiChildren.get(i)); Node childNode = buildNodeHierarchy(aiChildNode, node); node.children.add(childNode); } return node; } public static Mesh processMesh(AIMesh aiMesh, List<Material> materials, String resourcePath, Map<String, Bone> bonesList) { List<List<Vector>> vertAttribs = new ArrayList<>(); List<Vector> verts = AssimpStaticLoader.processAttribute(aiMesh.mVertices()); List<Vector> textures = AssimpStaticLoader.processTextureCoords(aiMesh.mTextureCoords(0)); List<Vector> normals = AssimpStaticLoader.processAttribute(aiMesh.mNormals()); List<Vector> tangents = AssimpStaticLoader.processAttribute(aiMesh.mTangents()); List<Vector> biTangents = AssimpStaticLoader.processAttribute(aiMesh.mBitangents()); List<Integer> indices = AssimpStaticLoader.processIndices(aiMesh); List<Vector> matInds = new ArrayList<>(); List results = processJoints(aiMesh, bonesList); List<Vector> jointIndices = (List<Vector>) results.get(0); List<Vector> weight = (List<Vector>) results.get(1); vertAttribs.add(verts); List<Material> meshMaterials = new ArrayList<>(); var newMat = new Material(); int matInd = aiMesh.mMaterialIndex(); if(matInd >= 0 && matInd < materials.size()) { newMat = materials.get(matInd); } meshMaterials.add(newMat); for(var ind: verts) { matInds.add(new Vector(new float[]{matInd})); } var newMesh = new Mesh(indices, null, vertAttribs, meshMaterials, resourcePath, null); newMesh.setAttribute(textures, Mesh.TEXTURE); newMesh.setAttribute(normals, Mesh.NORMAL); newMesh.setAttribute(tangents, Mesh.TANGENT); newMesh.setAttribute(biTangents, Mesh.BITANGENT); newMesh.setAttribute(matInds, Mesh.MATERIAL); newMesh.setAttribute(jointIndices, Mesh.JOINTINDICESPERVERT); newMesh.setAttribute(weight, Mesh.WEIGHTBIASESPERVERT); return newMesh; } public static List processJoints(AIMesh aiMesh, Map<String, Bone> bonesList) { List<Vector> jointIndices = new ArrayList<>(); List<Vector> weights = new ArrayList<>(); Map<Integer, List<VertexWeight>> weightSet = new HashMap<>(); int numBones = aiMesh.mNumBones(); PointerBuffer aiBones = aiMesh.mBones(); for(int i = 0;i < numBones; i++) { AIBone aiBone = AIBone.create(aiBones.get(i)); int id = bonesList.size(); var boneName = aiBone.mName().dataString(); Bone bone; if(bonesList.containsKey(boneName)) { bone = bonesList.get(boneName); } else { bone = new Bone(id, boneName, toMatrix(aiBone.mOffsetMatrix())); bonesList.put(boneName, bone); } int numWeights = aiBone.mNumWeights(); AIVertexWeight.Buffer aiWeights = aiBone.mWeights(); for(int j = 0;j < numWeights; j++) { AIVertexWeight aiWeight = aiWeights.get(j); VertexWeight vw = new VertexWeight(bone.boneId, aiWeight.mVertexId(), aiWeight.mWeight()); weightSet.putIfAbsent(vw.vertexId, new ArrayList<>()); var weightsList = weightSet.get(vw.vertexId); weightsList.add(vw); } } int numVertices = aiMesh.mNumVertices(); for(int i = 0; i < numVertices; i++) { var weightsList = weightSet.get(i); int size = weightsList != null ? weightsList.size() : 0; Vector tempWeight = new Vector(MD5Utils.MAXWEIGHTSPERVERTEX,0); Vector tempJointIndices = new Vector(MD5Utils.MAXWEIGHTSPERVERTEX,0); for(int j = 0; j < MD5Utils.MAXWEIGHTSPERVERTEX; j++) { if(j < size) { VertexWeight vw = weightsList.get(j); tempWeight.setDataElement(j, vw.weight); tempJointIndices.setDataElement(j, vw.boneId); } } weights.add(tempWeight); jointIndices.add(tempJointIndices); } List res = new ArrayList(); res.add(jointIndices); res.add(weights); return res; } public static Matrix toMatrix(AIMatrix4x4 input) { float[][] mat = new float[4][4]; mat[0][0] = input.a1(); mat[0][1] = input.a2(); mat[0][2] = input.a3(); mat[0][3] = input.a4(); mat[1][0] = input.b1(); mat[1][1] = input.b2(); mat[1][2] = input.b3(); mat[1][3] = input.b4(); mat[2][0] = input.c1(); mat[2][1] = input.c2(); mat[2][2] = input.c3(); mat[2][3] = input.c4(); mat[3][0] = input.d1(); mat[3][1] = input.d2(); mat[3][2] = input.d3(); mat[3][3] = input.d4(); return new Matrix(mat); } public static int getFlags(MeshBuilderHints hints) { int finalFlag = aiProcess_FixInfacingNormals | aiProcess_LimitBoneWeights; if(hints.shouldTriangulate) { finalFlag |= aiProcess_Triangulate; } if(hints.shouldReverseWindingOrder) { finalFlag |= aiProcess_FlipWindingOrder; } if(hints.shouldSmartBakeVertexAttributes || hints.shouldDumbBakeVertexAttributes) { finalFlag |= aiProcess_JoinIdenticalVertices; } if(hints.shouldGenerateTangentBiTangent) { finalFlag |= aiProcess_CalcTangentSpace; } return finalFlag; } }
<filename>pkg/agentd/sreq/reattach.go // Copyright 2019 <NAME> // // 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. package sreq import ( com "github.com/Nuvoloso/kontroller/pkg/common" "github.com/Nuvoloso/kontroller/pkg/util" ) // reattachGetStates returns the appropriate states needed for this invocation of a REATTACH operation. // REATTACH is composed of the special state sequence of CLOSING + DETACHING + REATTACHING + ATTACHING + USING // involving 2 different agentds and centrald. // It is expected to be reattempted (by placement) until it succeeds; hence the operations to perform // are determined by the Storage object state. func (c *SRComp) reattachGetStates(rhs *requestHandlerState) []string { var states []string ss := rhs.Storage.StorageState c.Log.Debugf("StorageRequest %s REATTACH ss:%#v", rhs.Request.Meta.ID, ss) if ss.AttachmentState == com.StgAttachmentStateAttached && ss.AttachedNodeID == c.thisNodeID { if ss.AttachedNodeID == rhs.Request.ReattachNodeID { // attached to final node if util.Contains([]string{com.StgDeviceStateOpening, com.StgDeviceStateUnused, com.StgDeviceStateError}, ss.DeviceState) { states = append(states, com.StgReqStateUsing) } else if ss.DeviceState != com.StgDeviceStateOpen { rhs.setRequestError("Unexpected device state %s", ss.DeviceState) } // else already open - SR will terminate } else { // attached to original node if util.Contains([]string{com.StgDeviceStateOpen, com.StgDeviceStateClosing, com.StgDeviceStateError, com.StgDeviceStateUnused}, ss.DeviceState) { if ss.DeviceState != com.StgDeviceStateUnused { states = append(states, com.StgReqStateClosing) // not yet closed } states = append(states, com.StgReqStateDetaching) // hand over to centrald when done } else { rhs.setRequestError("Unexpected device state %s", ss.DeviceState) } } } else { rhs.RetryLater = true // skip } return states }
<gh_stars>0 import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { MatTabGlobalComponent } from './mat-tab-global/mat-tab-global.component'; import { BodyWithoutHeaderComponent } from './body-without-header/body-without-header.component'; import { AngularPdfComponent } from './angular-pdf/angular-pdf.component'; import { DatepickerComponent } from './datepicker/datepicker.component'; import { MultiselectDropdownComponent } from './multiselect-dropdown/multiselect-dropdown.component'; const routes: Routes = [ // { // path: '', // component: FindPartographComponent // }, // { // path: 'new-partograph', // component: NewPartographComponent // } { path: 'global-use', component: MatTabGlobalComponent }, { path: 'new-design', component: BodyWithoutHeaderComponent }, { path: 'pdf', component: AngularPdfComponent }, { path: 'date-picker', component: DatepickerComponent }, { path: 'dropdown', component: MultiselectDropdownComponent } ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class AssetsRoutingModule { }
<filename>src/path.cpp /* * Copyright 2013 <NAME> * * This file is subject to the terms and conditions * defined in file 'LICENSE.txt', which is part of this source * code package. */ #include <urlcpp/path.h> #define D(x) using namespace std; namespace url { void Path::merge(const Path& p) { D(cout << "Path::merge " << this->get() << " with " << p.get() << endl;); if( p.flags.test(SLASH_BEGIN) ) (*this) = p; else { if( ! flags.test(SLASH_END) && ! segmt.empty() && ! p.empty() ) segmt.pop_back(); // file element at the end for(list<string>::const_iterator i = p.segmt.begin(); i != p.segmt.end(); ++i) { if( *i == "." ) { flags.set(SLASH_END,true); } else if( *i == ".." ) { if( ! segmt.empty() ) { segmt.pop_back(); flags.set(SLASH_END,true); } } else { segmt.push_back(*i); flags.set(SLASH_END,false); } } if( p.flags.test(SLASH_END) ) flags.set(SLASH_END,true); // Fix: When you merge with .. or . the path should end in slash // else // flags.set(SLASH_END,false); } D(cout << "result: " << this->get() << endl;) } void Path::normalize() { list<string>::iterator i = segmt.begin(); list<string>::iterator j = segmt.begin(); list<string>::iterator k = segmt.begin(); ++i; while( i != segmt.end() ) { if( *i == ".." && j != i && *j != ".." && *j != "." ) { segmt.erase(j); i=segmt.erase(i); if( i == segmt.end() ) flags.set(SLASH_END,true); } else if ( *i == "." ) { i=segmt.erase(i); if( i == segmt.end() ) flags.set(SLASH_END,true); } else { ++j; ++i; } j=k=segmt.begin(); while(k != i) j=k++; } } size_t Path::size() const { size_t size=0; if( empty() ) return 0; else if( segmt.size() > 0 ) { if(flags.test(SLASH_BEGIN)) ++size; for(list<string>::const_iterator i = segmt.begin(); i != segmt.end(); ++i) size += (*i).size(); if(flags.test(SLASH_END)) ++size; size += segmt.size()-1; // there will be '/' between elements return size; } else if (flags.test(SLASH_BEGIN) || flags.test(SLASH_END)){ return 1; } else { return 0; } } string Path::get() const { if( empty() ) return ""; string result; result.reserve(this->size()); if( segmt.size() > 0 ) { if(flags.test(SLASH_BEGIN)) result += '/'; bool iterated=false; for(list<string>::const_iterator j = segmt.begin(); j != segmt.end(); ++j) { result += (*j); result += '/'; iterated=true; } if(iterated && ! result.empty() ) result = result.substr(0,result.size()-1); // remove final '/', since there's no + operator in list iterators if(flags.test(SLASH_END)) result += '/'; if(result == "//") // just to make sure result = "/"; } else if (flags.test(SLASH_BEGIN) || flags.test(SLASH_END)){ result = "/"; } else result.clear(); return result; } void Path::assign(const string& s) { clear(); if( s.empty() ) return; list<string>::size_type depth=0; string::const_iterator begin=s.begin(); string::const_iterator end = s.begin(); if( *end == '/' ) { flags.set(SLASH_BEGIN,true); ++end; begin = end; } while(1) { if( end == s.end() ) { if( end != begin ) { string str(begin,end); // [begin,end) segmt.push_back(str); ++depth; begin = end; } break; } else if( *end == '/' ) { if( end != begin ) { string str(begin,end); // [begin,end) segmt.push_back(str); ++depth; begin = end; } else { ++end; begin = end; } } else { ++end; } // safety check if( depth >= segmt.max_size() ) { clog << "path depth >= MAXDEPTH" << endl; return; } } if( s.at(s.size()-1) == '/' ) flags.set(SLASH_END,true); } bool Path::updir() { if( ! segmt.empty() ) { if( ! flags[SLASH_END] ) // a file segmt.pop_back(); segmt.pop_back(); flags[SLASH_END] = true; return true; } else { return false; } } } // end ns url
// generates raw transaction from payload // returns raw transaction + chainId + error (if any) func (e *EthereumAdapter) createRawTransaction(payloadString string, backendLogger log.Logger) (*types.Transaction, *big.Int, error) { var payload lib.EthereumRawTx if err := json.Unmarshal([]byte(payloadString), &payload); err != nil || reflect.DeepEqual(payload, lib.EthereumRawTx{}) { errorMsg := fmt.Sprintf("Unable to decode payload=[%v]", payloadString) logger.Log(backendLogger, config.Error, "signature:", errorMsg) return nil, nil, errors.New(errorMsg) } valid, txType := validatePayload(payload, e.zeroAddress) if !valid { logger.Log(backendLogger, config.Error, "signature:", "Invalid payload data") return nil, nil, errors.New("Invalid payload data") } logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("type - %v", txType)) logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("to - %v", payload.To)) logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("gas limit - %v", payload.GasLimit)) logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("gas price - %v", payload.GasPrice)) logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("value - %v", payload.Value)) logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("data - %v", payload.Data)) logger.Log(backendLogger, config.Info, "signature:", fmt.Sprintf("chain id - %v", payload.ChainID)) return types.NewTransaction( payload.Nonce, common.HexToAddress(payload.To), payload.Value, payload.GasLimit, payload.GasPrice, common.FromHex(string(payload.Data)), ), payload.ChainID, nil }
// NewSetAsyncCallStackDepthArgs initializes SetAsyncCallStackDepthArgs with the required arguments. func NewSetAsyncCallStackDepthArgs(maxDepth int) *SetAsyncCallStackDepthArgs { args := new(SetAsyncCallStackDepthArgs) args.MaxDepth = maxDepth return args }
from polygraphy.tools.base import * from polygraphy.tools.registry import TOOL_REGISTRY
/** * Strip any path or query parameters from the given URL, returning only host[:port]. */ public static URL hostOnlyUrlFrom(URL url) { checkArgumentNotNull(url, "url must not be null"); var urlSpec = url.getProtocol() + "://" + url.getAuthority(); return KiwiUrls.createUrlObject(urlSpec); }
<gh_stars>1-10 package com.less.tplayer.util; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.telephony.TelephonyManager; import java.io.IOException; import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net.URL; import java.net.UnknownHostException; import java.util.Enumeration; import java.util.Locale; public class NetworkUtil { public static int NET_CNNT_BAIDU_OK = 1; // NetworkAvailable public static int NET_CNNT_BAIDU_TIMEOUT = 2; // no NetworkAvailable public static int NET_NOT_PREPARE = 3; // Net no ready public static int NET_ERROR = 4; //net error private static int TIMEOUT = 3000; // TIMEOUT /** * 判断是否有网络连接 */ public static boolean isNetworkAvailable(Context context) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = cm.getActiveNetworkInfo(); return info != null && info.isAvailable() && info.isConnected(); } @Deprecated public static boolean hasConnect(Context context){ boolean wifiConnected = isWIFIConnected(context); boolean mobileConnected = isMOBILEConnected(context); boolean wiredConnected = isWiredConnected(context); if(!wifiConnected && !mobileConnected && !wiredConnected){ // 如果都没有连接,提示用户当前没有网络 return false; } return true; } public static boolean isWiredConnected(Context context) { ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = manager.getNetworkInfo(ConnectivityManager.TYPE_ETHERNET); if (networkInfo != null && networkInfo.isConnected()) { return true; } return false; } public static boolean isMOBILEConnected(Context context) { ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if(networkInfo !=null && networkInfo.isConnected()){ return true; } return false; } public static boolean isWIFIConnected(Context context) { ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); if(networkInfo !=null && networkInfo.isConnected()){ return true; } return false; } /** * 返回当前网络状态 * * @param context * @return */ public static int getNetState(Context context) { try { ConnectivityManager connectivity = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null) { NetworkInfo networkinfo = connectivity.getActiveNetworkInfo(); if (networkinfo != null) { if (networkinfo.isAvailable() && networkinfo.isConnected()) { if (!connectionNetwork()) { return NET_CNNT_BAIDU_TIMEOUT; } else { return NET_CNNT_BAIDU_OK; } } else { return NET_NOT_PREPARE; } } } } catch (Exception e) { e.printStackTrace(); } return NET_ERROR; } /** * ping "http://www.baidu.com" */ static private boolean connectionNetwork() { boolean result = false; HttpURLConnection httpUrl = null; try { httpUrl = (HttpURLConnection) new URL("http://www.baidu.com") .openConnection(); httpUrl.setConnectTimeout(TIMEOUT); httpUrl.connect(); result = true; } catch (IOException e) { } finally { if (null != httpUrl) { httpUrl.disconnect(); } httpUrl = null; } return result; } /** * wifi is enable */ public static boolean isWifiEnabled(Context context) { ConnectivityManager mgrConn = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); TelephonyManager mgrTel = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); return ((mgrConn.getActiveNetworkInfo() != null && mgrConn .getActiveNetworkInfo().getState() == NetworkInfo.State.CONNECTED) || mgrTel .getNetworkType() == TelephonyManager.NETWORK_TYPE_UMTS); } /** * <p> * getLocalIpAddress(never used) * </p> */ public static String getLocalIpAddress() { String ret = ""; try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) { InetAddress inetAddress = enumIpAddr.nextElement(); if (!inetAddress.isLoopbackAddress()) { ret = inetAddress.getHostAddress().toString(); } } } } catch (SocketException ex) { ex.printStackTrace(); } return ret; } /** * 获取本地WiFi的ip地址,tv and littleServer used by me * * @param context * @return */ public InetAddress getLocalIpAddress(Context context) { WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); int ipAddress = wifiInfo.getIpAddress(); InetAddress address = null; try { address = InetAddress.getByName(String.format(Locale.ENGLISH, "%d.%d.%d.%d", (ipAddress & 0xff), (ipAddress >> 8 & 0xff), (ipAddress >> 16 & 0xff), (ipAddress >> 24 & 0xff))); } catch (UnknownHostException e) { e.printStackTrace(); } return address; } }
// Lookup performs the search and returns the RBLResults. func Lookup(ctx context.Context, rblList string, rawIP string) (*Result, error) { ip := net.ParseIP(rawIP) ip4 := ip.To4() res, err := query(ctx, rblList, ip4) if err != nil { return nil, err } return res, nil }
<filename>src/templates/packages/back/o-auth/src/@apps/o-auth/refresh-token/domain/refresh-token.aggregate.ts /* eslint-disable key-spacing */ import { LiteralObject } from '@nestjs/common'; import { AggregateRoot } from '@nestjs/cqrs'; import { Utils } from 'aurora-ts-core'; import { RefreshTokenId, RefreshTokenAccessTokenId, RefreshTokenToken, RefreshTokenIsRevoked, RefreshTokenExpiresAt, RefreshTokenCreatedAt, RefreshTokenUpdatedAt, RefreshTokenDeletedAt, } from './value-objects'; import { CreatedRefreshTokenEvent } from '../application/events/created-refresh-token.event'; import { DeletedRefreshTokenEvent } from '../application/events/deleted-refresh-token.event'; import { OAuthAccessToken } from '@apps/o-auth/access-token/domain/access-token.aggregate'; export class OAuthRefreshToken extends AggregateRoot { id: RefreshTokenId; accessTokenId: RefreshTokenAccessTokenId; token: RefreshTokenToken; isRevoked: RefreshTokenIsRevoked; expiresAt: RefreshTokenExpiresAt; createdAt: RefreshTokenCreatedAt; updatedAt: RefreshTokenUpdatedAt; deletedAt: RefreshTokenDeletedAt; // eager relationship accessToken: OAuthAccessToken; constructor( id: RefreshTokenId, accessTokenId: RefreshTokenAccessTokenId, token: RefreshTokenToken, isRevoked: RefreshTokenIsRevoked, expiresAt: RefreshTokenExpiresAt, createdAt: RefreshTokenCreatedAt, updatedAt: RefreshTokenUpdatedAt, deletedAt: RefreshTokenDeletedAt, accessToken?: OAuthAccessToken, ) { super(); this.id = id; this.accessTokenId = accessTokenId; this.token = token; this.isRevoked = isRevoked; this.expiresAt = expiresAt; this.createdAt = createdAt; this.updatedAt = updatedAt; this.deletedAt = deletedAt; // eager relationship this.accessToken = accessToken; } static register ( id: RefreshTokenId, accessTokenId: RefreshTokenAccessTokenId, token: RefreshTokenToken, isRevoked: RefreshTokenIsRevoked, expiresAt: RefreshTokenExpiresAt, createdAt: RefreshTokenCreatedAt, updatedAt: RefreshTokenUpdatedAt, deletedAt: RefreshTokenDeletedAt, accessToken?: OAuthAccessToken, ): OAuthRefreshToken { return new OAuthRefreshToken( id, accessTokenId, token, isRevoked, expiresAt, createdAt, updatedAt, deletedAt, accessToken, ); } created(refreshToken: OAuthRefreshToken): void { this.apply( new CreatedRefreshTokenEvent( refreshToken.id.value, refreshToken.accessTokenId.value, refreshToken.token.value, refreshToken.isRevoked.value, refreshToken.expiresAt?.value, refreshToken.createdAt?.value, refreshToken.updatedAt?.value, refreshToken.deletedAt?.value, ), ); } deleted(refreshToken: OAuthRefreshToken): void { this.apply( new DeletedRefreshTokenEvent( refreshToken.id.value, refreshToken.accessTokenId.value, refreshToken.token.value, refreshToken.isRevoked.value, refreshToken.expiresAt?.value, refreshToken.createdAt?.value, refreshToken.updatedAt?.value, refreshToken.deletedAt?.value, ), ); } toDTO(): LiteralObject { return { id: this.id.value, accessTokenId: this.accessTokenId.value, token: this.token.value, isRevoked: this.isRevoked.value, expiresAt: this.expiresAt?.value, createdAt: this.createdAt?.value, updatedAt: this.updatedAt?.value, deletedAt: this.deletedAt?.value, // eager relationship accessToken: this.accessToken?.toDTO(), }; } toI18nDTO(): LiteralObject { return { }; } }
package br.com.juno.integration.api.services.request.document; import br.com.juno.integration.api.services.request.BaseResourceRequest; public final class DocumentListRequest extends BaseResourceRequest { private static final long serialVersionUID = 3175598211179607287L; }
def is_configured(self, project, **kwargs): params = self.get_option return bool(params('host', project) and params('port', project))
#include "guimod.h" #include "credits.h" #include "clickablelabel.h" #include "qtu.cpp" // contains template function(s) so can't have normal header #include "stylesheets.h" #include "version.h" #include <QApplication> #include <QCheckBox> #include <QDesktopServices> #include <QFileDialog> #include <QGroupBox> #include <QLineEdit> #include <QLabel> #include <QPushButton> #include <QTimer> #include <QUrl> #include <QMessageBox> #include <cstdint> #include <settings_utils.h> #define SETTINGS_PATH "Software\\h3minternals" static void _applyCheckBoxSettings(QObject *parent) { QCheckBox *checkbox; foreach(QObject *child, parent->children()) { if (NULL == (checkbox = qobject_cast<QCheckBox *>(child)) || 0 == checkbox->objectName().count('|')) { _applyCheckBoxSettings(child); continue; } QString name = QString("enable_") + checkbox->objectName().split('|')[0]; settings_set_int(SETTINGS_PATH, name.toStdString().c_str(), (int)checkbox->isChecked()); } } void GuiMod::createCheckOptions(QWidget *parent, const QFont &font, const QPalette &palette) { const int labelX = 0x0A; const int checkX = 0x169; const int initialY = 0x35; const int incY = 24; const char *options[] = { "Fullscreen|fullscreen", "Re-visitable Objects (re-visit with spacebar)|revisitable", "Extra Hotkeys " "<a href=\"fbi.gov :-)\"><span style=\"color: #FFCC4B;\">(?)</span></a>" "|hotkeys", "60 FPS (default: 30)|fps", "Never Hide Cursor|cursor", "No Sound Delay|sound", "XXL Maps Patch (removes minimap rendering)|xxl", "RMG|rmg"}; bool defaults[] = { true, // fullscreen, unused true, // re-visit true, // hotkeys true, // fps true, // cursor false, // sound false, // xxl false // rmg }; bool checked = 0; for (int i = 0; i < sizeof(options) / sizeof(options[0]); ++i) { QCheckBox *checkbox = new QCheckBox(parent); checkbox->setGeometry(checkX, initialY + (incY * i), 0x32, 0xE); checkbox->setStyleSheet(COMBOBOX_ORIG_STYLESHEET); checkbox->show(); checkbox->setObjectName(QString(options[i]).split('|')[1] + QString("|check")); checked = defaults[i]; settings_get_int(SETTINGS_PATH, (QString("enable_") + QString(options[i]).split('|')[1]).toStdString().c_str(), (int *)&checked); checkbox->setChecked(checked); ClickableLabel *label = new ClickableLabel("", parent); label->setGeometry(labelX, initialY + (incY * i) - 4, 0x200, 0x16); label->setText(QString(options[i]).split('|')[0]); label->setObjectName(QString(options[i]).split('|')[1] + QString("|label")); label->setStyleSheet(QString(FULLSCREENLABEL_ORIG_STYLESHEET)); label->setFont(font); label->setPalette(palette); label->show(); connect(label, SIGNAL(clicked()), this, SLOT(optionLabelClicked())); } } void GuiMod::extendGui() { m_main = qtuFindMainWidget(false); QWidget *centralWidget = qtuFindChildWidget(m_main, "centralWidget"); QWidget *layout = qtuFindChildWidget(m_main, "_layout"); QGroupBox *m_groupBox = qobject_cast<QGroupBox *>(qtuFindChildWidget(m_main, "videoGBox")); QLabel *versionLbl = qobject_cast<QLabel *>(qtuFindChildWidget(m_main, "versionLbl")); QLabel *fullscreenLbl = qobject_cast<QLabel *>(qtuFindChildWidget(m_main, "fullscreenLbl")); QLabel *resolutionLbl = qobject_cast<QLabel *>(qtuFindChildWidget(m_main, "resolutionLbl")); QCheckBox *fullscreenBox = qobject_cast<QCheckBox *>(qtuFindChildWidget(m_main, "fullscreenBox")); QPushButton *playBtn = qobject_cast<QPushButton *>(qtuFindChildWidget(m_main, "playBtn")); QPushButton *tutorialBtn = qobject_cast<QPushButton *>(qtuFindChildWidget(m_main, "tutorialBtn")); // orig 0xb1, 0x27 QPushButton *mapEditorBtn = qobject_cast<QPushButton *>(qtuFindChildWidget(m_main, "mapEditorBtn")); resolutionLbl->setGeometry(resolutionLbl->x(), resolutionLbl->y() + 4, resolutionLbl->width(), resolutionLbl->height()); fullscreenLbl->hide(); fullscreenBox->hide(); versionLbl->setText(versionLbl->text() + QString(", HDE Mod " HDE_MOD_VERSION)); versionLbl->setParent(centralWidget); versionLbl->setStyleSheet(VERSIONLABEL_NEW_STYLESHEET); versionLbl->setGeometry(versionLbl->x() - 36, versionLbl->y(), 170, 21); m_groupBox->setGeometry(0x1F, 0x20, 0x1A2, 0x142); m_groupBox->setStyleSheet(GROUPBOX_NEW_STYLESHEET); tutorialBtn->hide(); playBtn->setGeometry(tutorialBtn->geometry()); playBtn->disconnect(); playBtn->setStyleSheet(PLAYBTN_ORIG_STYLESHEET); connect(playBtn, SIGNAL(clicked()), this, SLOT(playBtnClicked())); createCheckOptions(m_groupBox, fullscreenLbl->font(), fullscreenLbl->palette()); m_rmgCheck = qobject_cast<QCheckBox *>(qtuFindChildWidget(m_main, "rmg|check")); m_rmgCheck->setGeometry(m_rmgCheck->x() - 0x15D, m_rmgCheck->y(), m_rmgCheck->width(), m_rmgCheck->height()); connect(m_rmgCheck, SIGNAL(toggled(bool)), this, SLOT(rmgCheckToggled(bool))); QLabel *rmgLabel = qobject_cast<QLabel *>(qtuFindChildWidget(m_main, "rmg|label")); m_rmgEdit = new QLineEdit(m_groupBox); m_rmgEdit->setGeometry(rmgLabel->x() + 0x36, rmgLabel->y(), 0xDF, 0x16); m_rmgEdit->show(); m_rmgEdit->setPlaceholderText("H3 Complete Path (for RMG)..."); m_rmgEdit->setStyleSheet(QString(LINEEDIT_NEW_STYLESHEET)); QFont rmgFont = fullscreenLbl->font(); m_rmgEdit->setFont(rmgFont); char mapedPath[512] = { 0 }; settings_get_ascii(SETTINGS_PATH, "orig_maped_path", mapedPath, sizeof(mapedPath)); m_rmgEdit->setText(QString(mapedPath)); QPushButton *browseBtn = new QPushButton(m_groupBox); browseBtn->setGeometry(rmgLabel->x() + 0x117, rmgLabel->y(), 0x76, 0x1A); browseBtn->setObjectName("browseBtn"); browseBtn->setStyleSheet(BROWSEBTN_NEW_STYLESHEET); browseBtn->setText("Browse"); browseBtn->show(); browseBtn->setFont(fullscreenLbl->font()); connect(browseBtn, SIGNAL(clicked()), this, SLOT(browseBtnClicked())); QLabel *newFullscreenLbl = qobject_cast<QLabel *>(qtuFindChildWidget(m_main, "fullscreen|label")); newFullscreenLbl->setText(fullscreenLbl->text()); QCheckBox *newFullscreenBox = qobject_cast<QCheckBox *>(qtuFindChildWidget(m_main, "fullscreen|check")); newFullscreenBox->setChecked(fullscreenBox->isChecked()); // Connect new checkbox to the slot in the original executable connect(newFullscreenBox, SIGNAL(toggled(bool)), m_main, SLOT(fullscreenBoxToggled(bool))); QPushButton *creditsBtn = new QPushButton(m_groupBox); creditsBtn->setGeometry(0x06, 0x122, 0x76, 0x1A); creditsBtn->setObjectName("creditsBtn"); creditsBtn->setStyleSheet(CREDITSBTN_NEW_STYLESHEET); creditsBtn->setText("Credits"); creditsBtn->show(); creditsBtn->setFont(fullscreenLbl->font()); connect(creditsBtn, SIGNAL(clicked()), this, SLOT(creditsBtnClicked())); QPushButton *donateBtn = new QPushButton(m_groupBox); donateBtn->setGeometry(0x126, 0x122, 0x76, 0x1A); donateBtn->setObjectName("donateBtn"); donateBtn->setStyleSheet(DONATEBTN_NEW_STYLESHEET); donateBtn->setText("Donate!"); donateBtn->show(); donateBtn->setFont(fullscreenLbl->font()); connect(donateBtn, SIGNAL(clicked()), this, SLOT(donateBtnClicked())); ClickableLabel *hotkeysLbl = qobject_cast<ClickableLabel *>(qtuFindChildWidget(m_main, "hotkeys|label")); connect(hotkeysLbl, SIGNAL(linkActivated(const QString &)), this, SLOT(hotkeysLinkActivated(const QString &))); } void GuiMod::playBtnClicked() { // Apply settings that will be loaded by DLL injected into HOMM3 2.0.exe QString path = QDir::toNativeSeparators(QCoreApplication::applicationDirPath()); settings_set_ascii(SETTINGS_PATH, "maped_rmg_path", (path + QString("\\maped_rmg.dll")).toStdString().c_str()); settings_set_ascii(SETTINGS_PATH, "templates_path", (path + QString("\\templates")).toStdString().c_str()); settings_set_ascii(SETTINGS_PATH, "orig_maped_path", m_rmgEdit->text().toStdString().c_str()); _applyCheckBoxSettings(m_main); // Have the play function in the launcher executable get called, // launching HOMM3 2.0.exe QTimer::singleShot(0, m_main, "1playBtnClicked()"); } void GuiMod::donateBtnClicked() { QDesktopServices::openUrl(QUrl(QString("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FH4RSQKJTMWJS"))); } void GuiMod::creditsBtnClicked() { // TODO: more fancy credits display QMessageBox *msg = new QMessageBox(); msg->setText(CREDITS); msg->setIcon(QMessageBox::Warning); // It's pretty msg->show(); } void GuiMod::browseRmg() { QString path = QDir::toNativeSeparators(QFileDialog::getExistingDirectory(m_main, tr("Choose H3 Complete Path (containing h3maped.exe)"), m_rmgEdit->text(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks)); if (path.isEmpty()) { m_rmgCheck->setChecked(false); return; } if (!qtuFileExists(path + "\\h3maped.exe")) { QMessageBox messageBox; messageBox.critical(0, "Invalid Path", "h3maped.exe not found in selected path!"); messageBox.show(); m_rmgCheck->setChecked(false); return; } m_rmgEdit->setText(path); m_rmgCheck->setChecked(true); } void GuiMod::browseBtnClicked() { browseRmg(); } void GuiMod::rmgCheckToggled(bool toggle) { if (false == toggle) { return; } QString path = m_rmgEdit->text(); if (!qtuFileExists(path + "\\h3maped.exe")) { browseRmg(); } } void GuiMod::optionLabelClicked() { QObject *sender = QObject::sender(); if (NULL == sender) { return; } QCheckBox *check = qobject_cast<QCheckBox *>(qtuFindChildWidget(m_main, QString(sender->objectName().split('|')[0] + QString("|check")))); if (NULL == check) { return; } check->setChecked(!check->isChecked()); } void GuiMod::hotkeysLinkActivated(const QString &link) { // Hack to re-toggle the checkbox that was toggled when Question mark was clicked QCheckBox *check = qobject_cast<QCheckBox *>(qtuFindChildWidget(m_main, "hotkeys|check")); check->toggle(); QMessageBox *msg = new QMessageBox(); msg->setIcon(QMessageBox::Question); msg->setText( "Quick Combat Battle Result Screen:\n" "ESC: Re-play this battle without Quick Combat\n\n" "Hero Trade Screen:\n" "Q: Swap creatures and artifacts\n" "1: Move all creatures and artifacts to hero 1 (left)\n" "2: Move all creatures and artifacts to hero 2 (right)\n" "\nTown/Hero/Hero Trade Screen:\n" "Ctrl+click: split 1 creature into free stack\n" "Ctrl+Shift+click: split clicked creature stack into as many stacks of 1 as possible\n" "Shift+click: split clicked creature stack evenly\n" "Alt+click: join all creatures of this type into this stack\n" "Delete+click: dismiss selected stack\n\n" "Moving last stack from hero to hero / town to hero: all creatures except 1 are moved (without mod nothing " "happens when trying to move last stack)" ); msg->show(); } GuiMod::GuiMod() { } GuiMod::~GuiMod() { }
package entity import "github.com/sedyh/mizu/examples/tilemap/component" // Tilemap size type Construct struct { component.Construct }
<reponame>dolphingarlic/sketch-frontend /* * Copyright 2003 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without * fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting * documentation, and that the name of M.I.T. not be used in * advertising or publicity pertaining to distribution of the * software without specific, written prior permission. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" * without express or implied warranty. */ package sketch.compiler.codegenerators.tojava; import sketch.compiler.ast.core.FENode; import sketch.compiler.ast.core.FEVisitor; import sketch.compiler.ast.core.exprs.Expression; import sketch.compiler.ast.core.typs.Type; /** * An old-syntax I/O rate declaration. This has a name, a type, and one * or two integer rates. It gets translated to a statement like * <pre> * name = new Channel(type.class, rate1, rate2); * </pre> * * @author <NAME> &lt;<EMAIL>&gt; * @version $Id$ */ public class StmtIODecl extends sketch.compiler.ast.core.stmts.Statement { private String name; private Type type; private Expression rate1, rate2; /** * Creates a new I/O rate declaration. The name should be either * "input" or "output". If it is "output", <code>rate1</code> is the * push rate. If the name is "input", <code>rate1</code> is the * pop rate, and <code>rate2</code> is the peek rate. The second rate * can be <code>null</code> if it is unnecessary or it is equal to the * first rate. * * @param context Context this statement appears in * @param name Name of the channel * @param type Type of objects on this channel * @param rate1 Push or pop rate * @param rate2 Peek rate or null */ public StmtIODecl(FENode context, String name, Type type, Expression rate1, Expression rate2) { super(context); this.name = name; this.type = type; this.rate1 = rate1; this.rate2 = rate2; } /** * Creates a new I/O rate declaration with a single rate. * * @param context Context this statement appears in * @param name Name of the channel * @param type Type of objects on this channel * @param rate Push or pop rate */ public StmtIODecl(FENode context, String name, Type type, Expression rate) { this(context, name, type, rate, null); } /** Returns the name of the channel being declared. */ public String getName() { return name; } /** Returns the type of items on the channel. */ public Type getType() { return type; } /** Returns the pop or push rate of the stream. */ public Expression getRate1() { return rate1; } /** Returns the peek rate of the stream. Returns null if this is an * output channel or if the peek rate is undeclared and implicitly * equal to the pop rate. */ public Expression getRate2() { return rate2; } public Object accept(FEVisitor v) { return v.visitOther(this); } }
// NewGCPTokenManager creates a GCP object func NewGCPTokenManager(saProject, defaultBroker string, saw *saw.AccountWarehouse) *GCP { return &GCP{ saProject: saProject, defaultBroker: defaultBroker, saw: saw, } }
/** Inline this ApplyExp if parameters are constant. * @param proc the procedure bound to this.func. * @return the constant result (as a QuoteExp) if inlining was possible; * otherwise this ApplyExp. * If applying proc throws an exception, print a warning on walker.messages. */ public final Expression inlineIfConstant(Procedure proc, SourceMessages messages) { int len = args.length; Object[] vals = new Object[len]; for (int i = len; --i >= 0; ) { Expression arg = args[i]; if (arg instanceof ReferenceExp) { Declaration decl = ((ReferenceExp) arg).getBinding(); if (decl != null) { arg = decl.getValue(); if (arg == QuoteExp.undefined_exp) return this; } } if (! (arg instanceof QuoteExp)) return this; vals[i] = ((QuoteExp) arg).getValue(); } try { return new QuoteExp(proc.applyN(vals), type); } catch (Throwable ex) { if (messages != null) messages.error('w', "call to " + proc + " throws " + ex); return this; } }
import {Pointer} from './pointer' import {apply} from './patch' import {Operation, TestOperation, isDestructive, Diff, VoidableDiff, diffAny} from './diff' export {Operation, TestOperation} export type Patch = Operation[] /** Apply a 'application/json-patch+json'-type patch to an object. `patch` *must* be an array of operations. > Operation objects MUST have exactly one "op" member, whose value > indicates the operation to perform. Its value MUST be one of "add", > "remove", "replace", "move", "copy", or "test"; other values are > errors. This method mutates the target object in-place. @returns list of results, one for each operation: `null` indicated success, otherwise, the result will be an instance of one of the Error classes: MissingError, InvalidOperationError, or TestError. */ export function applyPatch(object: any, patch: Operation[]) { return patch.map(operation => apply(object, operation)) } function wrapVoidableDiff(diff: VoidableDiff): Diff { function wrappedDiff(input: any, output: any, ptr: Pointer): Operation[] { const custom_patch = diff(input, output, ptr) // ensure an array is always returned return Array.isArray(custom_patch) ? custom_patch : diffAny(input, output, ptr, wrappedDiff) } return wrappedDiff } /** Produce a 'application/json-patch+json'-type patch to get from one object to another. This does not alter `input` or `output` unless they have a property getter with side-effects (which is not a good idea anyway). `diff` is called on each pair of comparable non-primitive nodes in the `input`/`output` object trees, producing nested patches. Return `undefined` to fall back to default behaviour. Returns list of operations to perform on `input` to produce `output`. */ export function createPatch(input: any, output: any, diff?: VoidableDiff): Operation[] { const ptr = new Pointer() // a new Pointer gets a default path of [''] if not specified return (diff ? wrapVoidableDiff(diff) : diffAny)(input, output, ptr) } /** Create a test operation based on `input`'s current evaluation of the JSON Pointer `path`; if such a pointer cannot be resolved, returns undefined. */ function createTest(input: any, path: string): TestOperation | undefined { const endpoint = Pointer.fromJSON(path).evaluate(input) if (endpoint !== undefined) { return {op: 'test', path, value: endpoint.value} } } /** Produce an 'application/json-patch+json'-type list of tests, to verify that existing values in an object are identical to the those captured at some checkpoint (whenever this function is called). This does not alter `input` or `output` unless they have a property getter with side-effects (which is not a good idea anyway). Returns list of test operations. */ export function createTests(input: any, patch: Operation[]): TestOperation[] { const tests = new Array<TestOperation>() patch.filter(isDestructive).forEach(operation => { const pathTest = createTest(input, operation.path) if (pathTest) tests.push(pathTest) if ('from' in operation) { const fromTest = createTest(input, operation.from) if (fromTest) tests.push(fromTest) } }) return tests }
// post submits a message to a backend service // returns the response or encountered errors func Post(serviceURL string, data []byte, header map[string]string) (h.HTTPResponse, error) { client := &http.Client{Timeout: h.BackendRequestTimeout} req, err := http.NewRequest(http.MethodPost, serviceURL, bytes.NewBuffer(data)) if err != nil { return h.HTTPResponse{}, fmt.Errorf("can't make new post request: %v", err) } for k, v := range header { req.Header.Set(k, v) } resp, err := client.Do(req) if err != nil { return h.HTTPResponse{}, err } defer resp.Body.Close() respBodyBytes, err := ioutil.ReadAll(resp.Body) if err != nil { return h.HTTPResponse{}, err } return h.HTTPResponse{ StatusCode: resp.StatusCode, Header: resp.Header, Content: respBodyBytes, }, nil }
def add_baseline_bias(self): self.utilities[self.detailed_baseline_version.id] += 1.0e-10 logger.debug("Added baseline bias") logger.debug(self.utilities.head())
/** ****************************************************************************** * @file STM32F10x_DSP_Lib/inc/stm32_dsp.h * @author MCD Application Team * @version V2.0.0 * @date 04/27/2009 * @brief This source file contains prototypes of DSP functions ****************************************************************************** * @copy * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2> */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F10x_DSP_H #define __STM32F10x_DSP_H /* Includes ------------------------------------------------------------------*/ #include "stm32f10x.h" /* Exported types ------------------------------------------------------------*/ /* for block FIR module */ typedef struct { uint16_t *h; uint32_t nh; } COEFS; /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ /* FIR 16-bit filter in assembly */ void fir_16by16_stm32(void *y, void *x, COEFS *c, uint32_t N); /* PID controller in C, error computed outside the function */ uint16_t DoPID(uint16_t Error, uint16_t *Coeff); /* Full PID in C, error computed inside the function */ uint16_t DoFullPID(uint16_t In, uint16_t Ref, uint16_t *Coeff); /* PID controller in assembly, error computed outside the function */ uint16_t PID_stm32(uint16_t Error, uint16_t *Coeff); /* Radix-4 complex FFT for STM32, in assembly */ /* 64 points*/ void cr4_fft_64_stm32(void *pssOUT, void *pssIN, uint16_t Nbin); /* 256 points */ void cr4_fft_256_stm32(void *pssOUT, void *pssIN, uint16_t Nbin); /* 1024 points */ void cr4_fft_1024_stm32(void *pssOUT, void *pssIN, uint16_t Nbin); /* IIR filter in assembly */ void iirarma_stm32(void *y, void *x, uint16_t *h2, uint16_t *h1, uint32_t ny ); /* IIR filter in C */ void iir_biquad_stm32(uint16_t *y, uint16_t *x, int16_t *IIRCoeff, uint16_t ny); #endif /* __STM32F10x_DSP_H */ /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
def tabs_to_df(tabs): stackable = defaultdict(int) for tab in tabs: for item in tab['items']: if 'stackSize' in item: stackable[item['typeLine']] += item['stackSize'] return pandas.DataFrame(stackable.items(), columns=['item', 'count'])
package org.aries.service.jaxws; import java.util.Collection; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import javax.xml.ws.handler.MessageContext; public class MessageContextImpl implements MessageContext { private Map<String, Object> map = new ConcurrentHashMap<String, Object>(); @Override public int size() { return map.size(); } @Override public boolean isEmpty() { return size() == 0; } @Override public boolean containsKey(Object key) { return map.containsKey(key); } @Override public boolean containsValue(Object value) { return map.containsValue(value); } @Override public Object get(Object key) { return map.get(key); } @Override public Object put(String key, Object value) { return map.put(key, value); } @Override public Object remove(Object key) { return map.remove(key); } @Override public void putAll(Map<? extends String, ? extends Object> map) { this.map.putAll(map); } @Override public void clear() { } @Override public Set<String> keySet() { return map.keySet(); } @Override public Collection<Object> values() { return map.values(); } @Override public Set<java.util.Map.Entry<String, Object>> entrySet() { return map.entrySet(); } @Override public void setScope(String name, Scope scope) { } @Override public Scope getScope(String name) { return null; } }
<reponame>1018-MattOberlies-CaliberMobile/caliber-mobile-backend<filename>src/functions/note/handlers/getNotesByBatchIdAndWeekOverallHandler.ts /* eslint-disable prefer-destructuring */ /* eslint-disable dot-notation */ import 'source-map-support/register'; import type { ValidatedEventAPIGatewayProxyEvent } from '@libs/apiGateway'; import { formatJSONResponse } from '@libs/apiGateway'; import { middyfy } from '@libs/lambda'; import DB from '../../../repositories/noteDAO/note.dao'; // eslint-disable-next-line max-len const getNotesByBatchIdAndWeekOverall: ValidatedEventAPIGatewayProxyEvent<unknown> = async (event) => { const batchId = event.path['batchId']; const week = event.path['week']; console.log(event.path, batchId, week); const note = await DB.notesByBatchIdAndWeekOverall(batchId, parseInt(week, 10)); return formatJSONResponse({ note, }); }; export const main = middyfy(getNotesByBatchIdAndWeekOverall);
import { Command } from './interfaces'; const cliui = require('cliui'); export interface CommandWrapper extends Command { name: string; group: string; path: string; } export type CommandsMap = Map<string, CommandWrapper>; /** * Function to create a loader instance, this allows the config to be injected * @param: searchPrefix A string that tells the command loader how cli commands will be named, ie. * 'dojo-cli-' is the default meaning commands could be * - 'dojo-cli-build-webpack' * - 'dojo-cli-serve-dist' */ export function initCommandLoader(searchPrefix: string): (path: string) => CommandWrapper { const commandRegExp = new RegExp(`${searchPrefix}-(.*)-(.*)`); return function load(path: string): CommandWrapper { let module = require(path); try { const command = convertModuleToCommand(module); const {description, register, run} = command; // derive the group and name from the module directory name, e.g. dojo-cli-group-name const [ , group, name] = <string[]> commandRegExp.exec(path); return { name, group, description, register, run, path }; } catch (err) { throw new Error(`Path: ${path} returned module that does not satisfy the Command interface. ${err}`); } }; } /** * Creates a builtIn command loader function. */ export function createBuiltInCommandLoader(): (path: string) => CommandWrapper { return function load(path: string): CommandWrapper { const module = require(path); try { const command = convertModuleToCommand(module); // derive the name and group of the built in commands from the command itself (these are optional props) const { name = '', group = '', description, register, run } = command; return { name, group, description, register, run, path }; } catch (err) { throw new Error(`Path: ${path} returned module that does not satisfy the Command interface: ${err}`); } }; } export function convertModuleToCommand(module: any): Command { if (module.__esModule && module.default) { module = module.default; } if (module.description && module.register && module.run) { return module; } else { throw new Error(`Module does not satisfy the Command interface`); } } export function getGroupDescription(commandNames: Set<string>, commands: CommandsMap): string { const numCommands = commandNames.size; if (numCommands > 1) { return getMultiCommandDescription(commandNames, commands); } else { const { description } = <CommandWrapper> commands.get(Array.from(commandNames.keys())[0]); return description; } } function getMultiCommandDescription(commandNames: Set<string>, commands: CommandsMap): string { const descriptions = Array.from(commandNames.keys(), (commandName) => { const { name, description } = (<CommandWrapper> commands.get(commandName)); return `${name} \t${description}`; }); const ui = cliui({ width: 80 }); ui.div(descriptions.join('\n')); return ui.toString(); }
package linklist; //TODO https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/ //删除链表的倒数第N个节点 public class LinkList19 { public static void main(String[] args) { ListNode n1 = new ListNode(1); // ListNode n2 = new ListNode(2); // ListNode n3 = new ListNode(3); // ListNode n4 = new ListNode(4); // // // n1.next = n2; // n2.next = n3; // n3.next = n4; ListNode node = new LinkList19().removeNthFromEnd(n1, 1); if(node!=null){ node.print(); } // System.out.print( new LinkList19().removeNthFromEnd(n1, 1).val); } public ListNode removeNthFromEnd(ListNode head, int n) { if (n < 1) { return null; } if (head == null) { return null; } ListNode fast = head; ListNode slow = head; for (int i = 1; i < n; i++) { fast = fast.next; } ListNode slowPre = null; while (fast.next != null) { fast = fast.next; slowPre = slow; slow = slow.next; } //快慢指针找到倒数第N个指针 //然后删除第N节点 //边缘条件时候删除节点 if(slowPre==null){ return slow.next; } //普通情况删除节点 slowPre.next = slow.next; return head; } }
/** * It is not clear what is the difference between aggregation and the previous version. */ public class ClickHouseSqlStatementWriter extends BaseJdbcSqlStatementWriter { protected static final Logger log = Logger.get(ClickHouseSqlStatementWriter.class); public ClickHouseSqlStatementWriter(JdbcPushDownParameter pushDownParameter) { super(pushDownParameter); } @Override public String aggregation(String functionName, List<String> arguments, boolean isDistinct) { if (functionName.toUpperCase(Locale.ENGLISH).equals("VARIANCE")) { functionName = "varPop"; } return super.aggregation(functionName, arguments, isDistinct); } @Override public String windowFrame(Types.WindowFrameType type, String start, Optional<String> end) { throw new UnsupportedOperationException("ClickHouse Connector does not support windows function"); } @Override public String window(String functionName, List<String> functionArgs, List<String> partitionBy, Optional<String> orderBy, Optional<String> frame) { throw new UnsupportedOperationException("ClickHouse Connector does not support windows function"); } @Override public String from(String selections, String from) { String[] froms = from.split("\\."); if (froms.length == 2) { return selections + " FROM " + from; } else if (froms.length == 3) { StringBuilder sb = new StringBuilder(froms[1]); sb.append("."); sb.append(froms[2]); return selections + " FROM " + sb.toString(); } else { log.error("params more than 3 " + from); return selections + " FROM " + from; } } }
/** * Created by Administrator on 2017/1/18. */ public class HomeFragment extends BaseMVPFragment<DiscoverPresenter> implements IDiscoverView { @BindView(R.id.progressLayout) ProgressLayout progressLayout; @BindView(R.id.swipe) SuperSwipeRefreshLayout swipe; @BindView(R.id.rv_discover) RecyclerView rvDiscover; @BindView(R.id.tv_title) TextView tv_title ; private BannerView mBannerView; private View headerView; // private Banner banner; private boolean isFirst = true; private MyPullToRefreshListener pullToRefreshListener; // List<Banner.BannerPicBean.PicBean> beanList = null ; private String mock_header_json = "[{\"description\":\"\",\"id\":39,\"image\":{\"authorId\":0,\"height\":86," + "\"id\":2719364,\"sizeType\":0,\"targetId\":39,\"targetType\":8,\"url\":\"http://p0.meituan" + ".net/movie/5acd468360744ef1358d2e7276e5c5504617.png\",\"width\":86},\"tag\":\"\",\"title\":\"学校介绍\"," + "\"url\":\"meituanmovie://www.meituan.com/web?url=http://m.maoyan.com/newGuide/top10\"}," + "{\"description\":\"\",\"id\":36,\"image\":{\"authorId\":0,\"height\":86,\"id\":2719367,\"sizeType\":0," + "\"targetId\":36,\"targetType\":8,\"url\":\"http://p1.meituan" + ".net/movie/ba7ce8110dafc249dcd3db2978d96c032811.png\",\"width\":86},\"tag\":\"\",\"title\":\"专业介绍\"," + "\"url\":\"meituanmovie://www.meituan.com/web?url=http://m.maoyan.com/information?_v_=yes\"}," + "{\"description\":\"\",\"id\":45,\"image\":{\"authorId\":0,\"height\":86,\"id\":2751974,\"sizeType\":0," + "\"targetId\":45,\"targetType\":8,\"url\":\"http://p1.meituan" + ".net/movie/3596742a83baf834a80dcd86ae8749fe3356.png\",\"width\":86},\"tag\":\"\",\"title\":\"师资情况\"," + "\"url\":\"meituanmovie://www.meituan.com/web?url=http://m.maoyan.com/store?_v_=yes\"}," + "{\"description\":\"\",\"id\":38,\"image\":{\"authorId\":0,\"height\":86,\"id\":2719365,\"sizeType\":0," + "\"targetId\":38,\"targetType\":8,\"url\":\"http://p0.meituan" + ".net/movie/91619295e2c79bc3cd755cec0ceaf47c3921.png\",\"width\":86},\"tag\":\"\",\"title\":\"新生指南\"," + "\"url\":\"meituanmovie://www.meituan.com/web?swipepop=false&url=https://m.maoyan" + ".com/newGuide/maoyanpiaofang\"},{\"description\":\"\",\"id\":39,\"image\":{\"authorId\":0,\"height\":86," + "\"id\":2719364,\"sizeType\":0,\"targetId\":39,\"targetType\":8,\"url\":\"http://p0.meituan" + ".net/movie/5acd468360744ef1358d2e7276e5c5504617.png\",\"width\":86},\"tag\":\"\",\"title\":\"热门选课\"," + "\"url\":\"meituanmovie://www.meituan.com/web?url=http://m.maoyan.com/newGuide/top10\"}," + "{\"description\":\"\",\"id\":36,\"image\":{\"authorId\":0,\"height\":86,\"id\":2719367,\"sizeType\":0," + "\"targetId\":36,\"targetType\":8,\"url\":\"http://p1.meituan" + ".net/movie/ba7ce8110dafc249dcd3db2978d96c032811.png\",\"width\":86},\"tag\":\"\",\"title\":\"社团风采\"," + "\"url\":\"meituanmovie://www.meituan.com/web?url=http://m.maoyan.com/information?_v_=yes\"}," + "{\"description\":\"\",\"id\":45,\"image\":{\"authorId\":0,\"height\":86,\"id\":2751974,\"sizeType\":0," + "\"targetId\":45,\"targetType\":8,\"url\":\"http://p1.meituan" + ".net/movie/3596742a83baf834a80dcd86ae8749fe3356.png\",\"width\":86},\"tag\":\"\",\"title\":\"教务系统\"," + "\"url\":\"meituanmovie://www.meituan.com/web?url=http://m.maoyan.com/store?_v_=yes\"}," + "{\"description\":\"\",\"id\":38,\"image\":{\"authorId\":0,\"height\":86,\"id\":2719365,\"sizeType\":0," + "\"targetId\":38,\"targetType\":8,\"url\":\"http://p0.meituan" + ".net/movie/91619295e2c79bc3cd755cec0ceaf47c3921.png\",\"width\":86},\"tag\":\"\",\"title\":\"更多内容\"," + "\"url\":\"meituanmovie://www.meituan.com/web?swipepop=false&url=https://m.maoyan" + ".com/newGuide/maoyanpiaofang\"}]"; public static HomeFragment newInstance() { return new HomeFragment(); } private DiscoverAdapter discoverAdapter; private int offset = 0; private int limit = 10; @Override protected int getLayoutId() { return R.layout.fragment_home; } @Override protected DiscoverPresenter getPresenter() { return new DiscoverPresenter(mContext, this); } @Override protected void initEventAndData() { tv_title.setText("安阳职业技术学院"); discoverAdapter = new DiscoverAdapter(); rvDiscover.setLayoutManager(new LinearLayoutManager(mContext)); rvDiscover.setAdapter(discoverAdapter); //RV头部栏目 headerView = mContext.getLayoutInflater().inflate(R.layout.item_home_header, (ViewGroup) rvDiscover.getParent(), false); // banner = (Banner) headerView.findViewById(R.id.banner); // beanList = new ArrayList<>(); // for (int i = 0; i < 3; i++) { // Banner.BannerPicBean.PicBean bean = new Banner.BannerPicBean.PicBean(); // bean.picUrl = "http://www.ayzy.cn/upload/20180117/6ce67f9a9a7c4f8eb2e3f4184f28b9be.jpg"; // beanList.add(bean); // } mBannerView = (BannerView) headerView.findViewById(R.id.banner_view); List<BannerEntity> entities = new ArrayList<>(); for (int i = 0; i < 1; i++) { BannerEntity bean = new BannerEntity(); bean.imageUrl = "http://www.ayzy.cn/upload/20180117/6ce67f9a9a7c4f8eb2e3f4184f28b9be.jpg"; bean.title = "欢迎新生入学"; entities.add(bean); } BannerEntity beanYidong = new BannerEntity(); beanYidong.imageUrl = "http://www.10086.cn/uploadBaseDir/content/jpg/20180530/20180530160733798YTY.jpg"; beanYidong.title = "移动和4G欢迎新生入校"; entities.add(beanYidong); mBannerView.setEntities(entities); mBannerView.setAutoScroll(1); discoverAdapter.addHeaderView(headerView); Type dataType = new TypeToken<List<DiscoverHeaderBean.DataBean>>(){}.getType(); List<DiscoverHeaderBean.DataBean> data = GsonUtil.getGson().fromJson(mock_header_json, dataType); addDiscoverHeaderData(data); // banner.setPic(beanList); //下拉刷新 pullToRefreshListener = new MyPullToRefreshListener(mContext,swipe); swipe.setOnPullRefreshListener(pullToRefreshListener); pullToRefreshListener.setOnRefreshListener(new MyPullToRefreshListener.OnRefreshListener() { @Override public void refresh() { offset = 0; discoverAdapter.setNewData(new ArrayList<DiscoverBean.DataBean.FeedsBean>()); mPresenter.getDiscoverData(offset, limit); } }); discoverAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() { @Override public void onLoadMoreRequested() { mPresenter.getDiscoverData(offset, limit); } },rvDiscover); mPresenter.getDiscoverData(offset, limit); discoverAdapter.notifyDataSetChanged(); } @Override public void onStart() { super.onStart(); } @Override public void onStop() { super.onStop(); } @Override protected void lazyLoadEveryTime() { if (isFirst) { isFirst = false; } } @Override public void addDiscoverData(List<DiscoverBean.DataBean.FeedsBean> feeds) { if (feeds.size() > 0) { offset += 10; discoverAdapter.addData(feeds); discoverAdapter.loadMoreComplete(); } else { discoverAdapter.loadMoreEnd(); } } @Override public void addDiscoverHeaderData(final List<DiscoverHeaderBean.DataBean> data) { ImageView[] imageViews = new ImageView[]{((ImageView) headerView.findViewById(R.id.iv_header1)), ((ImageView) headerView.findViewById(R.id.iv_header2)), ((ImageView) headerView.findViewById(R.id.iv_header3)), ((ImageView) headerView.findViewById(R.id.iv_header4)), ((ImageView) headerView.findViewById(R.id.iv_header5)), ((ImageView) headerView.findViewById(R.id.iv_header6)), ((ImageView) headerView.findViewById(R.id.iv_header7)), ((ImageView) headerView.findViewById(R.id.iv_header8)) }; TextView[] tv_content = new TextView[]{ ((TextView) headerView.findViewById(R.id.tv_header1)), ((TextView) headerView.findViewById(R.id.tv_header2)), ((TextView) headerView.findViewById(R.id.tv_header3)), ((TextView) headerView.findViewById(R.id.tv_header4)), ((TextView) headerView.findViewById(R.id.tv_header5)), ((TextView) headerView.findViewById(R.id.tv_header6)), ((TextView) headerView.findViewById(R.id.tv_header7)), ((TextView) headerView.findViewById(R.id.tv_header8)) }; for (int i = 0; i < data.size(); i++) { GlideManager.loadImage(mContext, data.get(i).getImage().getUrl(), imageViews[i]); tv_content[i].setText(data.get(i).getTitle()); final int finalI = i; imageViews[i].setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { switch (finalI){ case 0: BaseWebViewActivity.start(mContext,"http://cdn.sinacloud.net/diancai/homeinfo_anyangzhiyejishu.html"); break; case 1: XueyuanListActivity.start(mContext, false); break; case 2: ToastUtil.showToast("正在开发...."); break; case 3: BaseWebViewActivity.start(mContext,"https://baijiahao.baidu.com/s?id=1573711882436691"); break; case 4: ClassPlanActivity.start(mContext, 346641,"说话之道选修课"); break; case 5: ToastUtil.showToast("正在开发...."); break; case 6: ToastUtil.showToast("正在开发...."); break; } // BaseWebViewActivity.start(mContext,data.get(finalI).getUrl()); } }); } } @Override public void showLoading() { if (!progressLayout.isContent()) { progressLayout.showLoading(); } } @Override public void showContent() { pullToRefreshListener.refreshDone(); if (!progressLayout.isContent()) { progressLayout.showContent(); } } @Override public void showError(String errorMsg) { Logger.e(errorMsg); pullToRefreshListener.refreshDone(); discoverAdapter.loadMoreEnd(); progressLayout.showError(new View.OnClickListener() { @Override public void onClick(View v) { offset = 0; mPresenter.getDiscoverData(offset, limit); mPresenter.getDiscoverHeader("7.8.0"); if (isFirst) { isFirst = false; } } }); } @Override public void onDestroy() { super.onDestroy(); } }
// copied from minecraft's EnchantingTableBlockEntityRenderer public void renderFancyBook(TableBlockEntity tableBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j) { matrixStack.push(); matrixStack.translate(0.5D, 0.75D, 0.5D); float g = (float)tableBlockEntity.ticks + f; matrixStack.translate(0.0D, (double)(0.1F + MathHelper.sin(g * 0.1F) * 0.01F), 0.0D); float h; for(h = tableBlockEntity.nextAngularOffset - tableBlockEntity.angularOffset; h >= 3.1415927F; h -= 6.2831855F) { } while(h < -3.1415927F) { h += 6.2831855F; } float k = tableBlockEntity.angularOffset + h * f; matrixStack.multiply(Vector3f.POSITIVE_Y.getRadialQuaternion(-k)); matrixStack.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(80.0F)); float l = MathHelper.lerp(f, tableBlockEntity.pageAngle, tableBlockEntity.nextPageAngle); float m = MathHelper.fractionalPart(l + 0.25F) * 1.6F - 0.3F; float n = MathHelper.fractionalPart(l + 0.75F) * 1.6F - 0.3F; float o = MathHelper.lerp(f, tableBlockEntity.pageTurningSpeed, tableBlockEntity.nextPageTurningSpeed); this.book.setPageAngles(g, MathHelper.clamp(m, 0.0F, 1.0F), MathHelper.clamp(n, 0.0F, 1.0F), o); VertexConsumer vertexConsumer = BOOK_SPRITE.getVertexConsumer(vertexConsumerProvider, RenderLayer::getEntitySolid); this.book.method_24184(matrixStack, vertexConsumer, i, j, 1.0F, 1.0F, 1.0F, 1.0F); matrixStack.pop(); }
<gh_stars>1000+ import sys from goprocam import GoProCamera, constants import ffmpeg print("Run modprobe v4l2loopback device=1 video_nr=44 card_label=\"GoPro\" exclusive_caps=1") input("Hit enter when done!") gopro = GoProCamera.GoPro(ip_address=GoProCamera.GoPro.getWebcamIP( sys.argv[1]), camera=constants.gpcontrol, webcam_device=sys.argv[1]) gopro.webcamFOV(constants.Webcam.FOV.Wide) gopro.startWebcam() udp_stream = "udp://{}:8554".format(GoProCamera.GoPro.getWebcamIP(sys.argv[1])) stream = ffmpeg.input(udp_stream, vsync=2, fflags="nobuffer", flags="low_delay", probesize=3072) stream = ffmpeg.output(stream, "/dev/video44", ar="44100", vcodec='rawvideo', pix_fmt="yuv420p", format="v4l2") ffmpeg.run(stream) # "ExecStart=/usr/bin/ffmpeg -vsync 2 -fflags nobuffer -flags low_delay -probesize 3072 -nostdin -i udp://172.26.169.51:8554 -ar 44100 -f v4l2 -pix_fmt yuv420p -vcodec rawvideo /dev/video44" # Thanks to https://gist.github.com/andrewhowdencom/b7ed844ceb6fc44226974723abc7b2d1 # https://twitter.com/andrewhowdencom/status/1309153832350486529
<gh_stars>0 from pathlib import Path from internetarchive import download
// Implement this class public class StoreApiImpl implements StoreApi { public Single<ApiResponse<Void>> deleteOrder(String orderId) { return Single.error(new ApiException("Not Implemented").setStatusCode(501)); } public Single<ApiResponse<Map<String, Integer>>> getInventory() { return Single.error(new ApiException("Not Implemented").setStatusCode(501)); } public Single<ApiResponse<Order>> getOrderById(Long orderId) { return Single.error(new ApiException("Not Implemented").setStatusCode(501)); } public Single<ApiResponse<Order>> placeOrder(Order order) { return Single.error(new ApiException("Not Implemented").setStatusCode(501)); } }
<gh_stars>0 import gym import numpy as np import random from math import pow from math import sqrt from math import exp import pandas import matplotlib.pyplot as plt class QLearn: def __init__(self, actions, epsilon, alpha, gamma): # Defining Q table as dictionary, # provides us to empty state-space # and any unvisited-states self.q = {} # exploration constant self.epsilon = epsilon # Learning Rate : Alpha # How is new value estimate weighted against the old (0-1). # 1 means all new and is ok for no noise situations. self.alpha = alpha # Discount Factor : Gamma # When assessing the value of a state & action, # how important is the value of the future states self.gamma = gamma self.actions = actions def getQ(self, state, action): return self.q.get((state, action), 0.0) def learnQ(self, state, action, reward, value): # Q(s, a) += alpha * (reward(s,a) + max(Q(s') - Q(s,a)) oldv = self.q.get((state, action), None) if oldv is None: self.q[(state, action)] = reward else: self.q[(state, action)] = oldv + self.alpha * (value - oldv) def chooseAction(self, state): q = [self.getQ(state, a) for a in self.actions] maxQ = max(q) if random.random() < self.epsilon: minQ = min(q); mag = max(abs(minQ), abs(maxQ)) # add random values to all the actions, recalculate maxQ q = [q[i] + random.random() * mag - .5 * mag for i in range(len(self.actions))] maxQ = max(q) count = q.count(maxQ) # In case there're several state-action max values # we select a random one among them if count > 1: best = [i for i in range(len(self.actions)) if q[i] == maxQ] i = random.choice(best) else: i = q.index(maxQ) action = self.actions[i] return action def learn(self, state1, action1, reward, state2): maxqnew = max([self.getQ(state2, a) for a in self.actions]) self.learnQ(state1, action1, reward, reward + self.gamma*maxqnew) def build_state(features): return int("".join(map(lambda feature: str(int(feature)), features))) def to_bin(value, bins): return np.digitize(x=[value], bins=bins)[0] ################################################## Training Phase ################################################## env = gym.make('CartPole-v0') MAX_EPISODE = 3100 MAX_STEP = 200 n_bins_cart_pos = 14 n_bin_cart_vel = 12 n_bins_angle = 10 n_bins_angle_vel = n_bins_angle cart_position_save = {} pole_angle_save = {} control_signal_save = {} number_of_features = env.observation_space.shape[0] # Number of states is huge so in order to simplify the situation # we discretize the space to: 10 ** number_of_features cart_position_bins = pandas.cut([-2.4, 2.4], bins=n_bins_cart_pos, retbins=True)[1][1:-1] cart_velocity_bins = pandas.cut([-1, 1], bins=n_bin_cart_vel, retbins=True)[1][1:-1] pole_angle_bins = pandas.cut([-2, 2], bins=n_bins_angle, retbins=True)[1][1:-1] angle_rate_bins = pandas.cut([-3.5, 3.5], bins=n_bins_angle, retbins=True)[1][1:-1] # The Q-learn algorithm qlearn = QLearn(actions=range(env.action_space.n), alpha=0.5, gamma=0.90, epsilon=0.2) def reward_func_single(state) : rew_coeff_x = 1 rew_coeff_xdot = 3 rew_coeff_theta = 1 rew_coeff_thetadot = 1 # print(state[0],state[1],state[2],state[3]) error_x = rew_coeff_x*np.abs(state[0]) error_xdot = rew_coeff_xdot*np.abs(pow(state[1],2)) error_theta = rew_coeff_theta*np.abs(state[2]) error_thetadot = rew_coeff_thetadot*np.abs( pow(state[3],2)) error=[] error.append(error_x) error.append(error_xdot) error.append(error_theta) error.append(error_thetadot) max_e = max(error) min_e = min(error) dif = max_e - min_e for x in range(len(error)): error[x] = (error[x] - min_e)/(dif) return sum(error) # error_all = error_x+error_xdot+error_theta+error_thetadot # return error_all def avg(lst): return sum(lst) / len(lst) for i_episode in range(MAX_EPISODE): observation = env.reset() # x,x_dot,theta,theta_dot cart_position,cart_velocity, pole_angle, angle_rate_of_change = observation state = build_state([to_bin(cart_position, cart_position_bins), to_bin(cart_velocity, cart_velocity_bins), to_bin(pole_angle, pole_angle_bins), to_bin(angle_rate_of_change, angle_rate_bins)]) local_cart_position = [] local_pole_angle = [] local_control_signal = [] for t in range(MAX_STEP): if( i_episode>MAX_EPISODE*0.95) : env.render() # Pick an action based on the current state action = qlearn.chooseAction(state) cs = 0 if action==0 : cs = -10 else : cs = 10 # Execute the action and get feedback observation, reward, done, info = env.step(action) # Digitize the observation to get a state cart_position,cart_velocity, pole_angle, angle_rate_of_change = observation local_cart_position.append(cart_position) local_pole_angle.append(pole_angle) local_control_signal.append(cs) # print(reward_func_single( observation) ) rewcard = reward_func_single(observation) nextState = build_state([to_bin(cart_position, cart_position_bins), to_bin(cart_velocity, cart_velocity_bins), to_bin(pole_angle, pole_angle_bins), to_bin(angle_rate_of_change, angle_rate_bins)]) if not(done): qlearn.learn(state, action, reward, nextState) qlearn.epsilon = qlearn.epsilon * 0.999 # added epsilon decay state = nextState else: reward = -200 qlearn.learn(state, action, reward, nextState) qlearn.epsilon = qlearn.epsilon * 0.999 # added epsilon decay break print("Episode : #{0} was #{1} steps.".format(i_episode,t)) # Calculate mean cart position and pole angle for the episode cart_position_save[i_episode] = avg(local_cart_position) pole_angle_save[i_episode] = avg(local_pole_angle) control_signal_save[i_episode] = avg(local_control_signal) print("Length of State-Space : ",len(qlearn.q)) # time = np.linspace(0,MAX_EPISODE,MAX_EPISODE) position_vals = list(cart_position_save.values()) angle_vals = list(pole_angle_save.values()) control_vals = list(control_signal_save.values()) # Saving Position, Angular Position and Control Signal Values # And plotting later in 'q_learn_inference_bin.py' np.save('CartPosByTime.npy',position_vals) np.save('AngularPosByTime.npy',angle_vals) np.save('ControlSignalByTime.npy',control_vals) np.save("policy_bin",qlearn.q)
''' A Mongo-based server for use with dojox.data.JsonRestStore. :copyright: <NAME> 2010 :license: BSD ''' import tornado.httpserver import tornado.ioloop import tornado.web from tornado.web import HTTPError import pymongo import bson.json_util try: import pymongo.objectid except ImportError: pass import mongo_util import os import json import re import string import random import urllib import optparse import logging import time import access import myLogging from sanity import sanitize JSRE = re.compile(r'^/(.*)/([igm]*)$') DojoGlob = re.compile(r'[?*]') CheckSanity = True def TranslateQuery(obj): '''Hack to translate the json coded object into a mongo query''' # some validation might be done in here as well if type(obj) == dict: # translate all elements of a dictionary for key, val in obj.iteritems(): obj[key] = TranslateQuery(val) return obj elif type(obj) == list: # translate all elements of a list, I don't think this happens but doesn't cost much for i, val in enumerate(obj): obj[i] = TranslateQuery(val) return obj elif type(obj) == unicode: # check a string to see if it might be a regular expression m = JSRE.match(obj) if m: flags = 0 for letter in m.group(2): flags |= {'m': re.M, 'g': re.G, 'i': re.I}[letter] try: obj = re.compile(m.group(1), flags) except re.error: raise HTTPError(400, 'bad query') # check for globbing in the string elif DojoGlob.search(obj): # protect python re special characters q = re.sub(r'([][.+(){}|^\\])', r'\\\1', obj) # convert * to .* and ? to .? q = re.sub(r'([*?])', r'.\1', q) # anchor it q = '^' + q + '$' # try to compile it try: obj = re.compile(q) except re.error: pass # just pass the original string along if it won't compile return obj else: # pass anything else on return obj def RestrictQuery(query): restricted = {} for key, value in query.iteritems(): if key.startswith('$'): continue if type(value) in [unicode, int, float]: restricted[key] = value return restricted def doQuery(item, spec): '''simulate a mongo query on the collection names''' if not spec: return True if type(spec) == dict: for key, value in spec.iteritems(): if key not in item: return False if value == item[key] or hasattr(value, 'search') and value.search(unicode(item[key])): continue else: return False return True # handle requests with only a db name class DatabaseHandler(access.BaseHandler): def get(self, mode, db_name, collection_name): '''Handle queries for collection names''' if collection_name: raise HTTPError(400, 'db does not exist') if not self.checkAccessKey(db_name, '*', access.Read): raise HTTPError(403, 'listing not permitted (%s)' % self.checkAccessKeyMessage) db = self.mongo_conn[db_name] names = db.collection_names() result = [{"_id": name} for name in names if name != 'system.indexes'] # handle query parameters spec = {} if 'mq' in self.request.arguments: q = self.request.arguments['mq'][0] # remove url quoting q = urllib.unquote(q) # convert from json try: q = json.loads(q) except ValueError, e: raise HTTPError(400, unicode(e)) # convert to format expected by mongo spec = TranslateQuery(q) # simulate what mongo would do to select the names... result = [item for item in result if doQuery(item, spec)] # see how much we are to send Nitems = len(result) r = re.compile(r'items=(\d+)-(\d+)').match(self.request.headers.get('Range', '')) if r: start = int(r.group(1)) stop = int(r.group(2)) else: start = 0 stop = Nitems result = result[start:stop + 1] # send the result self.set_header('Content-Range', 'items %d-%d/%d' % (start, stop, Nitems)) s = json.dumps(result, default=bson.json_util.default) s = s.replace('"_ref":', '"$ref":') # restore $ref self.set_header('Content-Length', len(s)) self.set_header('Content-Type', 'text/javascript') self.write(s) def delete(self, mode, db_name, collection_name): '''Drop the collection''' if not self.checkAccessKey(db_name, '*', access.Delete): raise HTTPError(403, 'drop collection not permitted (%s)' % self.checkAccessKeyMessage) self.mongo_conn[db_name].drop_collection(collection_name) # handle requests without an id class CollectionHandler(access.BaseHandler): @tornado.web.asynchronous def get(self, mode, db_name, collection_name): '''Handle queries''' readMode = self.checkAccessKey(db_name, collection_name, access.Read) restrict = readMode == access.RestrictedRead if not readMode: raise HTTPError(403, 'read not permitted (%s)' % self.checkAccessKeyMessage) collection = self.mongo_conn[db_name][collection_name] # check for a query findSpec = {} if 'mq' in self.request.arguments: q = self.request.arguments['mq'][0] # pass an arbitrary query into mongo, the query is json encoded and # then url quoted # remove url quoting q = urllib.unquote(q) # convert from json try: q = json.loads(q) except ValueError, e: raise HTTPError(400, unicode(e)) # convert to format expected by mongo findSpec = TranslateQuery(q) if restrict: findSpec = RestrictQuery(findSpec) # check for a sorting request sortSpec = [] if not restrict and 'ms' in self.request.arguments: for s in self.request.arguments['ms'][0].split(','): sortSpec.append((s[1:], {'+': pymongo.ASCENDING, '-': pymongo.DESCENDING}[s[0]])) # see how much we are to send r = re.compile(r'items=(\d+)-(\d+)').match(self.request.headers.get('Range', '')) if not restrict and r: start = int(r.group(1)) stop = int(r.group(2)) else: start = 0 stop = None # hand off to the worker thread to do the possibly slow db access self.run_async(self._callback, self._worker, collection, findSpec, sortSpec, start, stop, restrict) def _worker(self, collection, findSpec, sortSpec, start, stop, restrict): '''Do just the db query in a thread, the hand off to the callback to write the results''' cursor = collection.find(findSpec) if sortSpec: cursor = cursor.sort(sortSpec) Nitems = cursor.count() if stop is None: stop = Nitems - 1 else: stop = min(stop, Nitems - 1) cursor = cursor.skip(start).limit(stop - start + 1) if restrict and Nitems > 1: rows = [] start = 0 stop = 0 Nitems = 0 else: rows = list(cursor) return (rows, start, stop, Nitems) def _callback(self, result, *args): '''Report the async worker's results''' rows, start, stop, Nitems = result # send the result self.set_header('Content-Range', 'items %d-%d/%d' % (start, stop, Nitems)) s = json.dumps(rows, default=bson.json_util.default) s = s.replace('"_ref":', '"$ref":') # restore $ref self.set_header('Content-Length', len(s)) self.set_header('Content-Type', 'text/javascript') self.write(s) self.finish() def post(self, mode, db_name, collection_name): '''Create a new item and return the single item not an array''' if not self.checkAccessKey(db_name, collection_name, access.Create): raise HTTPError(403, 'create not permitted (%s)' % self.checkAccessKeyMessage) collection = self.mongo_conn[db_name][collection_name] try: s = self.request.body s = s.replace('"$ref":', '"_ref":') # hide $ref item = json.loads(s, object_hook=bson.json_util.object_hook) except ValueError, e: raise HTTPError(400, unicode(e)) # validate the schema self.validateSchema(db_name, collection_name, item) if CheckSanity: try: sanitize(item) except ValueError: raise HTTPError(400, 'HTML field parse failed') # add meta items outside schema id = mongo_util.newId() item['_id'] = id item[access.OwnerKey] = self.getUserId() collection.insert(item, safe=True) # this path should get encoded only one place, fix this self.set_header('Location', '/data/%s-%s/%s/%s' % (mode, db_name, collection_name, id)) s = json.dumps(item, default=bson.json_util.default) s = s.replace('"_ref":', '"$ref":') # restore $ref self.set_header('Content-Length', len(s)) self.set_header('Content-Type', 'text/javascript') self.write(s) # handle requests with an id class ItemHandler(access.BaseHandler): def get(self, mode, db_name, collection_name, id): '''Handle requests for single items''' if not self.checkAccessKey(db_name, collection_name, access.Read): raise HTTPError(403, 'read not permitted (%s)' % self.checkAccessKeyMessage) collection = self.mongo_conn[db_name][collection_name] # restrict fields here item = collection.find_one(id) s = json.dumps(item, default=bson.json_util.default) s = s.replace('"_ref":', '"$ref":') # restore $ref self.set_header('Content-Length', len(s)) self.set_header('Content-Type', 'text/javascript') self.write(s) def put(self, mode, db_name, collection_name, id): '''update an item after an edit, no response?''' if not self.checkAccessKey(db_name, collection_name, access.Update): raise HTTPError(403, 'update not permitted (%s)' % self.checkAccessKeyMessage) collection = self.mongo_conn[db_name][collection_name] try: s = self.request.body s = s.replace('"$ref":', '"_ref":') # restore $ref new_item = json.loads(s, object_hook=bson.json_util.object_hook) except ValueError, e: raise HTTPError(400, unicode(e)) # remove meta items that are not in schema new_item.pop('_id', '') new_item.pop(access.OwnerKey, '') # validate schema self.validateSchema(db_name, collection_name, new_item) if CheckSanity: try: sanitize(new_item) except ValueError: raise HTTPError(400, 'html string parse failed') # insert meta info new_item['_id'] = id # check old item old_item = collection.find_one({'_id': id}, fields=[access.OwnerKey]) if not old_item: raise HTTPError(403, 'update not permitted (does not exist)') owner = old_item.get(access.OwnerKey, None) if not owner or access.Override & self.allowedMode or owner == self.getUserId(): new_item[access.OwnerKey] = owner else: raise HTTPError(403, 'update not permitted (not owner)') collection.update({'_id': id}, new_item, upsert=False, safe=True) def delete(self, mode, db_name, collection_name, id): '''Delete an item, what should I return?''' if not self.checkAccessKey(db_name, collection_name, access.Delete): raise HTTPError(403, 'delete item not permitted (%s)' % self.checkAccessKeyMessage) collection = self.mongo_conn[db_name][collection_name] if not access.Override & self.allowedMode: old_item = collection.find_one({'_id': id}, fields=[access.OwnerKey]) if not old_item: raise HTTPError(403, 'delete item does not exist') owner = old_item.get(access.OwnerKey, None) if owner and owner != self.getUserId(): raise HTTPError(403, 'delete not permitted (not owner)') collection.remove({'_id': id}, safe=True) class TestHandler(access.BaseHandler): def get(self, flag): if flag == 'reset': db = self.mongo_conn['test'] db.drop_collection('test') collection = db['test'] for value, word in enumerate(['foo', 'bar', 'fee', 'baa', 'baa', 'bar']): collection.insert({ 'word': word, 'value': value, '_id': mongo_util.newId(), access.OwnerKey: self.getUserId()}, safe=True) collection.insert({ 'word': 'another', 'value': 42, '_id': mongo_util.newId(), access.OwnerKey: 'some.one@else'}, safe=True) self.write('ok') elif re.match(r'\d+', flag): code = int(flag) raise HTTPError(code) class WarningHandler(access.BaseHandler): def post(self): msg = self.request.body logging.warning(msg) s = 'ok' self.set_header('Content-Length', len(s)) self.set_header('Content-Type', 'text/plain') self.write(s) def generate_secret(seed): '''Generate the secret string for hmac''' try: return file('secret', 'rb').read() except IOError: logging.warning('generating secret from seed') random.seed(seed) return ''.join(random.choice(string.letters + string.digits + string.punctuation) for i in range(100)) def run(port=8888, threads=4, debug=False, static=False, pid=None, mongo_host='127.0.0.1', mongo_port=27017, seed=0): if pid is not None: # launch as a daemon and write the pid file import daemon daemon.daemonize(pid) # retry making the mongo connection with exponential backoff for i in range(8): try: conn = pymongo.Connection(mongo_host, mongo_port) break except pymongo.errors.AutoReconnect: t = 2 ** i logging.warning('backoff on python connection %d' % t) time.sleep(t) else: raise pymongo.errors.AutoReconnect google_secrets = { "key": os.environ['GOOGLE_OAUTH_KEY'], "secret": os.environ['GOOGLE_OAUTH_SECRET'], "redirect": os.environ['GOOGLE_OAUTH_REDIRECT'] } kwargs = { 'cookie_secret': generate_secret(seed), 'debug': debug, 'thread_count': threads, 'mongo_conn': conn, 'google_oauth': google_secrets } if static: kwargs['static_path'] = os.path.join(os.path.dirname(__file__), "../") application = mongo_util.MongoApplication([ (r"/data/([a-zA-Z]*)-([a-zA-Z][a-zA-Z0-9]*)/([a-zA-Z][a-zA-Z0-9]*)?$", DatabaseHandler), (r"/data/([a-zA-Z]*)-([a-zA-Z][a-zA-Z0-9]*)/([a-zA-Z][a-zA-Z0-9]*)/$", CollectionHandler), (r"/data/([a-zA-Z]*)-([a-zA-Z][a-zA-Z0-9]*)/([a-zA-Z][a-zA-Z0-9]*)/([a-f0-9]+)", ItemHandler), (r"/data/_auth(.*)$", access.AuthHandler), (r"/data/_test_(reset|\d+)$", TestHandler), (r"/data/_warning$", WarningHandler), ], **kwargs) http_server = tornado.httpserver.HTTPServer(application) http_server.listen(port) tornado.ioloop.IOLoop.instance().start() def generate_sample_data(n, host, port): import string import random docs = [{'label': ''.join(random.sample(string.lowercase, random.randint(2, 9))), 'value': i * 1.1 + 0.01, '_id': mongo_util.newId()} for i in range(n)] for doc in docs: doc['length'] = len(doc['label']) doc['letters'] = sorted(list(doc['label'])) connection = pymongo.Connection(host, port) db = connection.test db.drop_collection('posts') db.posts.insert(docs) return n, 'test', 'posts' def run_from_args(): ''' Runs an instance of the torongo server with options pulled from the command line. ''' parser = optparse.OptionParser() parser.add_option("-p", "--port", dest="port", default=8888, help="server port number (default=8888)", type="int") parser.add_option("--mongoport", dest="mongoport", default=27017, help="mongo server port number (default=27201)", type="int") parser.add_option("--mongohost", dest="mongohost", default='127.0.0.1', help="mongo server host name (default=127.0.0.1)") parser.add_option("-w", "--workers", dest="workers", default=4, help="size of the worker pool (default=4)", type="int") parser.add_option("-g", "--generate", dest="generate", default=0, help="generate N random items in a db collection for testing (default=0)", type="int") parser.add_option("--logId", dest="logId", default='', type="str", help="identity in syslog (default log to stderr)") parser.add_option("--logLevel", dest="logLevel", default="warning", type="str", help="logging level (info|debug|warning|error)") parser.add_option("--debug", dest="debug", action="store_true", default=False, help="enable Tornado debug mode w/ automatic loading (default=false)") parser.add_option("--static", dest="static", action="store_true", default=False, help="enable Tornado sharing of the jsonic root folder (default=false)") parser.add_option("--pid", dest="pid", default=None, type="str", help="launch as a daemon and write to the given pid file (default=None)") parser.add_option("--seed", dest="seed", default=0, type="int", help="seed for the random number generator") parser.add_option("--noSanity", dest="noSanity", action="store_true", default=False, help="disable sanity checking for BigWords") (options, args) = parser.parse_args() if options.generate: generate_sample_data(options.generate, options.mongohost, options.mongoport) #print 'Generated %d random items in db: %s, collection: %s' % vals # initialize logging if options.logId: id = '%s:%d' % (options.logId, os.getpid()) myLogging.init(id, options.logLevel) logging.warning('startup') if options.noSanity: global CheckSanity CheckSanity = False # run the server run(options.port, options.workers, options.debug, options.static, options.pid, options.mongohost, options.mongoport, options.seed) if __name__ == "__main__": run_from_args()
async def update_page(self, message: discord.Message) -> None: embed = await self.get_page() await message.edit(embed=embed)
/** see: commissioner_argcargv.hpp, constructor for the commissioner argc/argv parser */ ArgcArgv::ArgcArgv(int argc, char **argv) { mARGC = argc; mARGV = argv; mARGx = 1; memset(&(mOpts[0]), 0, sizeof(mOpts)); }
<gh_stars>0 // Package krakend registers a bloomfilter given a config and registers the service with consul. package krakend import ( "context" "encoding/json" "errors" "github.com/devopsfaith/krakend/config" "github.com/devopsfaith/krakend/logging" "github.com/devopsfaith/bloomfilter" bf_rpc "github.com/devopsfaith/bloomfilter/rpc" "github.com/devopsfaith/bloomfilter/rpc/server" ) // Namespace for bloomfilter const Namespace = "github_com/devopsfaith/bloomfilter" var ( errNoConfig = errors.New("no config for the bloomfilter") errWrongConfig = errors.New("invalid config for the bloomfilter") ) // Register registers a bloomfilter given a config and registers the service with consul func Register( ctx context.Context, serviceName string, cfg config.ServiceConfig, logger logging.Logger, register func(n string, p int)) (bloomfilter.Bloomfilter, error) { data, ok := cfg.ExtraConfig[Namespace] if !ok { logger.Info(errNoConfig.Error(), cfg.ExtraConfig) return new(bloomfilter.EmptySet), errNoConfig } raw, err := json.Marshal(data) if err != nil { logger.Info(errWrongConfig.Error(), cfg.ExtraConfig) return new(bloomfilter.EmptySet), errWrongConfig } var rpcConfig bf_rpc.Config if err := json.Unmarshal(raw, &rpcConfig); err != nil { logger.Info(err.Error(), string(raw)) return new(bloomfilter.EmptySet), err } bf := server.New(ctx, rpcConfig) register(serviceName, rpcConfig.Port) return bf.Bloomfilter(), nil }
<reponame>hmtool/parent<filename>hmtool-core/src/main/java/tech/mhuang/core/exception/ExceptionUtil.java package tech.mhuang.core.exception; import tech.mhuang.core.util.ObjectUtil; /** * 异常工具类 * * @author mhuang * @since 1.0.0 */ public class ExceptionUtil { /** * 获得完整消息,包括异常名 * * @param e 异常 * @return 完整消息 */ public static String getMessage(Throwable e) { if (ObjectUtil.isEmpty(e)) { return null; } return String.format("%s:%s", e.getClass().getSimpleName(), e.getMessage()); } }
/** * Opens the given input stream in which the XML file has to be read. * It skips the beginning of the document with XML definition and a number of container tags * (putting 1 as {@code skipDepth} corresponds to only skip the root element). * If an input stream is already open, it closes it before opening the new one. * * @param inputStream The input stream in which read the XML elements * @param skipDepth The number of container to skip before reaching the stream of desired elements * @throws XMLStreamException if an error was encountered while creating the reader or while skipping tags */ public synchronized void open(InputStream inputStream, int skipDepth) throws XMLStreamException { if (xmlReader != null) { close(); } XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(IS_SUPPORTING_EXTERNAL_ENTITIES, false); factory.setProperty(SUPPORT_DTD, false); xmlReader = factory.createXMLStreamReader(inputStream); skipDocumentStart(skipDepth); }
/** * Tests information about local variables. * * @author Maros Sandor, Jan Jancura */ public class LocalVariablesTest extends NbTestCase { private JPDASupport support; private DebuggerManager dm = DebuggerManager.getDebuggerManager (); private static final String CLASS_NAME = "org.netbeans.api.debugger.jpda.testapps.LocalVariablesApp"; public LocalVariablesTest(String s) { super(s); } public static Test suite() { return JPDASupport.createTestSuite(LocalVariablesTest.class); } public void testWatches () throws Exception { try { Utils.BreakPositions bp = Utils.getBreakPositions(System.getProperty ("test.dir.src") + "org/netbeans/api/debugger/jpda/testapps/LocalVariablesApp.java"); LineBreakpoint lb = bp.getLineBreakpoints().get(0); dm.addBreakpoint (lb); support = JPDASupport.attach (CLASS_NAME); support.waitState (JPDADebugger.STATE_STOPPED); // breakpoint hit CallStackFrame sf = support.getDebugger ().getCurrentCallStackFrame (); assertEquals ( "Debugger stopped at wrong line", lb.getLineNumber (), sf.getLineNumber (null) ); LocalVariable [] vars = sf.getLocalVariables (); assertEquals ( "Wrong number of local variables", 4, vars.length ); Arrays.sort (vars, new Comparator () { public int compare (Object o1, Object o2) { return ((LocalVariable) o1).getName ().compareTo ( ((LocalVariable) o2).getName () ); } }); assertEquals ( "Wrong info about local variables", "g", vars [0].getName () ); assertEquals ( "Wrong info about local variables", "20", vars [0].getValue () ); assertEquals ( "Wrong info about local variables", "int", vars [0].getDeclaredType () ); assertEquals ( "Wrong info about local variables", "int", vars [0].getType () ); assertEquals ( "Wrong info about local variables", CLASS_NAME, vars [0].getClassName () ); assertEquals ( "Wrong info about local variables", "s", vars [1].getName () ); assertEquals ( "Wrong info about local variables", "\"asdfghjkl\"", vars [1].getValue () ); assertEquals ( "Wrong info about local variables", "java.lang.Object", vars [1].getDeclaredType () ); assertEquals ( "Wrong info about local variables", "java.lang.String", vars [1].getType () ); assertEquals ( "Wrong info about local variables", CLASS_NAME, vars [1].getClassName () ); assertEquals ( "Wrong info about local variables", "x", vars [2].getName () ); assertEquals ( "Wrong info about local variables", "40", vars [2].getValue () ); assertEquals ( "Wrong info about local variables", "int", vars [2].getDeclaredType () ); assertEquals ( "Wrong info about local variables", "int", vars [2].getType () ); assertEquals ( "Wrong info about local variables", CLASS_NAME, vars [2].getClassName () ); assertEquals ( "Wrong info about local variables", "y", vars [3].getName () ); assertEquals ( "Wrong info about local variables", "50.5", vars [3].getValue () ); assertEquals ( "Wrong info about local variables", "float", vars [3].getDeclaredType () ); assertEquals ( "Wrong info about local variables", "float", vars [3].getType () ); assertEquals ( "Wrong info about local variables", CLASS_NAME, vars [3].getClassName () ); support.stepOver (); support.stepOver (); sf = support.getDebugger ().getCurrentCallStackFrame (); vars = sf.getLocalVariables (); assertEquals ("Wrong number of local variables", 4, vars.length); Arrays.sort (vars, new Comparator () { public int compare (Object o1, Object o2) { return ((LocalVariable) o1).getName ().compareTo ( ((LocalVariable) o2).getName () ); } }); assertEquals ( "Wrong info about local variables", "g", vars [0].getName () ); assertEquals ( "Wrong info about local variables", "\"ad\"", vars [0].getValue () ); assertEquals ( "Wrong info about local variables", "java.lang.CharSequence", vars [0].getDeclaredType () ); assertEquals ( "Wrong info about local variables", "java.lang.String", vars [0].getType () ); assertEquals ( "Wrong info about local variables", CLASS_NAME, vars [0].getClassName () ); } finally { support.doFinish (); } } }
Remarriage in old age. Although an increasing number of elders in the United States are remarrying, remarriage has been among the least researched and least known alternatives in old age. This paper explores some social, situational and personal factors associated with remarriage in old age, and focuses on role changes associated with remarriage. The findings were obtained through in-depth interviews with twenty-four remarried elderly couples. Remarriage is seen as a viable option in old age, deserving of attention and encouragement from older people themselves, people who work with the elderly, and social planners.
<gh_stars>1-10 /*======================================================================== VES --- VTK OpenGL ES Rendering Toolkit http://www.kitware.com/ves Copyright 2011 Kitware, Inc. 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. ========================================================================*/ /// \class vesTransformNode /// \ingroup ves /// \brief Group node that defines coordinate space of child nodes /// /// vesTransformNode is a group node that provides interface for affine /// transformations. /// \see vesNode vesGroupNode #ifndef __VESTRANSFORMNODE_H #define __VESTRANSFORMNODE_H #include "vesGroupNode.h" // VES includes #include "vesSetGet.h" class vesTransformNode : public vesGroupNode { public: vesTypeMacro(vesTransformNode); enum ReferenceFrame { Relative = 0, Absolute = 1 }; vesTransformNode(); virtual ~vesTransformNode(); /// Set center of transformations void setCenter(const vesVector3f &center); /// Get center of transformations const vesVector3f& center() const; /// Set rotation as described by angle and axis /// ( angle, axis(x, y, z) ) void setRotation(const vesVector4f &rotation); /// Get rotation as described by angle and axis /// ( angle, axis(x, y, z) ) const vesVector4f& rotation() const; /// Set scale in x, y and z directions void setScale(const vesVector3f &scale); /// Get scale in x, y and z directions const vesVector3f& scale() const; /// Set scale orientation (rotation) defined by angle and axis /// ( angle, axis(x, y, z) ) void setScaleOrientation(const vesVector4f &scaleOrientation); /// Get scale orientation (rotation) defined by angle and axis /// ( angle, axis(x, y, z) ) const vesVector4f& scaleOrientation() const; /// Set translation in x, y and z directions void setTranslation(const vesVector3f &translation); /// Get translation in x, y and z directions const vesVector3f& translation() const; /// Set reference frame for the transformations. Possible values /// are Absolute and Relative. bool setReferenceFrame(ReferenceFrame referenceFrame); /// Get reference frame for the transformations. Possible values /// are Absolute and Relative. ReferenceFrame referenceFrame() const; /// Return affine transformation matrix vesMatrix4x4f matrix(); /// \copydoc vesNode::asTransformNode() virtual vesTransformNode* asTransformNode() { return this; } virtual const vesTransformNode* asTransformNode() const { return this; } /// \copydoc vesNode::accept(vesVisitor&) virtual void accept(vesVisitor &visitor); /// Compute local to world matrix transformation virtual bool computeLocalToWorldMatrix(vesMatrix4x4f& matrix, vesVisitor& visitor); /// Compute world to local matrix transformation virtual bool computeWorldToLocalMatrix(vesMatrix4x4f& matrix, vesVisitor& visitor); protected: void updateBounds(vesNode &child); void setInternals(); vesMatrix4x4f computeTransform(); vesVector3f m_center; vesVector4f m_rotation; vesVector3f m_scale; vesVector4f m_scaleOrientation; vesVector3f m_translation; ReferenceFrame m_referenceFrame; private: class vesInternal; vesInternal *m_internal; }; #endif // __VESTRANSFORMNODE_H
Farai Chinomwe is one of the world’s most surprising marathon runners. His unusual running technique certainly brings him attention with loud shouts of “Hey Rasta Man!”, jeers and whistles as he runs past. Farai has run a number of short marathons and fun runs backwards but it was only when he ran the 56km two oceans marathon in 2015, backwards, that Farai noticed that he was being noticed. It’s difficult to not notice someone doing something very different. Before the race, Farai made a call to the race organisers “Can the marathon be run backwards?”he asked. The reply came “I never heard of such a thing. Why would anyone want to?”. Farai immediately saw this as a challenge and successfully completed the Two Oceans in 6h10m, passing many people who were “running the normal way”. Farai’s inspiration to start backward running came, like many inspirations come, through unexpected circumstances. In his own words “It was one o’clock in the morning and I was driving on a very dark Corlett drive on the outskirts of Alexandra in my battered old Peugeot 404. I had collected a swarm of bees from a client and they were buzzing angrily in the boot. Suddenly, the car simply sputtered and stalled and there I was in the cold and dark without any prospect of help. I realised I’d have to push the car, which was quite heavy, to the top of the hill where I could at least coast the few km back home. I started pushing the car the normal way and immediately realised that I wouldn’t be able to make it. I turned around with my back to the car boot and realised it could push it far easier. Eventually, after 2 hours of pushing and coasting and steering, I got back home, transferred the bees to their new home and finally got to sleep. Next morning on waking, I noticed that my quads felt like they got the most amazing workover and at that moment, I suddenly realised that the bees had helped me discover a really useful training technique.” This year, Farai intends to run the comrades marathon backwards becoming the fi rst Rastafarian master beekeeper to do so. While running backwards won’t win the comrades, it does help build strength, endurance and balance improving performance when you run ‘the normal way’. It also has it’s challenges, like neckache. Farai previously completed the comrades in 2013 8hr03m and in 2014 7hrs06m running the traditional way. In 2015 he will be attempting to run the Comrades Marathon backwards in 10hr30m. Farai’s running club is Manoni. Farai is a dedicated beekeeper and because it was through the bees that he learned backward running, he’s decided to run some of his marathons backwards to raise awareness about the importance of bees in the environment. All funds raised will be used to establish managed urban hives and training opportunities for the disadvantaged through Farai’s business, Blessed Bee Africa. https://www.facebook.com/blessedbeeafrica This article is free to use – further information [email protected] EPILOGUE: On 31st May 2015, Farai completed the comrades marathon, running backwards all the way, 11hours31min and has become the first Rastafarian Master Beekeeper to do so. Farai received a Vic Caplan medal for completing within 12 hours. Farai’s facebook page is https://www.facebook.com/chinomwefarai Farai’s Story: in his own words I was born and brought up in a rural area near the Great Zimbabwe Ruins surrounded by insects and nature in a musical family – in our village, everyone had some instrument to play. In 2000, I moved to Johannesburg to study and ended up playing drum and Mbira in a band – we’d perform at restaurants and other events and when I wasn’t playing, I would do running and fitness training. One day I went to the shed to collect my instruments for a performance when I discovered that a swarm of bees had moved into my favourite djembe. Everyone told me I should burn the bees out but I decided to rather find a way to remove them safely. It was only after a year that I had developed sufficient means and confidence to provide a new home to the swarm. They had literally transformed the drum into a giant honeycomb – this was the point where I became a beekeeper. I have been working as a professional beekeeper in Johannesburg for 5 years and my goal is to develop a space to train and develop people to learn about, care for and manage bees. My research has led me to discover many unusual applications for bee products. When I’m not working with the bees, I do running training every day and run marathons. I’m pioneering the concept of backward running in South Africa and run a monthly backward running clinic in Johannesburg. I have 13 active urban hives that I tend – I would like to get many more – my company is Blessed Bee Africa https://www.facebook.com/blessedbeeafrica . I’m studying business management part-time and hope to develop many people to Love and care for bees in the future. Hits: 2779
// HeaderFactory.java // $Id$ /***************************************************************************** * The contents of this file are subject to the Ricoh Source Code Public * License Version 1.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.risource.org/RPL * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * This code was initially developed by Ricoh Silicon Valley, Inc. Portions * created by Ricoh Silicon Valley, Inc. are Copyright (C) 1995-1999. All * Rights Reserved. * * Contributor(s): * ***************************************************************************** */ package crc.pia; import java.io.InputStream; import java.io.BufferedInputStream; import java.io.FileInputStream; import crc.pia.Headers; import crc.pia.Pia; import w3c.www.mime.MimeParserFactory; import w3c.www.mime.MimeParser; import w3c.www.http.HttpEntityMessage; import w3c.www.http.MimeParserMessageFactory; /** HeaderFactory * creates an appropriate header object from a HTTP stream */ public class HeaderFactory { /** * creates a new headers object */ public HeaderFactory() { } /** * Creates a blank header. */ public Headers createHeader(){ Headers headers = new Headers(); return headers; } /** create a header object from the given stream */ public Headers createHeader(InputStream input) { // Create the factory: MimeParserFactory f = null; f = (MimeParserFactory) new MimeParserMessageFactory(); try{ MimeParser p = new MimeParser(input, f); Pia.debug(this, "Parsing header...\n\n"); HttpEntityMessage jigsawHeaders = (HttpEntityMessage) p.parse(); Headers headers = new Headers( jigsawHeaders ); Pia.debug(this, "Header is done\n"); return headers; }catch(Exception ex){ ex.printStackTrace(); return null; } } }
# AUTOGENERATED! DO NOT EDIT! File to edit: lambdasdk.ipynb (unless otherwise specified). __all__ = ['InvocationType', 'Lambda'] # Cell from dataclasses import dataclass from dataclasses_json import dataclass_json @dataclass_json @dataclass class InvocationType: requestResponse = 'RequestResponse' event = 'Event' # Cell import boto3, base64, json class Lambda: ''' for invoking lambda functions ''' def __init__(self, user=None, pw=None, sessionToken=None, region = 'ap-southeast-1'): self.lambdaClient = boto3.client( 'lambda', aws_access_key_id=user, aws_secret_access_key=pw, region_name = region, aws_session_token=sessionToken ) def invoke(self, functionName, input, invocationType= 'RequestResponse'): response = self.lambdaClient.invoke( FunctionName = functionName, InvocationType= invocationType, LogType='Tail', ClientContext= base64.b64encode(json.dumps({'caller': 'sdk'}).encode()).decode(), Payload= json.dumps(input) ) if invocationType == 'Event': return True return json.loads(response['Payload'].read())
/** * To find the ICAT SOAP web service irrespective of the container in use. It * does this by trial and error. */ public class ICATGetter { private static String[] suffices = new String[] { "ICATService/ICAT?wsdl", "icat/ICAT?wsdl" }; /** * Provide access to an ICAT SOAP web service with the basic URL string * provided. This exists to hide the differences between containers. * * @param urlString * the url of the machine to be contacted. If the url has a * non-empty file part it is used unchanged, otherwise suffices * are tried suitable for Glassfish and WildFly. * * @return an ICAT * * @throws IcatException_Exception * if something is wrong */ public static ICAT getService(String urlString) throws IcatException_Exception { if (urlString == null) { throwSessionException("Argument to constructor must not be null"); } boolean emptyFile = false; try { emptyFile = new URL(urlString).getFile().isEmpty(); } catch (MalformedURLException e) { throwSessionException("Invalid URL: " + urlString); } ICAT icatService; if (emptyFile) { for (String suffix : suffices) { String icatUrlWsdl = urlString + "/" + suffix; try { icatService = new ICATService(new URL(icatUrlWsdl)).getICATPort(); icatService.getApiVersion(); return icatService; } catch (MalformedURLException e) { throwSessionException("Invalid URL"); } catch (WebServiceException e) { Throwable cause = e.getCause(); if (cause != null && cause.getMessage().contains("security")) { throwSessionException(cause.getMessage()); } } catch (Exception e) { throwSessionException(e.getMessage()); } } } else { try { icatService = new ICATService(new URL(urlString)).getICATPort(); icatService.getApiVersion(); return icatService; } catch (MalformedURLException e) { throwSessionException("Invalid URL: " + urlString); } catch (WebServiceException e) { Throwable cause = e.getCause(); if (cause != null && cause.getMessage().contains("security")) { throwSessionException(cause.getMessage()); } } catch (Exception e) { throwSessionException(e.getMessage()); } } throwSessionException("Unable to connect to: " + urlString); return null; // To please the compiler } public static String getCleanUrl(String urlString) { for (String suffix : suffices) { suffix = "/" + suffix; if (urlString.endsWith(suffix)) { return urlString.substring(0, urlString.length() - suffix.length()); } } if (urlString.endsWith("/")) { return urlString.substring(0, urlString.length() - 1); } return urlString; } private static void throwSessionException(String msg) throws IcatException_Exception { IcatException except = new IcatException(); except.setMessage(msg); except.setType(IcatExceptionType.SESSION); throw new IcatException_Exception(msg, new IcatException()); } }
/** * Tests the name space URIs of a newly created instance. They should have * default values. */ @Test public void testInitNameSpaces() { assertEquals("Wrong name space for beans", JellyBeanBuilderFactory.NSURI_DI_BUILDER, builder .getDiBuilderNameSpaceURI()); assertEquals("Wrong name space for components", JellyBuilder.NSURI_COMPONENT_BUILDER, builder .getComponentBuilderNamespace()); assertEquals("Wrong name space for actions", JellyBuilder.NSURI_ACTION_BUILDER, builder .getActionBuilderNamespace()); assertEquals("Wrong name space for windows", JellyBuilder.NSURI_WINDOW_BUILDER, builder .getWindowBuilderNamespace()); }
def on_trial_error(self, iteration: int, trials: List["Trial"], trial: "Trial", **info): pass
// Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state. // // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile func (r *CertInjectionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, e error) { logger := log.FromContext(ctx) logger.WithValues("cert injection", req.NamespacedName) logger.Info("Start reconcile loop") certInjection := &v1alpha1.CertInjection{} if err := r.Get(ctx, req.NamespacedName, certInjection); err != nil { logger.Error(err, "unable to fetch cert injection") return ctrl.Result{}, client.IgnoreNotFound(err) } if !certInjection.GetObjectMeta().GetDeletionTimestamp().IsZero() { logger.Info("object is being deleted") return ctrl.Result{}, nil } caSecret := &corev1.Secret{} if err := r.Get(ctx, types.NamespacedName{ Namespace: req.Namespace, Name: certInjection.Spec.CertSecret.Name, }, caSecret); err != nil { logger.Error(err, "get CA cert secret error") return ctrl.Result{}, err } dsList := &appv1.DaemonSetList{} if err := r.List(ctx, dsList, client.InNamespace(req.Namespace), client.MatchingLabels{ mytypes.OwnerGVKLabel: controller.FormatGVKToLabelValue(certInjection.GetObjectKind().GroupVersionKind()), mytypes.OwnerNameLabel: certInjection.GetName(), }); err != nil { logger.Error(err, "list the underlying ds resources") return ctrl.Result{}, err } defer func() { st := corev1.ConditionTrue if e != nil { st = corev1.ConditionFalse } found, updated := false, false for _, c := range certInjection.Status.Conditions { if c.Type == mytypes.ConditionReady { found = true if c.Status != st { c.Status = st updated = true } } } if !found { certInjection.Status.Conditions = append(certInjection.Status.Conditions, v1alpha1.CertInjectionCondition{ Type: mytypes.ConditionReady, Status: st, }) } if !found || updated { if err := r.Status().Update(ctx, certInjection); err != nil { logger.Error(err, "update status error") return } } }() ijp := injector.NewDaemonSetProvider(r.Client, r.Scheme) if len(dsList.Items) == 0 { logger.Info("Underlying ds not found and create new") if err := ijp.Inject(ctx, certInjection); err != nil { logger.Error(err, "inject CA cert error") return ctrl.Result{}, err } } else { ds := &dsList.Items[0] oldInjectionV := ds.GetAnnotations()[mytypes.InjectionVersionAnnotationKey] newInjectionV := certInjection.GetResourceVersion() if oldInjectionV != newInjectionV { logger.Info("Cert injection resource version changes found", "old", oldInjectionV, "new", newInjectionV) updatedDs := ijp.DesiredInjector(certInjection) ds.Spec = *updatedDs.Spec.DeepCopy() ds.Annotations[mytypes.InjectionVersionAnnotationKey] = newInjectionV if err := r.Update(ctx, ds); err != nil { logger.Error(err, "update the underlying ds") return ctrl.Result{}, err } } } logger.Info("Reconcile loop completed") return ctrl.Result{}, nil }