blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dbf4f4f9d2eb3b7fdfde1ba20faf63f8e4bc3c86
|
7fa38aa929ea2be23768fb6a4c020d1c728d9cab
|
/Jogo do 30/jogo.cpp
|
e41bea84e616cb3d741062d7303334987eb9c0f4
|
[] |
no_license
|
jkobata/laboratorio-1
|
68292bbb0124d3bd07ae3e06475655f4f3cf9644
|
26e321dade1b633d507ead7a0b4caca700fa11ed
|
refs/heads/master
| 2020-05-04T05:27:25.711595
| 2019-04-02T02:44:41
| 2019-04-02T02:44:41
| 178,978,143
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,798
|
cpp
|
jogo.cpp
|
/*Autor: João Vitor Kobata
*/
#include <iostream>
#include <string>
#include"jogador.h"
#include <vector>
#include"dado.h"
using namespace std;
int main(){
dado meu_dado;
vector<jogador> jogadores;
int NumeroDeJogadores;
cout << "Digite o Numero de Jogadores" << endl;
cin >> NumeroDeJogadores;
for(int i = 0;i < NumeroDeJogadores; i++){
cout << "Digite o nome do Jogador " << i << endl;
string tempnome;
cin >> tempnome;
jogador temp;
temp.setNomeDoJogador(tempnome);
jogadores.push_back(temp);
jogadores[i].setstop(1);
jogadores[i].setPontosTotal(0);
}
for(int i = 0;i < NumeroDeJogadores; i++){
cout << jogadores[i].getNomeDoJogador()<< endl;
}
int a=1;
int turno = 0;
int stopMarca = 0;
int derrota = 0;
while(a == 1){
if(jogadores[turno].getstop() == 1){
cout << "(1) Você quer para, (2) jogar dado (" <<jogadores[turno].getNomeDoJogador()<<")"<< endl;
int indicador;
cin >> indicador;
switch(indicador){
case 1:
cout <<"o jogador " << jogadores[turno].getNomeDoJogador() << " parou" << endl;
jogadores[turno].setstop(0);
stopMarca++;
break;
case 2:
int valortemp = meu_dado.jogar();
jogadores[turno].setPontosTotal(valortemp);
cout <<jogadores[turno].getPontosTotal()<< endl;
if(jogadores[turno].getPontosTotal() > 30){
jogadores[turno].setstop(0);
derrota++;
stopMarca++;
cout <<"o jogador " << jogadores[turno].getNomeDoJogador() << " passou de 30 e perdeu" <<endl;
}
break;
}
}
turno++;
if(derrota == NumeroDeJogadores -1){
for(int i =0; i< NumeroDeJogadores ;i++){
if(jogadores[i].getstop() == 1){
cout <<jogadores[i].getNomeDoJogador() << " GANHOU a partida !!! "<< endl;
}
}
}
if(turno == NumeroDeJogadores){
turno = 0;
}
if(stopMarca == NumeroDeJogadores){
int ref = 0;
for(int i = 0;i < NumeroDeJogadores;i++){
if(jogadores[i].getPontosTotal() >= ref && jogadores[i].getPontosTotal() <= 30){
ref = jogadores[i].getPontosTotal();
}
}
for(int i = 0;i < NumeroDeJogadores;i++){
if(ref == jogadores[i].getPontosTotal()){
cout <<"o jogador " << jogadores[i].getNomeDoJogador() << " GANHOU a partida!!!" << endl;
}
}
return 0;
}
for(int i=0;i<NumeroDeJogadores;i++){
if(jogadores[i].getstop() == 0 && jogadores[i].getPontosTotal() > 30){
cout<<jogadores[i].getNomeDoJogador()<< " = "<<jogadores[i].getPontosTotal() << " X Perdeu"<< endl;
}
if(jogadores[i].getstop() == 0 && jogadores[i].getPontosTotal() < 30){
cout<<jogadores[i].getNomeDoJogador()<< " = "<<jogadores[i].getPontosTotal() << " parou"<< endl;
}
else{
cout<<jogadores[i].getNomeDoJogador()<< " = "<<jogadores[i].getPontosTotal() << endl;
}
}
}
return 0;
}
|
66e9f6051472bde106701ecb75e15385166fe51b
|
ac6a64d9d435f9db26b675ff4d0228eff4e9300f
|
/Contest_3/bai10.cpp
|
014dd014b7970cc76d1862291b584d2ed91ef7d3
|
[] |
no_license
|
HoangPham3003/CTDL-GT
|
ffb4fbbf797887cb78bd9b8c505e3da54146e4e6
|
0c0ab2638d46b441ee198fdc7897a19eee4fa679
|
refs/heads/main
| 2023-06-15T13:06:36.487041
| 2021-07-10T14:16:50
| 2021-07-10T14:16:50
| 384,712,745
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 497
|
cpp
|
bai10.cpp
|
#include <bits/stdc++.h>
using namespace std;
int t;
long n;
long dodai;
long long ChiPhi;
priority_queue <long, vector <long>, greater<long> > q;
long s, v, r;
int main () {
cin >> t;
while (t--) {
ChiPhi = 0;
cin >> n;
for (int i = 0 ; i < n ; i++) {
cin >> dodai;
q.push(dodai);
}
while (q.size() > 1) {
s = q.top();
q.pop();
v = q.top();
q.pop();
r = 0;
r = s+v;
ChiPhi += r;
q.push(r);
}
q.pop();
cout << ChiPhi << endl;
}
return 0;
}
|
ed1a31952d6ce6cd90568a82bda514b6c240e057
|
f13da091809dc2af0eee7eb01d82e4e27021442e
|
/libev_test/client2.cc
|
82564c2e100100ed6194e50de70c629f528f3a36
|
[] |
no_license
|
fU9ANg/hacks
|
c3e58039e374459c029b2922f962862d74d79528
|
b259e3394a560dfde2bc22884f3df991b9667f2b
|
refs/heads/master
| 2021-01-15T19:28:16.194698
| 2015-01-12T13:51:30
| 2015-01-12T13:51:30
| 3,471,273
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,562
|
cc
|
client2.cc
|
// for test
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/select.h>
#include <errno.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/epoll.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <string>
#define MSG_HEAD_LEN sizeof(struct sSubmitData)
using namespace std;
struct so {
int fd;
string val;
};
int select_version (int* fd)
{
int c_fd = *fd;
fd_set rset, wset;
struct timeval tval;
FD_ZERO (&rset);
FD_SET (c_fd, &rset);
wset = rset;
tval.tv_sec = 0;
tval.tv_usec = 300 * 1000;
int ready_n;
if ((ready_n = select (c_fd + 1, &rset, &wset, NULL, &tval)) == 0) {
close (c_fd);
errno = ETIMEDOUT;
perror ("select timeout:");
return (-1);
}
if (FD_ISSET (c_fd, &rset)) {
int error;
socklen_t len = sizeof (error);
if (getsockopt (c_fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) {
perror ("getsockopt error:");
return (-1);
}
cout << "in read set, error=" << error << endl;
}
if (FD_ISSET (c_fd, &wset)) {
int error;
socklen_t len = sizeof (error);
if (getsockopt (c_fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) {
perror ("getsockopt error:");
return (-1);
}
cout << "in write set, error=" << error << endl;
}
return (0);
}
int main (int argc, char* argv[])
{
string ip = "127.0.0.1";
int port = 9887;
int c_fd, flags, ret;
struct sockaddr_in s_addr;
(void) memset (&s_addr, 0, sizeof (s_addr));
s_addr.sin_family = AF_INET;
s_addr.sin_port = htons (port);
s_addr.sin_addr.s_addr = inet_addr (ip.c_str());
if ((c_fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
perror ("socket:");
exit (1);
}
flags = fcntl(c_fd, F_GETFL, 0);
if (flags < 0) {
perror("get socket flags fail.\n");
return -1;
}
if (fcntl(c_fd, F_SETFL, flags | O_NONBLOCK) < 0) {
perror("set socket O_NONBLOCK fail.\n");
return -1;
}
ret = connect(c_fd, (struct sockaddr*) &s_addr, sizeof (struct sockaddr));
while (ret < 0) {
if (errno == EINPROGRESS) {
break;
} else {
perror("connect remote server fail.\n");
printf("%d\n", errno);
exit(0);
}
}
select_version (&c_fd);
return (0);
}
|
3a35bcbdd32753ab438e4668530c42f2e9189a2e
|
230fb8845f39bef0f30f5d3541eff5dc0641de14
|
/Connect3/Export/windows/obj/include/haxe/ui/backend/ComponentBase.h
|
77be407241739da01cf8e1432a1ae9b3db451e5d
|
[] |
no_license
|
vhlk/AlgoritmoMinMax
|
76abd62a6e2859ed229e5831264b6d8af27e318d
|
40eded4948794ca48d50d16d2133a9ab21207768
|
refs/heads/main
| 2023-06-30T15:16:17.492478
| 2021-08-02T13:29:32
| 2021-08-02T13:29:32
| 390,493,745
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| true
| 7,277
|
h
|
ComponentBase.h
|
// Generated by Haxe 4.2.0
#ifndef INCLUDED_haxe_ui_backend_ComponentBase
#define INCLUDED_haxe_ui_backend_ComponentBase
#ifndef HXCPP_H
#include <hxcpp.h>
#endif
#ifndef INCLUDED_haxe_ui_core_ComponentBounds
#include <haxe/ui/core/ComponentBounds.h>
#endif
HX_DECLARE_CLASS1(haxe,IMap)
HX_DECLARE_CLASS2(haxe,ds,StringMap)
HX_DECLARE_CLASS3(haxe,ui,backend,ComponentBase)
HX_DECLARE_CLASS3(haxe,ui,backend,ComponentImpl)
HX_DECLARE_CLASS3(haxe,ui,backend,EventBase)
HX_DECLARE_CLASS3(haxe,ui,backend,EventImpl)
HX_DECLARE_CLASS3(haxe,ui,backend,ImageBase)
HX_DECLARE_CLASS3(haxe,ui,backend,ImageDisplayImpl)
HX_DECLARE_CLASS3(haxe,ui,backend,ImageSurface)
HX_DECLARE_CLASS3(haxe,ui,backend,TextBase)
HX_DECLARE_CLASS3(haxe,ui,backend,TextDisplayImpl)
HX_DECLARE_CLASS3(haxe,ui,backend,TextInputImpl)
HX_DECLARE_CLASS3(haxe,ui,core,Component)
HX_DECLARE_CLASS3(haxe,ui,core,ComponentBounds)
HX_DECLARE_CLASS3(haxe,ui,core,ComponentCommon)
HX_DECLARE_CLASS3(haxe,ui,core,ComponentContainer)
HX_DECLARE_CLASS3(haxe,ui,core,ComponentEvents)
HX_DECLARE_CLASS3(haxe,ui,core,ComponentLayout)
HX_DECLARE_CLASS3(haxe,ui,core,ComponentValidation)
HX_DECLARE_CLASS3(haxe,ui,core,IClonable)
HX_DECLARE_CLASS3(haxe,ui,core,IComponentBase)
HX_DECLARE_CLASS3(haxe,ui,core,ImageDisplay)
HX_DECLARE_CLASS3(haxe,ui,core,TextDisplay)
HX_DECLARE_CLASS3(haxe,ui,core,TextInput)
HX_DECLARE_CLASS3(haxe,ui,events,UIEvent)
HX_DECLARE_CLASS3(haxe,ui,geom,Point)
HX_DECLARE_CLASS3(haxe,ui,geom,Rectangle)
HX_DECLARE_CLASS3(haxe,ui,styles,Style)
HX_DECLARE_CLASS3(haxe,ui,validation,IValidating)
HX_DECLARE_CLASS2(openfl,display,DisplayObject)
HX_DECLARE_CLASS2(openfl,display,DisplayObjectContainer)
HX_DECLARE_CLASS2(openfl,display,IBitmapDrawable)
HX_DECLARE_CLASS2(openfl,display,InteractiveObject)
HX_DECLARE_CLASS2(openfl,display,Sprite)
HX_DECLARE_CLASS2(openfl,events,EventDispatcher)
HX_DECLARE_CLASS2(openfl,events,IEventDispatcher)
namespace haxe{
namespace ui{
namespace backend{
class HXCPP_CLASS_ATTRIBUTES ComponentBase_obj : public ::haxe::ui::core::ComponentBounds_obj
{
public:
typedef ::haxe::ui::core::ComponentBounds_obj super;
typedef ComponentBase_obj OBJ_;
ComponentBase_obj();
public:
enum { _hx_ClassId = 0x0f2dd418 };
void __construct();
inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="haxe.ui.backend.ComponentBase")
{ return ::hx::Object::operator new(inSize,inContainer,inName); }
inline void *operator new(size_t inSize, int extra)
{ return ::hx::Object::operator new(inSize+extra,true,"haxe.ui.backend.ComponentBase"); }
static ::hx::ObjectPtr< ComponentBase_obj > __new();
static ::hx::ObjectPtr< ComponentBase_obj > __alloc(::hx::Ctx *_hx_ctx);
static void * _hx_vtable;
static Dynamic __CreateEmpty();
static Dynamic __Create(::hx::DynamicArray inArgs);
//~ComponentBase_obj();
HX_DO_RTTI_ALL;
::hx::Val __Field(const ::String &inString, ::hx::PropertyAccess inCallProp);
::hx::Val __SetField(const ::String &inString,const ::hx::Val &inValue, ::hx::PropertyAccess inCallProp);
void __GetFields(Array< ::String> &outFields);
static void __register();
void __Mark(HX_MARK_PARAMS);
void __Visit(HX_VISIT_PARAMS);
bool _hx_isInstanceOf(int inClassId);
::String __ToString() const { return HX_("ComponentBase",4e,f7,a1,26); }
void handleCreate(bool native);
::Dynamic handleCreate_dyn();
virtual void handlePosition( ::Dynamic left, ::Dynamic top, ::haxe::ui::styles::Style style);
::Dynamic handlePosition_dyn();
virtual void handleSize( ::Dynamic width, ::Dynamic height, ::haxe::ui::styles::Style style);
::Dynamic handleSize_dyn();
void handleReady();
::Dynamic handleReady_dyn();
virtual void handleClipRect( ::haxe::ui::geom::Rectangle value);
::Dynamic handleClipRect_dyn();
virtual void handleVisibility(bool show);
::Dynamic handleVisibility_dyn();
virtual ::haxe::ui::geom::Point getComponentOffset();
::Dynamic getComponentOffset_dyn();
bool isNativeScroller;
bool get_isNativeScroller();
::Dynamic get_isNativeScroller_dyn();
void handleFrameworkProperty(::String id, ::Dynamic value);
::Dynamic handleFrameworkProperty_dyn();
virtual void handleSetComponentIndex( ::haxe::ui::core::Component child,int index);
::Dynamic handleSetComponentIndex_dyn();
virtual ::haxe::ui::core::Component handleAddComponent( ::haxe::ui::core::Component child);
::Dynamic handleAddComponent_dyn();
virtual ::haxe::ui::core::Component handleAddComponentAt( ::haxe::ui::core::Component child,int index);
::Dynamic handleAddComponentAt_dyn();
virtual ::haxe::ui::core::Component handleRemoveComponent( ::haxe::ui::core::Component child,::hx::Null< bool > dispose);
::Dynamic handleRemoveComponent_dyn();
virtual ::haxe::ui::core::Component handleRemoveComponentAt(int index,::hx::Null< bool > dispose);
::Dynamic handleRemoveComponentAt_dyn();
virtual void applyStyle( ::haxe::ui::styles::Style style);
::Dynamic applyStyle_dyn();
virtual void mapEvent(::String type, ::Dynamic listener);
virtual void unmapEvent(::String type, ::Dynamic listener);
::haxe::ui::core::TextDisplay _textDisplay;
virtual ::haxe::ui::core::TextDisplay createTextDisplay(::String text);
::Dynamic createTextDisplay_dyn();
::haxe::ui::core::TextDisplay getTextDisplay();
bool hasTextDisplay();
::haxe::ui::core::TextInput _textInput;
virtual ::haxe::ui::core::TextInput createTextInput(::String text);
::Dynamic createTextInput_dyn();
::haxe::ui::core::TextInput getTextInput();
bool hasTextInput();
::haxe::ui::core::ImageDisplay _imageDisplay;
virtual ::haxe::ui::core::ImageDisplay createImageDisplay();
::Dynamic createImageDisplay_dyn();
::haxe::ui::core::ImageDisplay getImageDisplay();
bool hasImageDisplay();
virtual void removeImageDisplay();
::Dynamic removeImageDisplay_dyn();
void handlePreReposition();
::Dynamic handlePreReposition_dyn();
void handlePostReposition();
::Dynamic handlePostReposition_dyn();
::String getClassProperty(::String name);
::Dynamic getClassProperty_dyn();
::haxe::ds::StringMap _classProperties;
void setClassProperty(::String name,::String value);
::Dynamic setClassProperty_dyn();
::Dynamic _hasNativeEntry;
bool hasNativeEntry;
bool get_hasNativeEntry();
::Dynamic get_hasNativeEntry_dyn();
::String getNativeConfigProperty(::String query,::String defaultValue);
::Dynamic getNativeConfigProperty_dyn();
bool getNativeConfigPropertyBool(::String query,::hx::Null< bool > defaultValue);
::Dynamic getNativeConfigPropertyBool_dyn();
::haxe::ds::StringMap getNativeConfigProperties(::String query);
::Dynamic getNativeConfigProperties_dyn();
::String _className;
::String className;
::String get_className();
::Dynamic get_className_dyn();
::String _nativeClassName;
::String nativeClassName;
::String get_nativeClassName();
::Dynamic get_nativeClassName_dyn();
virtual void registerBehaviours();
virtual ::haxe::ui::core::ComponentContainer cloneComponent();
virtual ::haxe::ui::core::ComponentContainer self();
};
} // end namespace haxe
} // end namespace ui
} // end namespace backend
#endif /* INCLUDED_haxe_ui_backend_ComponentBase */
|
b000997261c481a52b420b85c761f65e8918d013
|
c7c73566784a7896100e993606e1bd8fdd0ea94e
|
/panda/src/linmath/lpoint3_src.h
|
81ba79a6449f434e8a0071ff4b762636d2fc0ad0
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
panda3d/panda3d
|
c3f94df2206ff7cfe4a3b370777a56fb11a07926
|
160ba090a5e80068f61f34fc3d6f49dbb6ad52c5
|
refs/heads/master
| 2023-08-21T13:23:16.904756
| 2021-04-11T22:55:33
| 2023-08-06T06:09:32
| 13,212,165
| 4,417
| 1,072
|
NOASSERTION
| 2023-09-09T19:26:14
| 2013-09-30T10:20:25
|
C++
|
UTF-8
|
C++
| false
| false
| 3,485
|
h
|
lpoint3_src.h
|
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file lpoint3_src.h
* @author drose
* @date 1999-09-25
*/
/**
* This is a three-component point in space (as opposed to a three-component
* vector, which represents a direction and a distance). Some of the methods
* are slightly different between LPoint3 and LVector3; in particular,
* subtraction of two points yields a vector, while addition of a vector and a
* point yields a point.
*/
class EXPCL_PANDA_LINMATH FLOATNAME(LPoint3) : public FLOATNAME(LVecBase3) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LPoint3)() = default;
INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) ©);
INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE fill_value);
INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
INLINE_LINMATH explicit FLOATNAME(LPoint3)(const FLOATNAME(LVecBase2) ©, FLOATTYPE z);
PY_EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
PY_EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
INLINE_LINMATH static const FLOATNAME(LPoint3) &zero();
INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_x();
INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_y();
INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_z();
INLINE_LINMATH FLOATNAME(LPoint2) get_xy() const;
INLINE_LINMATH FLOATNAME(LPoint2) get_xz() const;
INLINE_LINMATH FLOATNAME(LPoint2) get_yz() const;
MAKE_PROPERTY(xy, get_xy);
MAKE_PROPERTY(xz, get_xz);
MAKE_PROPERTY(yz, get_yz);
INLINE_LINMATH FLOATNAME(LPoint3) operator - () const;
INLINE_LINMATH FLOATNAME(LVecBase3)
operator + (const FLOATNAME(LVecBase3) &other) const;
INLINE_LINMATH FLOATNAME(LPoint3)
operator + (const FLOATNAME(LVector3) &other) const;
INLINE_LINMATH FLOATNAME(LVecBase3)
operator - (const FLOATNAME(LVecBase3) &other) const;
INLINE_LINMATH FLOATNAME(LVector3)
operator - (const FLOATNAME(LPoint3) &other) const;
INLINE_LINMATH FLOATNAME(LPoint3)
operator - (const FLOATNAME(LVector3) &other) const;
INLINE_LINMATH FLOATNAME(LPoint3) cross(const FLOATNAME(LVecBase3) &other) const;
#ifndef FLOATTYPE_IS_INT
INLINE_LINMATH FLOATNAME(LPoint3) normalized() const;
INLINE_LINMATH FLOATNAME(LPoint3) project(const FLOATNAME(LVecBase3) &onto) const;
#endif // !FLOATTYPE_IS_INT
INLINE_LINMATH FLOATNAME(LPoint3) operator * (FLOATTYPE scalar) const;
INLINE_LINMATH FLOATNAME(LPoint3) operator / (FLOATTYPE scalar) const;
EXTENSION(INLINE_LINMATH FLOATNAME(LPoint3) __rmul__(FLOATTYPE scalar) const);
// Some special named constructors for LPoint3.
INLINE_LINMATH static const FLOATNAME(LPoint3) &origin(CoordinateSystem cs = CS_default);
INLINE_LINMATH static FLOATNAME(LPoint3) rfu(FLOATTYPE right,
FLOATTYPE fwd,
FLOATTYPE up,
CoordinateSystem cs = CS_default);
EXTENSION(INLINE_LINMATH std::string __repr__() const);
public:
static TypeHandle get_class_type() {
return _type_handle;
}
static void init_type();
private:
static TypeHandle _type_handle;
};
#include "lpoint3_src.I"
|
fae365d82486960971d8d6be95284f93c3c75b83
|
7d3a6d7f6c20d7969009c62228e2447cbed25a64
|
/main.cpp
|
3039b3554d764742bbacc7d4df34f0f6071b41e6
|
[] |
no_license
|
migdea11/Ultrasonic-Range-Sensor-Driver
|
b9610ac8703e3adf9cc114d178334a66803ddaec
|
9abed4f402d5d5df1c078a4990cf49ad506c4f72
|
refs/heads/master
| 2018-10-15T17:40:49.312713
| 2018-07-12T05:16:31
| 2018-07-12T05:49:41
| 116,210,531
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 564
|
cpp
|
main.cpp
|
#include <iostream>
#include <cstdint>
#include <unistd.h>
using namespace std;
#include "HC_SR04.h"
int main()
{
cout<<"init"<<endl;
HC_SR04* sensor = HC_SR04::Init(20, 21);
cout<<"start"<<endl;
sensor->Start();
uint16_t numRead = 0;
while(numRead++ < 50)
{
uint16_t poll = 100; // in ms
uint16_t dist = 0;
sensor->Read(dist);
if ((numRead % 10) == 0)
{
cout << flush;
}
cout<<dist<<", ";
usleep(poll * 1000);
}
sensor->Stop();
return 0;
}
|
c16d4b561fe404f600850b7600293721ae513022
|
382c2831d0250b2e07791fe5a0851d36f9503ffa
|
/src/sim/solver.inl
|
f5f04496cb61a5089c9f3728b14b3aaab8e939a8
|
[] |
no_license
|
NTForked/Ariel
|
2cb28739f3b51141ba3f0c5e19c23c4d1ad8faf5
|
4a0878f90c2f1346753953e0dffbf5646550cdd4
|
refs/heads/master
| 2021-05-29T15:20:30.850667
| 2015-09-01T09:19:42
| 2015-09-01T09:19:42
| 53,224,202
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,413
|
inl
|
solver.inl
|
// Ariel: FLIP Fluid Simulator
// Written by Yining Karl Li
//
// File: solver.inl
// Breakout file for PCG solver
#ifndef SOLVER_INL
#define SOLVER_INL
#include <tbb/tbb.h>
#include "../grid/macgrid.inl"
#include "../grid/particlegrid.hpp"
#include "../grid/levelset.hpp"
#include "../utilities/utilities.h"
#include "../grid/gridutils.inl"
namespace fluidCore {
//====================================
// Struct and Function Declarations
//====================================
//Forward declarations for externed inlineable methods
extern inline void Solve(MacGrid& mgrid, const int& subcell, const bool& verbose);
inline void BuildPreconditioner(Grid<float>* pc, MacGrid& mgrid, int subcell);
inline void SolveConjugateGradient(MacGrid& mgrid, Grid<float>* pc, int subcell,
const bool& verbose);
inline void ComputeAx(Grid<int>* A, Grid<float>* L, Grid<float>* X, Grid<float>* target,
glm::vec3 dimensions, int subcell);
inline float XRef(Grid<int>* A, Grid<float>* L, Grid<float>* X, glm::vec3 f, glm::vec3 p,
glm::vec3 dimensions, int subcell);
inline void Op(Grid<int>* A, Grid<float>* X, Grid<float>* Y, Grid<float>* target, float alpha,
glm::vec3 dimensions);
inline float Product(Grid<int>* A, Grid<float>* X, Grid<float>* Y, glm::vec3 dimensions);
inline void ApplyPreconditioner(Grid<float>* Z, Grid<float>* R, Grid<float>* P, Grid<float>* L,
Grid<int>* A, glm::vec3 dimensions);
//====================================
// Function Implementations
//====================================
//Takes a grid, multiplies everything by -1
void FlipGrid(Grid<float>* grid, glm::vec3 dimensions){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
tbb::parallel_for(tbb::blocked_range<unsigned int>(0,x),
[=](const tbb::blocked_range<unsigned int>& r){
for(unsigned int i=r.begin(); i!=r.end(); ++i){
for(unsigned int j=0; j<y; ++j){
for(unsigned int k=0; k<z; ++k){
float flipped = -grid->GetCell(i,j,k);
grid->SetCell(i,j,k,flipped);
}
}
}
}
);
}
//Helper for preconditioner builder
float ARef(Grid<int>* A, int i, int j, int k, int qi, int qj, int qk, glm::vec3 dimensions){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
if( i<0 || i>x-1 || j<0 || j>y-1 || k<0 || k>z-1 || A->GetCell(i,j,k)!=FLUID ){ //if not liquid
return 0.0;
}
//if not liquid
if( qi<0 || qi>x-1 || qj<0 || qj>y-1 || qk<0 || qk>z-1 || A->GetCell(qi,qj,qk)!=FLUID ){
return 0.0;
}
return -1.0;
}
//Helper for preconditioner builder
float PRef(Grid<float>* p, int i, int j, int k, glm::vec3 dimensions){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
if( i<0 || i>x-1 || j<0 || j>y-1 || k<0 || k>z-1 || p->GetCell(i,j,k)!=FLUID ){ //if not liquid
return 0.0f;
}
return p->GetCell(i,j,k);
}
//Helper for preconditioner builder
float ADiag(Grid<int>* A, Grid<float>* L, int i, int j, int k, glm::vec3 dimensions, int subcell){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
float diag = 6.0;
if( A->GetCell(i,j,k) != FLUID ){
return diag;
}
int q[][3] = { {i-1,j,k}, {i+1,j,k}, {i,j-1,k}, {i,j+1,k}, {i,j,k-1}, {i,j,k+1} };
for( int m=0; m<6; m++ ) {
int qi = q[m][0];
int qj = q[m][1];
int qk = q[m][2];
if( qi<0 || qi>x-1 || qj<0 || qj>y-1 || qk<0 || qk>z-1 || A->GetCell(qi,qj,qk)==SOLID ){
diag -= 1.0;
}
else if( A->GetCell(qi,qj,qk)==AIR && subcell ) {
diag -= L->GetCell(qi,qj,qk)/glm::min(1.0e-6f,L->GetCell(i,j,k));
}
}
return diag;
}
//Does what it says
void BuildPreconditioner(Grid<float>* pc, MacGrid& mgrid, int subcell){
int x = (int)mgrid.m_dimensions.x; int y = (int)mgrid.m_dimensions.y;
int z = (int)mgrid.m_dimensions.z;
float a = 0.25f;
tbb::parallel_for(tbb::blocked_range<unsigned int>(0,x),
[=](const tbb::blocked_range<unsigned int>& r){
for(unsigned int i=r.begin(); i!=r.end(); ++i){
for(unsigned int j=0; j<y; ++j){
for(unsigned int k=0; k<z; ++k){
if(mgrid.m_A->GetCell(i,j,k)==FLUID){
float left = ARef(mgrid.m_A,i-1,j,k,i,j,k,mgrid.m_dimensions) *
PRef(pc,i-1,j,k,mgrid.m_dimensions);
float bottom = ARef(mgrid.m_A,i,j-1,k,i,j,k,mgrid.m_dimensions) *
PRef(pc,i,j-1,k,mgrid.m_dimensions);
float back = ARef(mgrid.m_A,i,j,k-1,i,j,k,mgrid.m_dimensions) *
PRef(pc,i,j,k-1,mgrid.m_dimensions);
float diag = ADiag(mgrid.m_A, mgrid.m_L,i,j,k,mgrid.m_dimensions,
subcell);
float e = diag - (left*left) - (bottom*bottom) - (back*back);
if(diag>0){
if( e < a*diag ){
e = diag;
}
pc->SetCell(i,j,k, 1.0f/glm::sqrt(e));
}
}
}
}
}
}
);
}
//Helper for PCG solver: read X with clamped bounds
float XRef(Grid<int>* A, Grid<float>* L, Grid<float>* X, glm::vec3 f, glm::vec3 p,
glm::vec3 dimensions, int subcell){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
int i = glm::min(glm::max(0,(int)p.x),x-1); int fi = (int)f.x;
int j = glm::min(glm::max(0,(int)p.y),y-1); int fj = (int)f.y;
int k = glm::min(glm::max(0,(int)p.z),z-1); int fk = (int)f.z;
if(A->GetCell(i,j,k) == FLUID){
return X->GetCell(i,j,k);
}else if(A->GetCell(i,j,k) == SOLID){
return X->GetCell(fi,fj,fk);
}
if(subcell){
return L->GetCell(i,j,k)/glm::min(1.0e-6f,L->GetCell(fi,fj,fk))*X->GetCell(fi,fj,fk);
}else{
return 0.0f;
}
}
// target = X + alpha*Y
void Op(Grid<int>* A, Grid<float>* X, Grid<float>* Y, Grid<float>* target, float alpha,
glm::vec3 dimensions){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
for(unsigned int j=0; j<y; ++j){
for(unsigned int k=0; k<z; ++k){
//this parallel loop has to be the inner loop or else MSVC will barf
tbb::parallel_for(tbb::blocked_range<unsigned int>(0,x),
[=](const tbb::blocked_range<unsigned int>& r){
for(unsigned int i=r.begin(); i!=r.end(); ++i){
if(A->GetCell(i,j,k)==FLUID){
float targetval = X->GetCell(i,j,k)+alpha*Y->GetCell(i,j,k);
target->SetCell(i,j,k,targetval);
}else{
target->SetCell(i,j,k,0.0f);
}
}
}
);
}
}
}
// ans = x^T * x
float Product(Grid<int>* A, Grid<float>* X, Grid<float>* Y, glm::vec3 dimensions){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
float result = 0.0f;
for(unsigned int i=0; i<x; i++){
for(unsigned int j=0; j<y; j++){
for(unsigned int k=0; k<z; k++){
if(A->GetCell(i,j,k)==FLUID){
result += X->GetCell(i,j,k) * Y->GetCell(i,j,k);
}
}
}
}
return result;
}
//Helper for PCG solver: target = AX
void ComputeAx(Grid<int>* A, Grid<float>* L, Grid<float>* X, Grid<float>* target,
glm::vec3 dimensions, int subcell){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
float n = (float)glm::max(glm::max(x,y),z);
float h = 1.0f/(n*n);
tbb::parallel_for(tbb::blocked_range<unsigned int>(0,x),
[=](const tbb::blocked_range<unsigned int>& r){
for(unsigned int i=r.begin(); i!=r.end(); ++i){
for(unsigned int j=0; j<y; ++j){
for(unsigned int k=0; k<z; ++k){
if(A->GetCell(i,j,k) == FLUID){
float result = (6.0f*X->GetCell(i,j,k)
-XRef(A, L, X, glm::vec3(i,j,k), glm::vec3(i+1,j,k),
dimensions, subcell)
-XRef(A, L, X, glm::vec3(i,j,k), glm::vec3(i-1,j,k),
dimensions, subcell)
-XRef(A, L, X, glm::vec3(i,j,k), glm::vec3(i,j+1,k),
dimensions, subcell)
-XRef(A, L, X, glm::vec3(i,j,k), glm::vec3(i,j-1,k),
dimensions, subcell)
-XRef(A, L, X, glm::vec3(i,j,k), glm::vec3(i,j,k+1),
dimensions, subcell)
-XRef(A, L, X, glm::vec3(i,j,k), glm::vec3(i,j,k-1),
dimensions, subcell)
)/h;
target->SetCell(i,j,k,result);
} else {
target->SetCell(i,j,k,0.0f);
}
}
}
}
}
);
}
void ApplyPreconditioner(Grid<float>* Z, Grid<float>* R, Grid<float>* P, Grid<float>* L,
Grid<int>* A, glm::vec3 dimensions){
int x = (int)dimensions.x; int y = (int)dimensions.y; int z = (int)dimensions.z;
Grid<float>* Q = new Grid<float>(dimensions, 0.0f);
// LQ = R
tbb::parallel_for(tbb::blocked_range<unsigned int>(0,x),
[=](const tbb::blocked_range<unsigned int>& r){
for(unsigned int i=r.begin(); i!=r.end(); ++i){
for(unsigned int j=0; j<y; ++j){
for(unsigned int k=0; k<z; ++k){
if(A->GetCell(i,j,k) == FLUID) {
float left = ARef(A,i-1,j,k,i,j,k,dimensions)*
PRef(P,i-1,j,k,dimensions)*PRef(Q,i-1,j,k,dimensions);
float bottom = ARef(A,i,j-1,k,i,j,k,dimensions)*
PRef(P,i,j-1,k,dimensions)*PRef(Q,i,j-1,k,dimensions);
float back = ARef(A,i,j,k-1,i,j,k,dimensions)*
PRef(P,i,j,k-1,dimensions)*PRef(Q,i,j,k-1,dimensions);
float t = R->GetCell(i,j,k) - left - bottom - back;
float qVal = t * P->GetCell(i,j,k);
Q->SetCell(i,j,k,qVal);
}
}
}
}
}
);
// L^T Z = Q
for(int j=y-1; j>=0; j--){
for(int k=z-1; k>=0; k--){
//this parallel loop has to be the inner loop or else MSVC will barf
tbb::parallel_for(tbb::blocked_range<int>(-1,x-1),
[=](const tbb::blocked_range<int>& r){
for(int i=r.end(); i!=r.begin(); i--){
if(A->GetCell(i,j,k) == FLUID){
float right = ARef(A,i,j,k,i+1,j,k,dimensions)*
PRef(P,i,j,k,dimensions)*PRef(Z,i+1,j,k,dimensions);
float top = ARef(A,i,j,k,i,j+1,k,dimensions)*
PRef(P,i,j,k,dimensions)*PRef(Z,i,j+1,k,dimensions);
float front = ARef(A,i,j,k,i,j,k+1,dimensions)*
PRef(P,i,j,k,dimensions)*PRef(Z,i,j,k+1,dimensions);
float t = Q->GetCell(i,j,k) - right - top - front;
float zVal = t * P->GetCell(i,j,k);
Z->SetCell(i,j,k,zVal);
}
}
}
);
}
}
delete Q;
}
//Does what it says
void SolveConjugateGradient(MacGrid& mgrid, Grid<float>* PC, int subcell, const bool& verbose){
int x = (int)mgrid.m_dimensions.x; int y = (int)mgrid.m_dimensions.y;
int z = (int)mgrid.m_dimensions.z;
Grid<float>* R = new Grid<float>(mgrid.m_dimensions, 0.0f);
Grid<float>* Z = new Grid<float>(mgrid.m_dimensions, 0.0f);
Grid<float>* S = new Grid<float>(mgrid.m_dimensions, 0.0f);
//note: we're calling pressure "mgrid.P" instead of x
ComputeAx(mgrid.m_A, mgrid.m_L, mgrid.m_P, Z, mgrid.m_dimensions, subcell); // z = apply A(x)
Op(mgrid.m_A, mgrid.m_D, Z, R, -1.0f, mgrid.m_dimensions); // r = b-Ax
float error0 = Product(mgrid.m_A, R, R, mgrid.m_dimensions); // error0 = product(r,r)
// z = f(r), aka preconditioner step
ApplyPreconditioner(Z, R, PC, mgrid.m_L, mgrid.m_A, mgrid.m_dimensions);
//s = z. TODO: replace with VDB deep copy?
for(unsigned int j=0; j<y; ++j ){
for(unsigned int k=0; k<z; ++k ){
//this parallel loop has to be the inner loop or else MSVC will barf
tbb::parallel_for(tbb::blocked_range<unsigned int>(0,x),
[=](const tbb::blocked_range<unsigned int>& r){
for(unsigned int i=r.begin(); i!=r.end(); ++i){
S->SetCell(i,j,k,Z->GetCell(i,j,k));
}
}
);
}
}
float eps = 1.0e-2f * (x*y*z);
float a = Product(mgrid.m_A, Z, R, mgrid.m_dimensions); // a = product(z,r)
for( int k=0; k<x*y*z; k++){
//Solve current iteration
ComputeAx(mgrid.m_A, mgrid.m_L, S, Z, mgrid.m_dimensions, subcell); // z = applyA(s)
float alpha = a/Product(mgrid.m_A, Z, S, mgrid.m_dimensions); // alpha = a/(z . s)
Op(mgrid.m_A, mgrid.m_P, S, mgrid.m_P, alpha, mgrid.m_dimensions); // x = x + alpha*s
Op(mgrid.m_A, R, Z, R, -alpha, mgrid.m_dimensions); // r = r - alpha*z;
float error1 = Product(mgrid.m_A, R, R, mgrid.m_dimensions); // error1 = product(r,r)
error0 = glm::max(error0, error1);
//Output progress
float rate = 1.0f - glm::max(0.0f,glm::min(1.0f,(error1-eps)/(error0-eps)));
// if(verbose){
std::cout << "PCG Iteration " << k+1 << ": " << 100.0f*pow(rate,6) << "% solved"
<< std::endl;
// }
if(error1<=eps){
break;
}
//Prep next iteration
// z = f(r)
ApplyPreconditioner(Z, R, PC, mgrid.m_L, mgrid.m_A, mgrid.m_dimensions);
float a2 = Product(mgrid.m_A, Z, R, mgrid.m_dimensions); // a2 = product(z,r)
float beta = a2/a; // beta = a2/a
Op(mgrid.m_A, Z, S, S, beta, mgrid.m_dimensions); // s = z + beta*s
a = a2;
}
delete R;
delete Z;
delete S;
}
void Solve(MacGrid& mgrid, const int& subcell, const bool& verbose){
//if in VDB mode, force to single threaded to prevent VDB write issues.
//this is a kludgey fix for now.
// if(mgrid.type==VDB){
// omp_set_num_threads(1);
// }
//flip divergence
FlipGrid(mgrid.m_D, mgrid.m_dimensions);
//build preconditioner
Grid<float>* preconditioner = new Grid<float>(mgrid.m_dimensions, 0.0f);
BuildPreconditioner(preconditioner, mgrid, subcell);
//solve conjugate gradient
SolveConjugateGradient(mgrid, preconditioner, subcell, verbose);
delete preconditioner;
// if(mgrid.type==VDB){
// omp_set_num_threads(omp_get_num_procs());
// }
}
}
#endif
|
3ba40d57db9478ab17e567942deb331cd273bce3
|
b991b3822572e13c1a0e17f037564326d4932ff6
|
/shortest-path-in-binary-matrix/Accepted/2-13-2021, 8_25_22 PM/Solution.cpp
|
613cf137165392b785de4c27288dd85a40fa323c
|
[] |
no_license
|
isaigm/leetcode
|
8f1188a824e78f11b8223302fe625e9a8bf9262a
|
e53b04a9f627ff95aaae9f8e5315f5f688c6b9e2
|
refs/heads/master
| 2023-01-06T02:07:41.118942
| 2022-12-31T23:13:20
| 2022-12-31T23:13:20
| 248,679,884
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,238
|
cpp
|
Solution.cpp
|
// https://leetcode.com/problems/shortest-path-in-binary-matrix
class Solution {
public:
int shortestPathBinaryMatrix(std::vector<std::vector<int>> &grid)
{
auto dim = grid.size();
if(grid[0][0] == 1 || grid[dim -1][dim - 1]) return -1;
if(dim == 1 && grid[0][0] == 0) return 1;
std::map<std::pair<int, int>, bool> visited;
auto get_neighbours = [dim, &visited, &grid](int r, int c) {
std::vector<std::pair<int, int>> neighbours;
for (int i = r - 1; i <= r + 1; i++)
{
for (int j = c - 1; j <= c + 1; j++)
{
if ((i == r && j == c) || i < 0 || j < 0 || i >= dim || j >= dim)
{
continue;
}
auto cell = std::make_pair(i, j);
if (grid[i][j] == 0)
{
neighbours.push_back(cell);
}
}
}
return neighbours;
};
std::queue<std::pair<int, int>> nodes;
std::map<std::pair<int, int>, std::pair<int, int>> prev;
nodes.push(std::make_pair(0, 0));
visited[std::make_pair(0, 0)] = true;
while (!nodes.empty())
{
auto node = nodes.front();
nodes.pop();
auto neighbours = get_neighbours(node.first, node.second);
for (const auto &next : neighbours)
{
if (!visited[next])
{
nodes.push(next);
visited[next] = true;
prev[next] = node;
}
}
}
std::vector<std::pair<int, int>> path;
auto step = std::make_pair(dim - 1, dim - 1);
auto iter = prev.find(step);
if(iter == prev.end()) return -1;
path.push_back(step);
while (iter != prev.end())
{
path.push_back(iter->second);
iter = prev.find(iter->second);
}
if (path[path.size() - 1].first == 0 && path[path.size() - 1].second == 0)
{
return path.size();
}
return -1;
}
};
|
a75e3b7d6ad6e225449eea1f51315f8feec06f75
|
31e6b52bf50d123d7e129fbf18209501e966b549
|
/laser_resender/src/laser_resender_node.cpp
|
b3936e5840d2898ab62545862ed5e59b261f3f2e
|
[] |
no_license
|
MROS-RobMoSys-ITP/Pilot-URJC
|
c8819e6c1492523200abb0844d153ac73aa6a0b6
|
7386f5744730938557055a0c32191b6a40f03e89
|
refs/heads/master
| 2021-07-11T01:29:01.508739
| 2021-03-29T06:47:21
| 2021-03-29T06:47:21
| 235,316,865
| 7
| 3
| null | 2021-03-29T06:47:21
| 2020-01-21T10:34:01
|
C++
|
UTF-8
|
C++
| false
| false
| 4,365
|
cpp
|
laser_resender_node.cpp
|
// Copyright 2020 Intelligent Robotics Lab
//
// 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 <memory>
#include "lifecycle_msgs/msg/state.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_lifecycle/lifecycle_node.hpp"
#include "sensor_msgs/msg/laser_scan.hpp"
// Execute:
// ros2 lifecycle list /laser_resender
// ros2 lifecycle get /laser_resender
// ros2 lifecycle set /laser_resender configure
using rcl_interfaces::msg::ParameterType;
using std::placeholders::_1;
using namespace std::placeholders;
class LaserResender : public rclcpp_lifecycle::LifecycleNode
{
public:
LaserResender()
: rclcpp_lifecycle::LifecycleNode("laser_resender")
{
declare_parameter("node_name");
pub_ = create_publisher<sensor_msgs::msg::LaserScan>("/mros_scan", rclcpp::SensorDataQoS());
sub_ = create_subscription<sensor_msgs::msg::LaserScan>(
"/scan",
rclcpp::SensorDataQoS(), std::bind(&LaserResender::scan_cb, this, _1));
}
using CallbackReturnT =
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
CallbackReturnT on_configure(const rclcpp_lifecycle::State & state)
{
RCLCPP_INFO(
get_logger(), "[%s] Configuring from [%s] state...",
get_name(),
state.label().c_str());
return CallbackReturnT::SUCCESS;
}
CallbackReturnT on_activate(const rclcpp_lifecycle::State & state)
{
RCLCPP_INFO(
get_logger(), "[%s] Activating from [%s] state...",
get_name(),
state.label().c_str());
pub_->on_activate();
return CallbackReturnT::SUCCESS;
}
CallbackReturnT on_deactivate(const rclcpp_lifecycle::State & state)
{
if (all_zero_error_) {
return CallbackReturnT::ERROR;
} else {
RCLCPP_INFO(
get_logger(), "[%s] Deactivating from [%s] state...",
get_name(),
state.label().c_str());
return CallbackReturnT::SUCCESS;
}
}
CallbackReturnT on_cleanup(const rclcpp_lifecycle::State & state)
{
RCLCPP_INFO(
get_logger(), "[%s] Cleanning Up from [%s] state...",
get_name(),
state.label().c_str());
return CallbackReturnT::SUCCESS;
}
CallbackReturnT on_shutdown(const rclcpp_lifecycle::State & state)
{
RCLCPP_INFO(
get_logger(), "[%s] Shutting Down from [%s] state...",
get_name(),
state.label().c_str());
return CallbackReturnT::SUCCESS;
}
CallbackReturnT on_error(const rclcpp_lifecycle::State & state)
{
RCLCPP_ERROR(
get_logger(), "[%s] Error processing from [%s] state...",
get_name(),
state.label().c_str());
return CallbackReturnT::SUCCESS;
}
void scan_cb(sensor_msgs::msg::LaserScan::ConstSharedPtr laser_scan)
{
if (get_current_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE) {
all_zero_error_ = true;
for (auto range : laser_scan->ranges) {
if (range != 0.0) {
all_zero_error_ = false;
break;
}
}
if (!all_zero_error_) {
pub_->publish(*laser_scan);
} else {
RCLCPP_WARN(
get_logger(),
"[%s] ALL-ZEROS. It has to go to error processing state", get_name());
trigger_transition(lifecycle_msgs::msg::Transition::TRANSITION_DEACTIVATE);
}
}
/* if (get_current_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED)
{
trigger_transition(lifecycle_msgs::msg::Transition::TRANSITION_CONFIGURE);
} */
}
private:
rclcpp_lifecycle::LifecyclePublisher<sensor_msgs::msg::LaserScan>::SharedPtr pub_;
rclcpp::Subscription<sensor_msgs::msg::LaserScan>::SharedPtr sub_;
bool all_zero_error_;
};
int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);
auto node = std::make_shared<LaserResender>();
rclcpp::spin(node->get_node_base_interface());
rclcpp::shutdown();
return 0;
}
|
3a84768076773b87b85bf106d8022cfaa46cb213
|
bf18adcb40cb7ae517890642cadf9ed6886ac818
|
/trial/testCostFunctor.cpp
|
831e933a01e4e15b1044143b07e5fdfd5348e578
|
[] |
no_license
|
Alegriabaile/My3dPhoto
|
c2709e219e334fe6f09c4cf00eaea76a76ba9696
|
5093fe88f8fcead541a1aee388b7f1f637adae3c
|
refs/heads/master
| 2022-05-14T18:56:39.401695
| 2020-01-16T14:05:37
| 2020-01-16T14:05:37
| 220,237,869
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,441
|
cpp
|
testCostFunctor.cpp
|
//
// Created by ale on 20-1-6.
//
#include "testCostFunctor.h"
void GeneralGraphDfnSfn(const cv::Mat &input, cv::Mat &output)
{
size_t width = input.cols;
size_t height = input.rows;
size_t num_pixels = width*height;
size_t num_labels = 10;//segmentation.
output = input.clone();
ExtraData extraData(input);
ExtraSmoothData extraSmoothData(input);
try{
GCoptimizationGeneralGraph *gc = new GCoptimizationGeneralGraph(num_pixels,num_labels);
gc->setDataCost(dataCostFunction, &extraData);
gc->setSmoothCost(smoothCostFunction, &extraSmoothData);
//set edges of relative pixels.
for(size_t h = 0; h < height; ++h)
for(size_t w = 0; w < width - 1; ++w)
gc->setNeighbors(h*width + w, h*width + w + 1);
for(size_t h = 0; h < height - 1; ++h)
for(size_t w = 0; w < width; ++w)
gc->setNeighbors(h*width + w, (h+1)*width + w);
printf("\nBefore optimization energy is %lld",gc->compute_energy());
gc->expansion(100);// run expansion for 2 iterations. For swap use gc->swap(num_iterations);
printf("\nAfter optimization energy is %lld",gc->compute_energy());
for(size_t h = 0; h < height; ++h)
for(size_t w = 0; w < width; ++w)
output.at<uchar>(h ,w) = gc->whatLabel(h*width + w)*64;
// output.at<uchar>(h ,w) = gc->whatLabel(h*width + w)>0?255:0;
delete gc;
}
catch (GCException e){
e.Report();
}
}
int main(int argc, char **argv)
{
cv::Mat input, output;
input = cv::imread("data/cameraman.png", CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH);
if(input.empty())
exit(-1);
std::cout<<"before convertTo(input, CV_8UC1): depth, channels: "<<input.depth()<<", "<<input.channels()<<std::endl;
input.convertTo(input, CV_8UC1);
std::cout<<"after convertTo(input, CV_8UC1): depth, channels: "<<input.depth()<<", "<<input.channels()<<std::endl;
//do segmentation...
GeneralGraphDfnSfn(input, output);
//simple threshold method.
cv::Mat output_2 = cv::Mat(input.size(), CV_8UC1, cv::Scalar(0));
output_2.setTo(255, input>128);
cv::imshow("output_2", output_2);
//original image.
cv::imshow("input", input);
//segmented image.
cv::imshow("output", output);
std::cout<<output<<std::endl;
// cv::waitKey();
return 0;
}
|
c76aa6f0794a9030d9ede5e31bfecf5ce3243100
|
990db72b1341e04b19da8306b00a8d7810cd193f
|
/SESniipes/Casting/const_cast.cpp
|
df8172a87d1b1ea93ad0fff4748f95ac054915d3
|
[] |
no_license
|
yashica-patodia/4thSemester
|
8f38266bf439991fdae009a0b4d62a8a400e18e5
|
19a806abbb8e657bb502648472169b3139dadfb5
|
refs/heads/main
| 2023-07-30T03:19:09.343893
| 2021-09-12T13:41:26
| 2021-09-12T13:41:26
| 405,651,496
| 4
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 784
|
cpp
|
const_cast.cpp
|
//read gfg
//moslty used to make const operator non-const
#include <iostream>
using namespace std;
class A
{
int i_;
public:
A(int i) : i_(i) {}
int get() const { return i_; }
void set(int j) { i_ = j; }
};
void print(char *str) { cout << str; }
int main()
{
const char *c = "sample text";
// print(c); // error: ’void print(char *)’: cannot convert argument 1
// from ’const char *’ to ’char *’
print(const_cast<char *>(c));
const A a(1);
a.get();
// a.set(5); // error: ’void A::set(int)’: cannot convert
// ’this’ pointer from ’const A’ to ’A &’
const_cast<A &>(a).set(5);
// const_cast<A>(a).set(5); // error: ’const_cast’: cannot convert
// from ’const A’ to ’A’
return 0;
}
|
c2c4d7b9f69c636c5110166a2226ad53e7303794
|
fb0602ab77d4d61e838d0093b587fcaa0045a7b8
|
/NAC/classes/Vektor2D.cpp
|
45afbf58e999b55c7dc2a132c3f8464bad655b4f
|
[] |
no_license
|
Toures/NAC
|
63e1edbcdc1074bd4f7a934fbadcc3a055a59d93
|
04569e6eb4fbbb17f2a40934c9e50ae054fc0e23
|
refs/heads/master
| 2021-01-10T15:14:29.118653
| 2015-10-29T12:31:45
| 2015-10-29T12:31:45
| 44,311,483
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 653
|
cpp
|
Vektor2D.cpp
|
#include "../headers/Vektor2D.h"
#include <iostream>
Vektor2D::Vektor2D(void)
{
}
Vektor2D::Vektor2D(int x, int y)
{
m_Element[0] = x;
m_Element[1] = y;
}
void Vektor2D::addiere(Vektor2D v) {
m_Element[0]+=v.m_Element[0];
m_Element[1]+=v.m_Element[1];
}
void Vektor2D::kopiereIn(Vektor2D* zielvar) {
zielvar->m_Element[0] = m_Element[0];
zielvar->m_Element[1] = m_Element[1];
}
void Vektor2D::ausgabe() {
std::cout << "Vektor2D: "; Matrix::ausgabe(); std::cout << std::endl;
}
Vektor2D::~Vektor2D(void)
{
}
//void tausche(Vektor2D* a, Vektor2D* b) {
// Vektor2D* temp;
// a->kopiereIn(temp);
// b->kopiereIn(a);
// temp->kopiereIn(b);
//}
|
6919cac79a34d74efd508834d2badd86cf4da0d5
|
bfd0ce1bf9e0b55c1132d978372093f84b0798b6
|
/Source/DungeonEscape/ObjectScaler.cpp
|
7b5c22b8219150dd106d27fb1d29a46a63440533
|
[] |
no_license
|
fseverijns/UE4_DungeonEscape
|
e2a29dd762043be57c31c868da979f37042a394b
|
b6587335ad1fbdfdfb8bdafaf7a365f98e4ca0f3
|
refs/heads/master
| 2022-11-12T18:43:56.509955
| 2020-06-17T14:09:43
| 2020-06-17T14:09:43
| 246,330,043
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,546
|
cpp
|
ObjectScaler.cpp
|
// Copyright Frank Severijns 2020
#include "ObjectScaler.h"
// Sets default values for this component's properties
UObjectScaler::UObjectScaler()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
// ...
}
// Called when the game starts
void UObjectScaler::BeginPlay()
{
Super::BeginPlay();
// ...
}
// Called every frame
void UObjectScaler::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
// ...
}
void UObjectScaler::Transform(float DeltaTime, bool& out_bTransformCompleted)
{
Super::Transform(DeltaTime, out_bTransformCompleted);
FVector CurrentScale = Object->GetRelativeScale3D();
FVector TargetScale = ObjectEndScale;
if(Acceleration == 0.0f)
{
Speed = TransformSpeed;
}
else
{
Speed += FMath::Clamp(Acceleration * DeltaTime, 0.01f, TransformSpeed);
}
if(bIsReversing)
{
TargetScale = ObjectStartScale;
}
FVector NewScale = FMath::Lerp(CurrentScale, TargetScale, DeltaTime * Speed);
out_bTransformCompleted = CurrentScale.Equals(TargetScale, CompletionErrorTolerance);
if(out_bTransformCompleted)
{
Speed = 0;
}
Object->SetRelativeScale3D(NewScale);
}
void UObjectScaler::OnPlayerRespawn()
{
Super::OnPlayerRespawn();
Object->SetRelativeScale3D(bDefaultState ? ObjectEndScale : ObjectStartScale);
}
|
50b1f3a744ba36e83ff6c578e86cf33d72dd5733
|
48f0afc743d93971f3bb5785374c4cab92e3412c
|
/processData.cpp
|
70f1e03cb31a5979864c34eaa016e5bb1b738127
|
[
"MIT"
] |
permissive
|
huyducnguyen1198/dsa_ass2
|
37d4f7d25000eea0c162c1e5552f325547ee8393
|
fbe9001ca1e174733ecc4a60436d92411aac3e3f
|
refs/heads/master
| 2023-01-20T02:27:39.069647
| 2018-06-20T04:02:20
| 2018-06-20T04:02:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 12,812
|
cpp
|
processData.cpp
|
/*
* =========================================================================================
* Name : processData.cpp
* Description : Student code for Assignment 2 - Data structures and Algorithms - Spring 2018
* =========================================================================================
*/
#include "requestLib.h"
#include "dbLib.h"
/// Initialize and Finalize any global data that you use in the program
bool avlCreated;
AVLTree<L1List<VRecord>> * recordData;
bool doubleCmp(double x, double y){
//unsigned long long int a = (unsigned long long int)(x*(10e13));
//unsigned long long int b = (unsigned long long int)(y*(10e13));
//if(a <= b) return true;
//else return false;
double diff = x - y;
if(fabs(diff) < 1e-13) return true;
else if(x < y)return true;
else return false;
}
//request shortened compare method
int eqCmp(L1List<VRecord> & a, L1List<VRecord> & b){
if(strcmp((a)[0].id,(b)[0].id) > 0) return 1;
else if(strcmp((a)[0].id,(b)[0].id) < 0) return -1;
else return 0;
}
//request processing function
enum requestCode{
_CYR, _CXR, _NYR, _NXR, _NPR, _NVR, _NRR, _CVP, _NRP
};
requestCode switchCase(std::string input){
if(strcmp(input.c_str(), "CYR") == 0){
//RY DY at params[0] an params[1]
return _CYR;
}else if(strcmp(input.c_str(), "CXR") == 0 ){
//RX DX at params[0] an params[1]
return _CXR;
}else if(strcmp(input.c_str(), "NYR") == 0){
//RY DY at params[0] an params[1]
return _NYR;
}else if(strcmp(input.c_str(), "NXR") == 0){
//RX DX at params[0] an params[1]
return _NXR;
}else if(strcmp(input.c_str(), "NPR") == 0){
return _NPR;
}else if(strcmp(input.c_str(), "NVR") == 0){
return _NVR;
}else if(strcmp(input.c_str(), "NRR") == 0){
return _NRR;
}else if(strcmp(input.c_str(), "CVP") == 0){
return _CVP;
}else if(strcmp(input.c_str(), "NRP") == 0){
return _NRP;
}
}
bool reqCmp(double para[REQUEST_CODE_SIZE], VRecord ¤tRec){
//return doubleCmp(distanceVR(currentRec.x,currentRec.y,para[1],para[0]),distanceVR(currentRec.x,currentRec.y,currentRec.x + para[3], currentRec.y + para[2]));
//return doubleCmp(distanceVR(currentRec.x,currentRec.y,para[1],para[0]),
//distanceVR(para[1],para[0],para[1] + para[3], para[0] + para[2]));
bool x = doubleCmp(para[1] - para[3], currentRec.x) && doubleCmp(currentRec.x, para[1] + para[3]);
bool y = doubleCmp(para[0] - para[2], currentRec.y) && doubleCmp(currentRec.y, para[0] + para[2]);
return x && y;
}
void CYR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
void CXR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
void NYR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
void NXR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
void NPR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
void NVR(double para[MAX_PARAM_SIZE],L1List<VRecord> * recList);
void NRR(double para[MAX_PARAM_SIZE],L1List<VRecord> * recList);
void CVP(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
void NRP(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recList);
bool initVGlobalData(void** pGData) {
// TODO: allocate global data if you think it is necessary.
/// pGData contains the address of a pointer. You should allocate data for the global data
/// and then assign its address to *pGData
::avlCreated = false;
return true;
}
void releaseVGlobalData(void* pGData) {
// TODO: release the data if you finish using it
}
bool processRequest(VRequest& request, L1List<VRecord>& recList, void* pGData) {
// TODO: Your code comes here
/// NOTE: The output of the request will be printed on one line
/// end by the end-line '\n' character.
if(!avlCreated){
recordData = new AVLTree<L1List<VRecord>>();
//using cur method to get record include init current and reset current
VRecord curRec;
recList.initCur();
while(recList.current(curRec)){
//std::cout<< curRec.y << "\n";
L1List<VRecord> * id, *currentRec = new L1List<VRecord>();
currentRec->insertHead(curRec);
if(recordData->find(*currentRec,id,&eqCmp)){
id->insertHead(curRec);
}else{
recordData->insert(*currentRec,&eqCmp);
}
}
recList.resetCur();
::avlCreated = true;
//std::cout<<"\n\n\n";
}
char requestStr[REQUEST_CODE_SIZE+1];
strcpy(requestStr,request.code);
for(int i = 0; i < REQUEST_CODE_SIZE; i++){
if(requestStr[i] == '_') requestStr[i] = ' ';
}
//get parameters and id and request
std::stringstream ss(requestStr);
char id[ID_MAX_LENGTH];
L1List<VRecord> * avlFind;
char token[5];
ss >> token;
if(strcmp(token, "NVR") == 0 || strcmp(token,"NRR") == 0){
ss >> request.params[0] >> request.params[1] >>request.params[2] >> request.params[3] ;
}else{
VRecord find;
ss >> find.id >> request.params[0] >> request.params[1] >>request.params[2] >> request.params[3] ;
//get the linkedlist of id
//findRet = 0x0;
avlFind = new L1List<VRecord>();
avlFind->insertHead(find);
recordData->find(*avlFind,avlFind,&eqCmp);
//strcpy(find.id,id);
}
switch(switchCase(token)){
case _CYR:{
//RY DY at params[0] an params[1
CYR(request.params,avlFind);
break;
}
case _CXR:{
//RX DX at params[0] an params[1]
CXR(request.params,avlFind);
break;
}
case _NYR:{
//RY DY at params[0] an params[1]
NYR(request.params,avlFind);
break;
}
case _NXR:{
//RX DX at params[0] an params[1]
NXR(request.params,avlFind);
break;
}
case _NPR:{
NPR(request.params,avlFind);
break;
}
case _NVR:{
NVR(request.params, (&recList));
break;
}
case _NRR:{
NRR(request.params,(&recList));
return true;
}
case _NRP:{
NRP(request.params,avlFind);
break;
}
case _CVP:{
CVP(request.params,avlFind);
break;
}
default: return false; break;
}
return true;
}
void CYR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
bool found = false;
recordList->initCur();
VRecord currentRec;
while(recordList->current(currentRec)){
if(doubleCmp(para[0] - para[1], currentRec.y) &&
doubleCmp(currentRec.y, para[0] + para[1])) {//R - Delta_y <= P_y <= R + Delta_y
found = true;
break;
}
}
recordList->resetCur();
std::cout<< "CYR " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<":";
if(found){
std::cout<< " Success\n";
}else std::cout<< " Failed\n";
}
void CXR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
bool found = false;
recordList->initCur();
VRecord currentRec;
while(recordList->current(currentRec)){
if(doubleCmp(para[0] - para[1], currentRec.x) &&
doubleCmp(currentRec.x, para[0] + para[1])) {//R - Delta_y <= P_y <= R + Delta_y
found = true;
break;
}
}
recordList->resetCur();
std::cout<< "CXR " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<":";
if(found){
std::cout<< " Success\n";
}else std::cout<< " Failed\n";
}
void NYR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
bool found = false;
recordList->initCur();
VRecord currentRec;
int number = 0;
while(recordList->current(currentRec)){
if(doubleCmp(para[0] - para[1], currentRec.y) &&
doubleCmp(currentRec.y, para[0] + para[1])) {//R - Delta_y <= P_y <= R + Delta_y
number++;
}
}
recordList->resetCur();
std::cout<< "NYR " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<":" << number <<"\n";
}
void NXR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
bool found = false;
recordList->initCur();
VRecord currentRec;
int number = 0;
while(recordList->current(currentRec)){
if(doubleCmp(para[0] - para[1], currentRec.x) &&
doubleCmp(currentRec.x, para[0] + para[1])) {//R - Delta_y <= P_y <= R + Delta_y
number++;
}
}
recordList->resetCur();
std::cout<< "NXR " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<":" << number <<"\n";
}
void NPR(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
recordList->initCur();
VRecord currentRec;
int number = 0, pre = 0, cur = 0;
while(recordList->current(currentRec)){
std::string curId(currentRec.id), * ret;
if(reqCmp(para, currentRec)){
if(cur == 0){
pre = cur;
cur = 1;
}
}else{
if(cur == 1 && pre ==0) number++;
pre = cur;
cur = 0;
}
}
std::cout<< "NPR " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<" "<<para[2]<<" "<<para[3]<<": " << number <<"\n";
}
// this cmp funtion is for NVR only
int NVRCmp(std::string & a, std::string &b){
if(strcmp(a.c_str(),b.c_str())> 0) return 1;
else if(strcmp(a.c_str(),b.c_str())<0) return -1;
else return 0;
}
bool NVR_(double para[MAX_PARAM_SIZE],L1List<VRecord> * recordList){
recordList->initCur();
VRecord currentRec;
/*int number = 0, pre , cur ;
if(recordList->current(currentRec)){
if(reqCmp(para, currentRec)){ pre = 1; cur = 1;}
else{ pre = 0 ; cur = 0;}
}
while(recordList->current(currentRec)){
std::string curId(currentRec.id), * ret;
if(reqCmp(para, currentRec)){
if(cur == 0){
pre = cur;
cur = 1;
}
}else{
pre = cur;
cur = 0;
if(pre == 1 && cur == 0) number++;
}
}
if(cur == 1 && pre == 0) number++;*/
while(recordList->current(currentRec)){
if(reqCmp(para, currentRec)) return true;
}
return false;
}
int NVRNum;
void NVR_traverse(double para[MAX_PARAM_SIZE], L1List<VRecord> &recordList ){
if(NVR_(para, &recordList)) ::NVRNum++;
}
void NVR(double para[MAX_PARAM_SIZE],L1List<VRecord> * recordList){
recordList->initCur();
VRecord currentRec;
int number = 0;
::NVRNum = 0;//traverse method
/*
AVLTree<std::string> * idTree = new AVLTree<std::string>();
while(recordList->current(currentRec)){
if(reqCmp(para, currentRec)){
std::string curId(currentRec.id), * ret;
if(!(idTree->find(curId, ret, &NVRCmp))){
idTree->insert(curId, &NVRCmp);
number++;
}
}
}
recordList->resetCur();*/
recordData->traverseNLR(para, &NVR_traverse);
std::cout<< "NVR "<<para[0]<<" "<<para[1]<<" "<<para[2]<<" "<<para[3]<<": " << ::NVRNum<<" "<<"\n";
}
void NRR(double para[MAX_PARAM_SIZE],L1List<VRecord> * recordList){
recordList->initCur();
VRecord currentRec;
int cnt = 0;
int number = 0;
while(recordList->current(currentRec)){
if(reqCmp(para, currentRec)){//R - Delta_y <= P_y <= R + Delta_y
number++;
}
}
recordList->resetCur();
std::cout<< "NRR "<<para[0]<<" "<<para[1]<<" "<<para[2]<<" "<<para[3]<<": " << number<<"\n";
}
void CVP(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
bool found = false;
recordList->initCur();
VRecord currentRec;
while(recordList->current(currentRec)){
if(reqCmp(para, currentRec)){//R - Delta_y <= P_y <= R + Delta_y
found = true;
break;
}
}
recordList->resetCur();
std::cout<< "CVP " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<" "<<para[2]<<" "<<para[3]<<":";
if(found){
std::cout<< " Success\n";
}else std::cout << " Failed\n";
}
void NRP(double para[MAX_PARAM_SIZE],L1List<VRecord> * &recordList){
L1List<VRecord> *curRec = new L1List<VRecord>();
recordList->initCur();
VRecord currentRec;
int number = 0;
while(recordList->current(currentRec)){
if(reqCmp(para, currentRec)){
number++;
}
}
recordList->resetCur();
std::cout<< "NRP " << (*recordList)[0].id << " "<<para[0]<<" "<<para[1]<<" "<<para[2]<<" "<<para[3]<<":" << number <<"\n";
}
|
e8d7eab67024af26c74849ddd97c209d55d160a2
|
2a2093b6a596544053cc49592a9282c970f34c78
|
/NpCapTest/NpCapFile.h
|
83a7702e308ff28bcc937ee55e10687a7b950790
|
[] |
no_license
|
ideic/npcapTest
|
60bd19e5a1c3733aaba378ac38d922a4921ed3ff
|
36c60821d380bf2f07c5e774abdd98a1969da7a7
|
refs/heads/master
| 2020-04-07T09:11:39.129355
| 2018-11-21T15:33:32
| 2018-11-21T15:33:32
| 158,243,578
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 492
|
h
|
NpCapFile.h
|
#pragma once
#include <string>
#include <functional>
#include <pcap.h>
class NpCapFile
{
public:
NpCapFile() = default;
NpCapFile(std::string file);
NpCapFile(const NpCapFile& from);
NpCapFile operator=(const NpCapFile& from);
~NpCapFile();
bool PrepareForRead();
void FinishRead();
const bool NextData(const u_char **pkt_data, bpf_u_int32 &size);
bool SetFilter(std::string filter);
private:
std::string file{};
std::unique_ptr<pcap_t, std::function<void(pcap_t*)>> pcap;
};
|
30a0b07fa003e3dd0533c2f8811492b8b30fef5f
|
4b1d3ffdc601fc19327f5e262ada845e8d8244c7
|
/Worker.h
|
af1c508b8bf624814288841041e11f3d69fcb78f
|
[] |
no_license
|
Peterliang233/EMS-baseon-cpp
|
484a5efabac675b77288b8e26cc4793264e08690
|
e1eaca0ccce15c0878ba886a0121d290bf075248
|
refs/heads/main
| 2023-01-11T21:28:57.454097
| 2020-11-20T01:13:20
| 2020-11-20T01:13:20
| 301,591,829
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 265
|
h
|
Worker.h
|
#pragma once
#include<iostream>
#include<string>
using namespace std;
class Worker { //定义一个主类
public:
int m_id;
string name;
int depart;
virtual void show_infor() = 0;
//获取个人信息
virtual string get_depart() = 0;
//获取所在部门
};
|
c4e375f2b771792163f700f3b28e36ad05a297a6
|
bbb886b55bfb95dbce854d4aa5592044e6ad0da0
|
/OpenRoboVision/src/vision/camera_vi.cpp
|
5473de6692d5cd82e3c0aa56f12a37a8d44af9ca
|
[] |
no_license
|
noonv/openrobovision
|
e68088c0deea39d518b1a7cb26125d8d74cca5de
|
1e39f934ccfa5202e1e1aefe888bdb1144293e5a
|
refs/heads/master
| 2021-01-13T01:40:26.828993
| 2015-03-13T09:48:39
| 2015-03-13T09:48:39
| 32,135,945
| 0
| 0
| null | null | null | null |
WINDOWS-1251
|
C++
| false
| false
| 1,661
|
cpp
|
camera_vi.cpp
|
//
// OpenRoboVision
//
// object for get frames from camera via videoInput library
//
// объект для получения картинки с видеокамеры
// через библиотеку videoInput
//
//
// robocraft.ru
//
#if defined(USE_OPENCV) && defined(WIN32) && defined(USE_VIDEOINPUT_LIB)
#include "orv/vision/camera_vi.h"
CameraVI::CameraVI():
rate(0),
device(0)
{
init();
}
CameraVI::CameraVI(int _width, int _height, int _rate, int _device):
rate(0),
device(0)
{
width = _width;
height = _height;
rate = _rate;
device = _device;
init();
}
CameraVI::~CameraVI()
{
this->end();
}
// инициализация
void CameraVI::init()
{
int numDevices = VI.listDevices();
if(rate)
{
VI.setIdealFramerate(device, rate); // установка частоты кадров
}
VI.setupDevice(device, width, height);
frame = cvCreateImage(cvSize(VI.getWidth(0),VI.getHeight(0)), IPL_DEPTH_8U, 3);
}
// получение следующего кадра
void CameraVI::update()
{
if (VI.isFrameNew(device))
{
VI.getPixels(device, (unsigned char *)frame->imageData, false, true);
if(show_capture)
{
cvShowImage(window_name, frame);
}
}
}
// прекратить видеозахват
void CameraVI::end()
{
remove_frame();
VI.stopDevice(device);
}
// показать окошко с настройками камеры
void CameraVI::showCameraSettings()
{
VI.showSettingsWindow(device);
}
int CameraVI::getWidth()
{
return VI.getWidth(device);
}
int CameraVI::getHeight()
{
return VI.getHeight(device);
}
#endif //#if defined(USE_OPENCV) && defined(WIN32) && defined(USE_VIDEOINPUT_LIB)
|
b7f64f03820a4d764cf627bb22488d350293c963
|
1a1aec2664616e826c3ecc3f8669cabe9e61f6aa
|
/fio_test03_2_BlueToothSerial/fio_test03_2_BlueToothSerial.ino
|
5d98bf29b9a6f79cb39f8325309f5a8923d351e8
|
[] |
no_license
|
AkihiroMasuda/Arduino
|
5233076a1b2d16bd2747ba7ae4e92b883844f227
|
a3c95d8aecbdae051359dec96db8771cd2754cdf
|
refs/heads/master
| 2021-01-10T19:34:22.758464
| 2014-01-13T15:06:14
| 2014-01-13T15:06:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,151
|
ino
|
fio_test03_2_BlueToothSerial.ino
|
#include <SoftwareSerial.h>
#define BLUETOOTH_RX_PIN (7)
#define BLUETOOTH_TX_PIN (12)
SoftwareSerial mySerial(BLUETOOTH_RX_PIN,BLUETOOTH_TX_PIN);
int count = 0;
char str[128];
void setup()
{
Serial.begin(9600);
mySerial.begin(9600); //BlueTooth用のシリアルポート
count = 0;
}
void loop()
{
//BlueToothポートへの書き込み
sprintf(str, "cnt:%03d", count);
mySerial.println(str);
count++;
//標準シリアルポートにデータ書き込まれたら、それをBlueToothの方へ転送する。
if (Serial.available()){
mySerial.write(Serial.read());
}
// BlueToothポートに書き込まれたら標準シリアルポートに転送。
// 2012/09/04 現在では失敗。
if (mySerial.available()){
Serial.println("hogehoge");
mySerial.println("read:");
char c = 0;
while((c = mySerial.read())!=-1){
mySerial.write(c); //リードしないとバッファに溜まったままなので注意
}
mySerial.write("\n");
}
Serial.println("xx");
ledLoop();
}
void ledLoop(){
digitalWrite(13,HIGH);
delay(200);
digitalWrite(13,LOW);
delay(200);
}
|
2b7e2cb9e674ca092d6d6131283f3e3635829052
|
4625d6279a210f387130a052ca2b74d6aae15989
|
/examples/First_Project/ggHllllSMEFT/Utilities/VetoPrefactors/JetVetoParameters.inc
|
bb55fc5d497e8e30643481ecbf78ae33eaec7dbf
|
[
"MIT"
] |
permissive
|
JaySandesara/madminer
|
0b2803fadbd264551fbf074797edb8f28a470d16
|
c5fcb9fbbd5d70f7a07114e4ea6afc4e3c4518fb
|
refs/heads/master
| 2020-09-11T21:06:52.559765
| 2019-11-18T19:29:01
| 2019-11-18T19:29:01
| 222,189,954
| 0
| 0
|
MIT
| 2019-11-17T03:08:30
| 2019-11-17T03:08:29
| null |
UTF-8
|
C++
| false
| false
| 366
|
inc
|
JetVetoParameters.inc
|
double precision JETRADIUS, ptjmax
double precision MuScalefactor, MuMScalefactor, mode
COMPLEX MuHScalefactor
parameter (JETRADIUS= 0.40d0)
parameter (ptjmax= 20.00d0)
parameter (MuScalefactor= 1.00d0)
parameter (MuHScalefactor= 1.00d0)
parameter (MuMScalefactor= 1.00d0)
parameter (mode=1)
|
56d8a3fb26f5a87b20eb8cc255dc1a6b916f01ec
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5636311922769920_0/C++/dussel/quald.cpp
|
9dcc8de77656c8960d390149b12ee8af42f45337
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,669
|
cpp
|
quald.cpp
|
/* attention to overflow */
#include <bits/stdc++.h>
#define dump(x) cerr<< #x << " = " << x <<endl
#define ALL(container) (container).begin(),(container).end()
using namespace std;
const int INF = 1 << 25;
void io() { cin.tie(0); ios::sync_with_stdio(false);}
template <class S,class T> ostream& operator<<(ostream& os, const pair <S,T> &s){return os<<'('<<s.first<<','<<s.second<<')';}
/*printf("%.9Lf\n",cf);*/
const int MOD = 1000000007;
const double EPS=1e-8;
string cs(int n){ return "Case #"+to_string(n)+": "; }
int main() {
io();
int T;
cin>>T;
string bad="IMPOSSIBLE";
for(int tr=1;tr<=T;tr++){
long long K,C,S;
cin>>K>>C>>S;
if(C*S<K){
cout<<cs(tr)<<bad<<endl;
}else{
vector <long long> pos(S,1);
long long up=pow(K,C);
long long tmp=up;
long long now=0;
while(now<K){
tmp/=K;
for(long long i=0;i<S;i++){
pos[i]+=tmp*now;
now++;
if(now==K) break;
}
}
cout<<cs(tr);
for(int i=0;i<pos.size();i++){
cout<<pos[i];
if(i!=pos.size()-1) cout<<' ';
}
cout<<endl;
}
/*if(C*S<K){
cout<<cs(tr)<<bad<<endl;
}else{
long long up=pow(K,C);
//cout<<"up: "<<up<<endl;
vector <long long> val;
cout<<cs(tr);
for(long long i=0;i<S;i++){
long long tmp=up;
long long pos=0;
for(long long j=i*C;j<(i+1)*C;j++){
tmp/=K;
//cout<<j<<' '<<tmp<<' '<<j*tmp<<endl;
if(j*tmp>up) break;
pos+=j*tmp;
if(pos>up || j+1==K) break;
}
if(pos>up) break;
val.push_back(pos+1);
if((i+1)*C>=K) break;
}
for(int i=0;i<val.size();i++){
cout<<val[i];
if(i!=val.size()-1) cout<<' ';
}
cout<<endl;
}*/
}
return 0;
}
|
b5c949bd71ed1a46ab1e6682e8067eb40d8f1396
|
7d2fdb5e5810f1efaad664f1748b99b44cfa6226
|
/include/loader/HTMLDump.h
|
d71ca02fe823d28bf71b84d859b69f4c9431e25c
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
sbowman-mitre/FMACM
|
cdbba63a735134cdc5a0a2c6ecdf538ecf2c9ba0
|
510e8c23291425c56a387fadf4ba2b41a07e094d
|
refs/heads/master
| 2020-03-21T16:38:34.503499
| 2018-06-27T18:02:37
| 2018-06-27T18:02:37
| 138,783,016
| 0
| 0
|
Apache-2.0
| 2018-06-26T19:21:54
| 2018-06-26T19:21:54
| null |
UTF-8
|
C++
| false
| false
| 1,394
|
h
|
HTMLDump.h
|
// ****************************************************************************
// NOTICE
//
// This is the copyright work of The MITRE Corporation, and was produced
// for the U. S. Government under Contract Number DTFAWA-10-C-00080, and
// is subject to Federal Aviation Administration Acquisition Management
// System Clause 3.5-13, Rights In Data-General, Alt. III and Alt. IV
// (Oct. 1996). No other use other than that granted to the U. S.
// Government, or to those acting on behalf of the U. S. Government,
// under that Clause is authorized without the express written
// permission of The MITRE Corporation. For further information, please
// contact The MITRE Corporation, Contracts Office, 7515 Colshire Drive,
// McLean, VA 22102-7539, (703) 983-6000.
//
// Copyright 2018 The MITRE Corporation. All Rights Reserved.
// ****************************************************************************
#pragma once
#include <string>
#include <fstream>
class HTMLDump
{
public:
static void SetSoftwareVersion(const std::string &version);
HTMLDump(void);
~HTMLDump(void);
bool open(const std::string &file_name);
void close();
void dump(const std::string &data);
void highlight_on(const std::string& color);
void highlight_off();
bool is_open()
{
return NULL != dump_file_name;
}
private:
static std::string SoftwareVersion;
std::ofstream dump_file_name;
};
|
c32b693f6552c1d6cc31320ea81ddfed05ffbb77
|
56c11c2c4e0ef9752ccf9118825dec1a58787491
|
/7_Exceptions/1_ZeroNegative.cpp
|
78da9de3a6de4bc27fb839476d79d7fac39653a8
|
[] |
no_license
|
Ocvcorp/PR60Cplusplus
|
79a1e2029756975f2ec81e01924609a6b2657aaf
|
33aaf6dbe148a12d6d0beb5500a9707096a089f5
|
refs/heads/master
| 2021-02-07T03:08:23.119140
| 2020-08-14T21:40:34
| 2020-08-14T21:40:34
| 243,975,688
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 499
|
cpp
|
1_ZeroNegative.cpp
|
#include <iostream>
using namespace std;
void f(int b) {
if (b == 0) throw 5;
if (b < 0) throw 5.0;
if (b = 'A') throw "hhh";
}
int main() {
int a, b;
while (1)
{
cout << "input a, b: ";
cin >> a >> b;
try {
f(b);
cout << "The result: " << a / b << endl;
}
catch (int n) { cout << "Zero value. " << n << endl; }
catch (double n) { cout << "Negative value. " << n << endl; }
catch (...) { cout << "Other type exception " << endl; }
}
system("pause");
return 0;
}
|
18ea9dd27c7815cf2dd71d774f1aecdcf88d73b0
|
df2f2c89943e42743510bab97f30423018f94db1
|
/src/types.hpp
|
68d5ce0a25c3e5c5d4ffecbf4780281e106ccb73
|
[
"MIT"
] |
permissive
|
chiefstone/eaOpcUa
|
5a6a2ef111f51beaddc0b7d5b9a606cc03f6d97b
|
48f66bbf98a8894fdeae91ae985ce921c58eb55a
|
refs/heads/master
| 2022-04-07T06:05:44.878206
| 2020-02-21T11:19:02
| 2020-02-21T11:19:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,473
|
hpp
|
types.hpp
|
#ifndef EAOPCUA_TYPES_HPP
#define EAOPCUA_TYPES_HPP
#include <map>
#include <vector>
#include <mutex>
#include "open62541/types.h"
#include <functional>
#include "string_split.hpp"
struct address {
std::uint16_t byte = 0;
std::uint8_t bit = 0;
enum Feldtyp {
EIN, AUS, SPE
};
Feldtyp ftyp = EIN;
enum Type {
BYTE_ADDRESS, BIT_ADDRESS
};
Type Typ = BYTE_ADDRESS;
enum Datatype {
Bit, Byte, Int16, UInt16
};
Datatype datatype;
bool schreibbar = false;
static const std::map<std::string, Datatype> DatatypeFromString;
static const std::map<Datatype, std::string> DataTypeToString;
static const std::map<std::string, address::Feldtyp> FeldtypFromString;
static const std::map<address::Feldtyp, std::string> StringFromFeldtyp;
void* v = nullptr;
address() = default;
explicit address(const std::string& adr, const std::string& d){
std::vector<std::string> s_parts = string_split(adr, {'.', ':'});
byte = (std::uint16_t)std::stoi(s_parts[1]);
switch(s_parts.size()){
case 2:{
break;
}
case 3:{
Typ = BIT_ADDRESS;
bit = (std::uint8_t)std::stoi(s_parts[2]);
break;
}
default:{
}
}
ftyp = FeldtypFromString.at(s_parts[0].substr(0, 1));
datatype = address::DatatypeFromString.at(d);
switch(datatype){
case address::Datatype::Bit: {
v = calloc(1, sizeof(UA_Boolean));
break;
}
case address::Datatype::Byte: {
v = calloc(1, sizeof(UA_Byte));
break;
}
case address::Datatype::Int16: {
v = calloc(1, sizeof(UA_Int16));
break;
}
case address::Datatype::UInt16: {
v = calloc(1, sizeof(UA_UInt16));
break;
}
default: break;
}
}
std::string toString(){
std::string r = std::to_string(byte);
if(Typ == BIT_ADDRESS) r += "." + std::to_string(bit);
return r;
}
};
const std::map<std::string, address::Datatype> address::DatatypeFromString = {{"BOOL", Bit}, {"BYTE", Byte}, {"WORD", UInt16}, {"INT", Int16}};
const std::map<address::Datatype, std::string> address::DataTypeToString = {{Bit, "BOOL"}, {Byte, "BYTE"}, {UInt16, "WORD"}, {Int16, "INT"}};
const std::map<std::string, address::Feldtyp> address::FeldtypFromString = {{"I", address::Feldtyp::EIN}, {"Q", address::Feldtyp::AUS}, {"M", address::Feldtyp::SPE}};
const std::map<address::Feldtyp, std::string> address::StringFromFeldtyp = {{address::Feldtyp::EIN, "I"}, {address::Feldtyp::AUS, "Q"}, {address::Feldtyp::SPE, "M"}};
struct operation {
std::map<std::string, address>* io_addresses;
enum Type {
Int32, UInt32, Boolean, Double, String
};
Type Typ;
static const std::map<operation::Type, size_t> SizeFromType;
std::vector<std::string> input, param;
void* v = nullptr;
std::function<void(operation*)> op;
operation(operation::Type d, std::map<std::string, address>* io, std::function<void(operation*)> op_, std::vector<std::string> input_, std::vector<std::string> param_){
io_addresses = io;
Typ = d;
op = op_;
input = input_;
param = param_;
v = calloc(1, operation::SizeFromType.at(d));
}
};
const std::map<operation::Type, size_t> operation::SizeFromType = {{Int32, sizeof(UA_Int32)}, {UInt32, sizeof(UA_UInt32)}, {Boolean, sizeof(UA_Boolean)}, {Double, sizeof(UA_Double)}, {String, sizeof(UA_String)}};
#endif //EAOPCUA_TYPES_HPP
|
806478ea86aee5630226dba97b0906740be22b90
|
26bc498c752e59b3954113ca856e5807364c135e
|
/include/config.h
|
e012948c95a0f25ccbc5cfc83140af3ba7b7e5db
|
[
"Apache-2.0"
] |
permissive
|
NCAR/nimbus
|
ac8cbe30e9ca27f53dff6a37642dccd6e8549cde
|
9866f7b648bdda95afc80fb2ff11f7b970c2eeb2
|
refs/heads/master
| 2023-07-20T21:52:25.700742
| 2023-07-11T23:06:35
| 2023-07-11T23:06:35
| 155,920,551
| 4
| 1
| null | 2019-05-18T16:39:51
| 2018-11-02T20:55:07
|
C
|
UTF-8
|
C++
| false
| false
| 9,830
|
h
|
config.h
|
/*
-------------------------------------------------------------------------
OBJECT NAME: config.h
DESCRIPTION: Header File declaring Variable and associated processing
functions.
NOTE: ProcessingRate vs. HRT_Rate, there used to only be 1 HRT,
25Hz. I couldn't easily roll the new 50Hz into
ProcessingRate, hence the new member HRTRate().
-------------------------------------------------------------------------
*/
#ifndef _congig_h_
#define _congig_h_
#include <string>
class Config
{
public:
enum aircraft
{
ELECTRA=308, KINGAIR=312, SABRELINER=307, C130=130, SAILPLANE=9929,
NOAA_G4=49, HIAPER=677, NRL_P3=303, B57=357, TECHS=300, TADS=600
};
enum ADSVersion { ADS_2, ADS_3 };
enum processingMode { PostProcessing, RealTime };
enum interpolationType { Linear=0, CubicSpline, AkimaSpline };
enum processingRate { SampleRate=0, LowRate=1, HighRate=25 };
enum hrtRate { TwentyFive=25, Fifty=50, OneHundred=100 };
enum groundFeedType { LDM, UDP };
enum calibrationMode { NIDAS, NIMBUS };
enum pms2dProcessing { Entire_In=0, Center_In, Reconstruction };
Config();
bool Interactive() const { return _interactive; }
bool Despiking() const { return _despiking; }
bool TimeShifting() const { return _timeShifting; }
bool BlankoutVariables() const { return _blankout; }
bool QCenabled() const { return _qcEnabled; }
bool ProductionRun() const { return _productionRun; }
bool WarnTimeLags() const { return _warnTimeLags; }
bool OutputNetCDF() const { return _outputNetCDF; }
bool OutputSQL() const { return _outputSQL; }
bool TransmitToGround() const { return _transmitToGround; }
bool EnableBroadcast() const { return _enableBroadcast; }
int GroundFeedDataRate() const { return _transmitRate; }
bool AsyncFileEnabled() const { return _asyncFileEnabled; }
bool LoadProductionSetup() const { return _loadProductionSetup; }
bool HoneyWellCleanup() const { return _honeywellCleanup; }
bool InertialShift() const { return _inertialShift; }
bool CreateKMLFile() const { return _googleEarth; }
bool CreateNavFile() const { return _iwgadts; }
bool DespikeReporting() const { return _despikeReporting; }
bool LagReporting() const { return _lagReporting; }
int ZeroBinOffset() const { return _zeroBinOffset; }
bool isADS2() const { return _adsVersion == ADS_2; }
bool isADS3() const { return _adsVersion == ADS_3; }
aircraft Aircraft() { return _aircraft; }
std::string AircraftString();
processingMode ProcessingMode() const { return _mode; }
processingRate ProcessingRate() const { return _processingRate; }
hrtRate HRTRate() const { return _hrtRate; }
interpolationType InterpolationType() const { return _interpType; }
groundFeedType GroundFeedType() const { return _groundFeedType; }
calibrationMode CalibrationsAppliedBy() const { return _calibrations; }
pms2dProcessing TwoDProcessingMethod() const { return _pms2dProcessing; }
float TwoDAreaRejectRatio() const { return _twoDrejectRatio; }
void SetInteractive(bool state) { _interactive = state; }
void SetProductionRun(bool state) { _productionRun = state; }
void SetWarnTimeLags(bool state) { _warnTimeLags = state; }
void SetDespiking(bool state) { _despiking = state; }
void SetTimeShifting(bool state) { _timeShifting = state; }
void SetBlankoutVariables(bool state) { _blankout = state; }
void SetQCenabled(bool state) { _qcEnabled = state; }
void SetOutputNetCDF(bool state) { _outputNetCDF = state; }
void SetOutputSQL(bool state) { _outputSQL = state; }
void SetTransmitToGround(bool state) { _transmitToGround = state; }
void SetEnableBroadcast(bool state) { _enableBroadcast = state; }
void SetGroundFeedDataRate(int rate) { _transmitRate = rate; }
void SetAsyncFileEnabled(bool state) { _asyncFileEnabled = state; }
void SetLoadProductionSetup(bool state) { _loadProductionSetup = state; }
void SetHoneyWellCleanup(bool state) { _honeywellCleanup = state; }
void SetInertialShift(bool state) { _inertialShift = state; }
void SetCreateKMLFile(bool state) { _googleEarth = state; }
void SetCreateNavFile(bool state) { _iwgadts = state; }
void SetAircraft(aircraft ac) { _aircraft = ac; }
void SetAircraft(int ac) { _aircraft = (aircraft)ac; }
void SetProcessingMode(processingMode state) { _mode = state; }
void SetProcessingRate(processingRate pr) { _processingRate = pr; }
void SetHRTRate(hrtRate rate) { _hrtRate = rate; }
void SetInterpolationType(interpolationType it) { _interpType = it; }
void SetGroundFeedType(groundFeedType type) { _groundFeedType = type; }
void SetCalibrationsToBeAppliedBy(calibrationMode c) { _calibrations = c; }
void SetDespikeReporting(bool state) { _despikeReporting = state; }
void SetLagErrorReporting(bool state) { _lagReporting = state; }
void SetADSVersion(ADSVersion nv) { _adsVersion = nv; }
const std::string& ProjectDirectory() const { return _projectDirectory; }
const std::string& ProjectName() const { return _projectName; }
const std::string& ProjectNumber() const { return _projectNumber; }
const std::string& TailNumber() const { return _tailNumber; }
const std::string& NIDASrevision() const { return _nidasRevision; }
const std::string& ProjectDirectoryRevision() const { return _projDirRevision; }
const std::string& ProjectDirectoryStatus() const { return _projDirStatus; }
const std::string& ProjectRepoURL() const { return _projRepoURL; }
const std::string& FlightNumber() const { return _flightNumber; }
const std::string& FlightDate() const { return _flightDate; }
const std::string& ADSfileExtension() const { return _adsFileExtension; }
const std::string& Checksum() const { return _checksum; }
void SetProjectDirectory(const std::string s) { _projectDirectory = s; }
void SetProjectName(const std::string s) { _projectName = s; }
void SetProjectNumber(const std::string s) { _projectNumber = s; }
void SetProjectDirectoryRevision(const std::string s) { _projDirRevision = s; }
void SetProjectDirectoryStatus(const std::string s) { _projDirStatus = s; }
void SetProjectRepoURL(const std::string s) { _projRepoURL = s; }
void SetTailNumber(const std::string s) { _tailNumber = s; }
void SetFlightNumber(const std::string s) { _flightNumber = s; }
void SetFlightDate(const std::string s);
void SetNIDASrevision(const std::string s) { _nidasRevision = s; }
void SetChecksum(const std::string s) { _checksum = s; }
void SetLegacyZeroBin(int z) { _zeroBinOffset = z; }
std::string CoordinateLatitude() const { return _coordLAT; }
std::string CoordinateLongitude() const { return _coordLON; }
std::string CoordinateAltitude() const { return _coordALT; }
std::string CoordinateTime() const { return _coordTime; }
std::string WindFieldVariables() const
{ return _windWS + " " + _windWD + " " + _windWI; }
void SetCoordLAT(const std::string s) { _coordLAT = s; }
void SetCoordLON(const std::string s) { _coordLON = s; }
void SetCoordALT(const std::string s) { _coordALT = s; }
void SetCoordTime(const std::string s) { _coordTime = s; }
void SetWindSpeed(const std::string s) { _windWS = s; }
void SetWindDirection(const std::string s) { _windWD = s; }
void SetWindVertical(const std::string s) { _windWI = s; }
void SetTwoDProcessingMethod(pms2dProcessing p) { _pms2dProcessing = p; }
void SetTwoDAreaRejectRatio(float f) { _twoDrejectRatio = f; }
interpolationType DefaultInterpolationType();
pms2dProcessing DefaultPMS2DProcessingMethod();
float DefaultPMS2DAreaRatioReject();
void SetSorterLength(int seconds) { _sorterLength = seconds; }
int GetSorterLength() { return _sorterLength; }
private:
bool _interactive;
bool _productionRun;
bool _warnTimeLags;
bool _despiking;
bool _timeShifting;
bool _blankout;
bool _qcEnabled;
bool _outputNetCDF;
bool _outputSQL;
bool _transmitToGround;
bool _enableBroadcast;
bool _asyncFileEnabled;
bool _loadProductionSetup;
bool _honeywellCleanup;
bool _inertialShift;
bool _googleEarth;
bool _iwgadts;
bool _despikeReporting;
bool _lagReporting;
int _transmitRate;
aircraft _aircraft;
ADSVersion _adsVersion;
processingMode _mode;
processingRate _processingRate;
hrtRate _hrtRate;
interpolationType _interpType;
groundFeedType _groundFeedType;
calibrationMode _calibrations; // cals to be applied by nimbus or nidas.
std::string _projectDirectory;
// Some meta-data.
std::string _projectName;
std::string _projectNumber;
std::string _tailNumber;
std::string _flightNumber;
std::string _flightDate;
std::string _nidasRevision;
std::string _projRepoURL;
std::string _projDirRevision;
std::string _projDirStatus;
std::string _adsFileExtension;
std::string _checksum;
std::string _coordLAT;
std::string _coordLON;
std::string _coordALT;
std::string _coordTime;
std::string _windWS; // Wind Speed variable
std::string _windWD; // Wind Direction variable
std::string _windWI; // Vertical Wind variable
pms2dProcessing _pms2dProcessing;
/* % of pixels which must be shaded inside particle bounding box.
*/
float _twoDrejectRatio;
// Length in seconds of the nidas processed sample sorter.
int _sorterLength;
/* Are we using legacy size distribution zeroth bin? Refactored the zeroth bin
* out in 2022. So default is 0. Set to 1 if you need to process old style.
* If you enable this, you also need to go into nidas/src/nidas/dynld/raf/SppSerial.h
* and enable the #define ZERO_BIN_HACK.
*/
int _zeroBinOffset;
static const interpolationType _defaultInterp;
static const pms2dProcessing _defaultPMS2DProcessingMethod;
static const float _defaultPMS2DAreaRatioReject;
};
#endif
// END CONFIG.H
|
385f4a45af7b728eee906388feb09c0e7c884c2c
|
a66ce2b31cee52088d0941f1734de2932b3afc37
|
/src/pvxs/sharedpv.h
|
95e69a7bdeb0bcc09a85886cf7f01de0ad39135b
|
[
"BSD-3-Clause"
] |
permissive
|
mdavidsaver/pvxs
|
291cda745d2b8387445758ef0054ea7d952dd390
|
aba04ee95228369ba0f6f1843f85e830c2587317
|
refs/heads/master
| 2023-08-04T17:24:39.334946
| 2023-07-30T20:19:44
| 2023-08-03T00:20:13
| 216,301,431
| 13
| 24
|
NOASSERTION
| 2023-09-13T10:44:47
| 2019-10-20T03:21:19
|
C++
|
UTF-8
|
C++
| false
| false
| 4,143
|
h
|
sharedpv.h
|
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvxs is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef PVXS_SHAREDPV_H
#define PVXS_SHAREDPV_H
#include <functional>
#include <memory>
#include <map>
#include <pvxs/version.h>
#include "srvcommon.h"
namespace pvxs {
class Value;
namespace server {
struct ChannelControl;
struct Source;
/** A SharedPV is a single data value which may be accessed by multiple clients through a Server.
*
* On creation a SharedPV has no associated data structure, or data type.
* This is set by calling open() to provide a data type, and initial data values.
* Subsequent calls to post() will update this data structure (and send notifications
* to subscribing clients).
*
* A later call to close() will force disconnect all clients, and discard the data value and type.
* A further call to open() sets a new data value, which may be of a different data type.
*
* The onPut() and onRPC() methods attach functors which will be called each time a Put or RPC
* operation is executed by a client.
*/
struct PVXS_API SharedPV
{
//! Create a new SharedPV with a Put handler which post() s any client provided Value.
static SharedPV buildMailbox();
//! Create a new SharedPV with a Put handler which rejects any client provided Value.
static SharedPV buildReadonly();
~SharedPV();
inline explicit operator bool() const { return !!impl; }
//! Attach this SharedPV with a new client channel.
//! Not necessary when using StaticSource.
//! eg. could call from Source::onCreate()
void attach(std::unique_ptr<ChannelControl>&& op);
//! Callback when the number of attach()d clients becomes non-zero.
void onFirstConnect(std::function<void(SharedPV&)>&& fn);
//! Callback when the number of attach()d clients becomes zero.
void onLastDisconnect(std::function<void(SharedPV&)>&& fn);
//! Callback when a client executes a new Put operation.
void onPut(std::function<void(SharedPV&, std::unique_ptr<ExecOp>&&, Value&&)>&& fn);
//! Callback when a client executes an RPC operation.
//! @note RPC operations are allowed even when the SharedPV is not opened (isOpen()==false)
void onRPC(std::function<void(SharedPV&, std::unique_ptr<ExecOp>&&, Value&&)>&& fn);
/** Provide data type and initial value. Allows clients to begin connecting.
* @pre !isOpen()
* @param initial Defines data type, and initial value
*/
void open(const Value& initial);
//! Test whether open() has been called w/o matching close()
bool isOpen() const;
//! Reverse the effects of open() and force disconnect any remaining clients.
void close();
//! Update the internal data value, and dispatch subscription updates to any clients.
void post(const Value& val);
//! query the internal data value and update the provided Value.
void fetch(Value& val) const;
//! Return a (shallow) copy of the internal data value
Value fetch() const;
struct Impl;
private:
std::shared_ptr<Impl> impl;
};
/** Allow clients to find (through a Server) SharedPV instances by name.
*
* A single PV name may only be added once to a StaticSource.
* However, a single SharedPV may be added multiple times with different PV names.
*/
struct PVXS_API StaticSource
{
static StaticSource build();
~StaticSource();
inline explicit operator bool() const { return !!impl; }
//! Fetch the Source interface, which may be used with Server::addSource()
std::shared_ptr<Source> source() const;
//! call SharedPV::close() on all PVs
void close();
//! Add a new name through which a SharedPV may be addressed.
StaticSource& add(const std::string& name, const SharedPV& pv);
//! Remove a single name
StaticSource& remove(const std::string& name);
typedef std::map<std::string, SharedPV> list_t;
list_t list() const;
struct Impl;
private:
std::shared_ptr<Impl> impl;
};
} // namespace server
} // namespace pvxs
#endif // PVXS_SHAREDPV_H
|
b2e23a8323719b8730fe5795c71548837a55b250
|
83bc1d5ba7b7a2fa224ac4f605fb430a59dbae1d
|
/packing.cpp
|
fa5a586a1088321906944c97550728bc403b55f7
|
[] |
no_license
|
axnjaxn/toughersweeper
|
9c430abc29d4e3be6742c956a991dfde4c1e5329
|
fb44b1a6a014c9f2c21fb1b306b1a21b663719ba
|
refs/heads/master
| 2021-01-10T21:26:29.559975
| 2015-02-03T16:51:18
| 2015-02-03T16:51:18
| 28,725,743
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,736
|
cpp
|
packing.cpp
|
#include "packing.h"
#include <cstdio>
#include <cstdlib>
PackingGrid::PackingGrid(int h, int w) {
this->w = w;
this->h = h;
cells.resize(w * h);
}
void PackingGrid::factor(std::vector<int> nj, int N, std::vector< std::vector<int> >& solns,
int i, std::vector<int> soln) {
if (i >= nj.size()) {
if (N == 0)
solns.push_back(soln);
return;
}
for (int k = 0; k < N; k++) {
if (nj[i] * k > N) return;
soln.push_back(k);
factor(nj, N - nj[i] * k, solns, i + 1, soln);
soln.pop_back();
}
}
std::vector<int> PackingGrid::bestFactorization(std::vector<int> nj, int N) {
std::vector< std::vector<int> > solns;
factor(nj, N, solns);
//TODO: Formula for best factorization should minimize variance of aj
return solns[solns.size() / 2];
}
PackingGrid PackingGrid::initial(int h, int w, int m, int n) {
PackingGrid grid(h, w);
//Factorization
std::vector<int> nj;
for (int j = m; j >= n; j--)
nj.push_back(j);
std::vector<int> aj = bestFactorization(nj, w * h);
//Placement
for (int i = 0, group = 1, r = 0, c = 0; i < nj.size(); i++) {
for (int j = 0; j < aj[i]; j++) {
for (int k = 0; k < nj[i]; k++) {
grid.set(r, c, group);
if (!(r & 1)) {
if (++c >= grid.w) {
c--;
r++;
}
}
else {
if (--c < 0) {
c++;
r++;
}
}
}
group++;
}
}
return grid;
}
PackingGrid PackingGrid::random(int h, int w, int m, int n) {
const int nmutations = 40;
PackingGrid grid = initial(h, w, m, n);
//TODO: replace this with a method sensitive to the constraints
for (int i = 0; i < nmutations; i++)
grid.mutate();
return grid;
}
typedef struct {
int r, c, r1, c1;
} Pair;
Pair makePair(int r, int c, int r1, int c1) {
Pair p;
p.r = r; p.c = c;
p.r1 = r; p.c1 = c;
return p;
}
void PackingGrid::mutate() {
int r, c, r1, c1, i, g, g1;
//This process will repeat until success
for (;;) {
/* Determine two random adjacent cells */
i = rand() % (w * h);
r = r1 = i / w; c = c1 = i % w;
i = rand() % 4;
switch (i) {
case 0: r1--; break;
case 1: r1++; break;
case 2: c1--; break;
case 3: c1++; break;
}
/* Enforce constraints: in bounds, and different groups */
if (r1 < 0 || r1 >= h || c1 < 0 || c1 >= w || at(r, c) == at(r1, c1)) continue;
g = at(r, c);
g1 = at(r1, c1);
/* Determine which cells from the respective groups are adjacent */
std::vector<int> group, group1;
std::vector<Pair> pairs;
for (int r = 0; r < h; r++)
for (int c = 0; c < w; c++)
if (at(r, c) == g) {
group.push_back(r * w + c);
if (c - 1 >= 0 && at(r, c - 1) == g1) pairs.push_back(makePair(r, c, r, c - 1));
if (c + 1 < w && at(r, c + 1) == g1) pairs.push_back(makePair(r, c, r, c + 1));
if (r - 1 >= 0 && at(r - 1, c) == g1) pairs.push_back(makePair(r, c, r - 1, c));
if (r + 1 < h && at(r + 1, c) == g1) pairs.push_back(makePair(r, c, r + 1, c));
}
else if (at(r, c) == g1) group1.push_back(r * w + c);
if (group.empty()) printf("PANIC\n");
#if 0
/* See if size constraint is satisfied */
if (group.size() == n || group1.size == m) continue;
#else
if (group.size() == 1) continue;
#endif
/* Permute the adjacency pairs */
for (int i = 0, j; i < pairs.size(); i++) {
j = i + (rand() % (pairs.size() - i));
Pair t = pairs[i];
pairs[i] = pairs[j];
pairs[j] = t;
}
/* Determine which pairs are legal grants */
std::vector<int> connected, unconnected;
bool isConnected;
for (int k = 0; k < pairs.size(); k++) {
set(pairs[k].r, pairs[k].c, g1);//Set it to the other group
unconnected = group;
for (int i = 0; i < unconnected.size(); i++)
if (unconnected[i] == pairs[k].r * w + pairs[k].c)
unconnected.erase(unconnected.begin() + i);
connected.resize(1);
connected[0] = unconnected[0];
unconnected.erase(unconnected.begin());
for (int i = 0, j, r, c, r1, c1; i < unconnected.size(); i++) {
r = unconnected[i] / w;
c = unconnected[i] % w;
for (j = 0; j < connected.size(); j++) {
r1 = connected[j] / w;
c1 = connected[j] % w;
if ((r1 == r && c1 == c + 1)
|| (r1 == r && c1 == c - 1)
|| (r1 == r - 1 && c1 == c)
|| (r1 == r + 1 && c1 == c)) break;
}
if (j < connected.size()) {
connected.push_back(unconnected[i]);
unconnected.erase(unconnected.begin() + i);
i = -1;
}
}
isConnected = unconnected.empty();
if (isConnected) break;
set(pairs[k].r, pairs[k].c, g);
}
//TODO: Swap instead of grant
if (isConnected) {
return;
}
else {
continue;
}
}
}
|
9f318e43ffc357be4a704eb78dda628e5c1866bd
|
396396f9ff0869e3928a9b53836231d615bd1058
|
/Timer/bool_timer.cpp
|
39026ddf1241b49bab18460be71c7881583ebca4
|
[] |
no_license
|
SeptinaryAI/KilnSampler
|
5e769198c15644393419d7f4fc20e25b2e2b4b7c
|
940fb75a5cdbce149b6af6768d6848c53b930ac6
|
refs/heads/main
| 2023-03-27T08:37:10.361045
| 2021-03-16T09:54:31
| 2021-03-16T09:54:31
| 348,291,385
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 80
|
cpp
|
bool_timer.cpp
|
#include "bool_timer.h"
//饿汉
QTimer* bool_timer::timer = new QTimer();
|
512118d8d7da620c671f90519fa9c578c1c2908a
|
4a99fa98abd0285bc3b5671f237b932114123340
|
/RunWidgets.cpp
|
aa79215cd7d6da3d583411161cb418bd12107b26
|
[] |
no_license
|
automenta/crittergod1.5
|
937cd925a4ba57b3e8cfa4899a81ba24fe3e4138
|
4786fe9d621c0e61cdd43ca3a363bfce6510e3c0
|
refs/heads/master
| 2020-12-24T16:58:32.854270
| 2010-04-12T03:25:39
| 2010-04-12T03:25:39
| 520,917
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,434
|
cpp
|
RunWidgets.cpp
|
/*
* File: RunWidgets.cpp
* Author: seh
*
* Created on February 23, 2010, 3:59 PM
*/
#include <iostream>
#include <string.h>
using namespace std;
#include "video/GLWindow.h"
#include "space/DefaultSpace.h"
#include "physics/OpenGL/GlutStuff.h"
#include "audio/Audio.h"
#include "widget2d/container.h"
#include "widget2d/panel.h"
#include "widget2d/button.h"
#include "widget2d/text.h"
#include "widget2d/slider.h"
#include "RunWidgets.h"
class SliderTestPanel : public Panel {
public:
float a;
float b;
SliderTestPanel() : Panel() {
a = b = 0.5;
HSlider* hs = new HSlider(&a, 0, 1.0);
hs->span(15, 15, 200, 40);
addPanel("hslider", hs);
VSlider* vs = new VSlider(&b, 0, 1.0);
vs->span(15, 50, 50, 250);
addPanel("vslider", vs);
}
};
void runSliders() {
Audio* audio = new Audio();
DefaultSpace* ds = new DefaultSpace(audio);
SliderTestPanel *stp = new SliderTestPanel();
stp->span(5,5,400,400);
ds->getFace()->addPanel("stp", stp);
runGLWindow(0, NULL, 1024, 800, "Sliders", ds);
delete audio;
}
void runFont3D() {
Audio* audio = new Audio();
DefaultSpace* ds = new DefaultSpace(audio);
char const *file = "media/font/OCRA.ttf";
// Initialise FTGL stuff
static FTPolygonFont* font = new FTPolygonFont(file);
if(font->Error())
{
fprintf(stderr, "could not load font `%s'\n", file);
return;
}
font->FaceSize(40);
font->CharMap(ft_encoding_unicode);
class FontBody : public AbstractBody {
float n;
virtual void draw() {
glEnable(GL_LIGHTING);
glEnable(GL_DEPTH_TEST);
glEnable(GL_TEXTURE);
glPushMatrix();
//glColorMaterial(GL_FRONT, GL_DIFFUSE);
glTranslatef(0.0, 0.0, 20.0);
glScalef(-0.1, 0.1, 0.1);
// glRotatef(n / 1.11, 0.0, 1.0, 0.0);
// glRotatef(n / 2.23, 1.0, 0.0, 0.0);
// glRotatef(n / 3.17, 0.0, 0.0, 1.0);
//glColor3f(1.0, 0.5, 1.0);
//drawText3D(font[fontindex], "SpaceGraph", 0, 0, 20.0);
font->Render("SpaceGraph");
glPopMatrix();
//n += 1.0;
}
};
ds->addBody(new FontBody());
runGLWindow(0, NULL, 1024, 800, "Sliders", ds);
delete audio;
}
|
5a759e92e11b4521e03d55d135217160d401c87e
|
0fdb6565a31358a7021c30bbfd0e95a1a9d39e25
|
/src/morganaOperators/fnBF3dC.hpp
|
414dfbcfab6682736855d975378f7c549ce97808
|
[] |
no_license
|
feof81/morganaPublic
|
b8b61a08d222a2ade3484cbdfc80c9790c0e5508
|
540cdbcdcf56e5cd13c0dc98c04f724543025bce
|
refs/heads/master
| 2023-01-28T01:12:51.711178
| 2023-01-11T16:56:37
| 2023-01-11T16:56:37
| 216,569,123
| 3
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,721
|
hpp
|
fnBF3dC.hpp
|
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This file is part of Morgana.
Author: Andrea Villa, andrea.villa81@fastwebnet.it
Morgana is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Morgana is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Morgana. If not, see <http://www.gnu.org/licenses/>.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FNBF3DC_HPP
#define FNBF3DC_HPP
#include "../morganaFiniteElements/functionalBF3d.hpp"
#include "../morganaDofs/morganaTypes.hpp"
#include "../morganaDofs/point3d.h"
#include "../morganaDofs/komplex.h"
/*! Functional 3d: (V * N) */
template<typename TEST>
class fnBF3dC : public functionalBF3d<TEST>
{
/*! @name Typedefs */ //@{
public:
typedef functionalBF3d<TEST> FUNCTIONAL;
typedef typename FUNCTIONAL::TEST_OUTTYPE TEST_OUTTYPE;
typedef typename FUNCTIONAL::MESH2D MESH2D;
typedef typename FUNCTIONAL::MESH3D MESH3D;
typedef typename FUNCTIONAL::CONNECT2D CONNECT2D;
typedef typename FUNCTIONAL::CONNECT3D CONNECT3D;
typedef typename TEST::PMAPTYPE TEST_PMAPTYPE;
typedef typename TEST::GEOSHAPE TEST_GEOSHAPE;
//@}
/*! @name Internal data */ //@{
public:
set<UInt> activeIds;
Teuchos::RCP<MESH2D> grid2d;
//@}
/*! @name Functions */ //@{
public:
fnBF3dC();
fnBF3dC(const Teuchos::RCP<communicator> & CommDev, const Teuchos::RCP<MESH3D> & Grid3d, const Teuchos::RCP<CONNECT3D> & ConnectGrid3d, const Teuchos::RCP<MESH2D> & Grid2d, const Teuchos::RCP<CONNECT2D> & ConnectGrid2d);
fnBF3dC(communicator & CommDev, MESH3D & Grid3d, CONNECT3D & ConnectGrid3d, MESH2D & Grid2d, CONNECT2D & ConnectGrid2d);
void setGeoIds(const set<UInt> & ActiveIds);
void eval(const point3d & Yf, sVect<komplex> & mat);
void eval(const point3d & Yf, sVect<Real> & mat);
//@}
};
//_________________________________________________________________________________________________
// IMPLEMENTATION
//-------------------------------------------------------------------------------------------------
template<typename TEST>
fnBF3dC<TEST>::
fnBF3dC() : functionalBF3d<TEST>()
{
assert(staticAssert<traitsBasic<TEST_OUTTYPE>::myType == typePoint3d>::returnValue);
}
template<typename TEST>
fnBF3dC<TEST>::
fnBF3dC(const Teuchos::RCP<communicator> & CommDev, const Teuchos::RCP<MESH3D> & Grid3d, const Teuchos::RCP<CONNECT3D> & ConnectGrid3d, const Teuchos::RCP<MESH2D> & Grid2d, const Teuchos::RCP<CONNECT2D> & ConnectGrid2d) :
functionalBF3d<TEST>(CommDev,Grid3d,ConnectGrid3d,Grid2d,ConnectGrid2d)
{
assert(staticAssert<traitsBasic<TEST_OUTTYPE>::myType == typePoint3d>::returnValue);
grid2d = Grid2d;
}
template<typename TEST>
fnBF3dC<TEST>::
fnBF3dC(communicator & CommDev, MESH3D & Grid3d, CONNECT3D & ConnectGrid3d, MESH2D & Grid2d, CONNECT2D & ConnectGrid2d) :
functionalBF3d<TEST>(CommDev,Grid3d,ConnectGrid3d,Grid2d,ConnectGrid2d)
{
assert(staticAssert<traitsBasic<TEST_OUTTYPE>::myType == typePoint3d>::returnValue);
grid2d = Teuchos::rcpFromRef(Grid2d);
}
template<typename TEST>
void
fnBF3dC<TEST>::
setGeoIds(const set<UInt> & ActiveIds)
{
activeIds = ActiveIds;
}
template<typename TEST>
void
fnBF3dC<TEST>::
eval(const point3d & Yf, sVect<Real> & mat)
{
typedef functionalBF3d<TEST> FUNCTIONAL;
assert(mat.size() == FUNCTIONAL::numIndex_test() );
//Field eval
sVect<TEST_OUTTYPE> eval_field(FUNCTIONAL::numIndex_test());
FUNCTIONAL::eval_test(Yf, eval_field);
//Normal evaluation
point3d N = FUNCTIONAL::computeNormal(Yf);
//Element active
UInt el2d = FUNCTIONAL::getEl2d();
UInt geoId = grid2d->getElementL(el2d).getGeoId();
Real val = Real(activeIds.count(geoId) == 1);
//Vectoring
for(UInt j=1; j <= FUNCTIONAL::numIndex_test(); ++j)
{
mat(j) = point3d::dot(eval_field(j), N) * val;
}
}
template<typename TEST>
void
fnBF3dC<TEST>::
eval(const point3d & Yf, sVect<komplex> & mat)
{
sVect<Real> matReal(mat.size());
eval(Yf,matReal);
for(UInt i=1; i <= mat.size(); ++i)
{ mat(i) = komplex(matReal(i),0.0); }
}
#endif
|
5871d638dc6f9de703135b8aee56ea6dd74682ea
|
b3da8a7e4d960d69de97d74fc18b19f49a11baa2
|
/13151.cpp
|
66983314366d553fd005ee6929495e86a99c7bc3
|
[] |
no_license
|
akrabulislam/UVA
|
16eeb3f2ec735ac756e2e114025d158eaf0787f0
|
5c899bd6f71c40968dc4f0a699434ac5f8488c64
|
refs/heads/master
| 2022-04-09T23:53:00.056400
| 2020-03-09T06:08:08
| 2020-03-09T06:08:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,240
|
cpp
|
13151.cpp
|
#include "bits/stdc++.h"
using namespace std;
int main(){
// freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
char s[100];
int m;
while(scanf("%s %d",&s,&m)&&(strcmp(s,"0")!=0&&m!=0)){
int n;
if(s[0]=='0'&&s[1]=='x'){
sscanf(s,"%X",&n);
}
else if(s[0]=='0'){
sscanf(s,"%o",&n);
}
else{
sscanf(s,"%d",&n);
}
int res=0;
while(m--){
string s;
int num;
cin>>s>>num;
if(s=="i"){
num==n ? res++ : res;
n=num;
}
else if(s=="i++"){
num==n? res++ :res;
n=num;
n++;
}
else if(s=="i--"){
num==n? res++ :res;
n=num;
n--;
}
else if(s=="++i"){
++n;
num==n ? res++ :res;
n=num;
}
else{
--n;
num==n ? res++: res;
n=num;
}
}
printf("%d\n",res);
}
return 0;
}
|
0dfc2330bc4efd077d66f6f45e369f8cdabf2b7a
|
188409864868c4f2659679ec39c040cd253c597b
|
/sbnana/FlatMaker/flatten_caf.cc
|
6dfdf26ec95216972d7bed68ff57b0b3098ce5d1
|
[] |
no_license
|
cmmarshall/sbnana
|
077c9f32b09bd8b08bd9b56ebb586e5a7aaa6dd2
|
0e2acc6130537be69bd0d4b3c48dd2914d753b29
|
refs/heads/main
| 2023-09-04T05:23:53.604373
| 2021-07-16T11:52:30
| 2021-07-16T11:52:30
| 388,840,340
| 0
| 1
| null | 2021-07-23T15:08:46
| 2021-07-23T15:08:46
| null |
UTF-8
|
C++
| false
| false
| 3,199
|
cc
|
flatten_caf.cc
|
#include "sbnanaobj/StandardRecord/StandardRecord.h"
#include "sbnanaobj/StandardRecord/SRGlobal.h"
#include "sbnana/FlatMaker/FlatRecord.h"
#include "sbnana/CAFAna/Core/Progress.h"
#include "TFile.h"
#include "TH1.h"
#include "TSystem.h"
#include "TTree.h"
#include <iostream>
int main(int argc, char** argv)
{
if(argc != 3){
std::cout << "Usage: flatten_caf input.events.root output.flat.root"
<< std::endl;
return 1;
}
const std::string inname = argv[1];
const std::string outname = argv[2];
TFile* fin = TFile::Open(inname.c_str());
TTree* tr = (TTree*)fin->Get("recTree");
if(!tr){
std::cout << "Couldn't find tree 'recTree' in " << inname << std::endl;
return 1;
}
caf::StandardRecord* event = 0;
tr->SetBranchAddress("rec", &event);
// LZ4 is the fastest format to decompress. I get 3x faster loading with
// this compared to the default, and the files are only slightly larger.
TFile fout(outname.c_str(), "RECREATE", "",
ROOT::CompressionSettings(ROOT::kLZ4, 1));
TTree* trout = new TTree("recTree", "recTree");
// On NOvA, had trouble with memory usage (because several trees are open at
// once?). Setting the maximum buffer usage (per tree) to 3MB (10x less than
// default) fixed it. But it doesn't seem necessary for now on SBN.
// trout->SetAutoFlush(-3*1000*1000);
flat::Flat<caf::StandardRecord> rec(trout, "rec", "", 0);//policy);
ana::Progress prog("Converting '"+inname+"' to '"+outname+"'");
for(int i = 0; i < tr->GetEntries(); ++i){
prog.SetProgress(double(i)/tr->GetEntries());
tr->GetEntry(i);
rec.Clear();
rec.Fill(*event);
trout->Fill();
}
prog.Done();
trout->Write();
// Don't bother with a flat version for now, this info is tiny and read once
TTree* globalIn = (TTree*)fin->Get("globalTree");
if(globalIn){
// Copy globalTree verbatim from input to output
caf::SRGlobal global;
caf::SRGlobal* pglobal = &global;
globalIn->SetBranchAddress("global", &pglobal);
fout.cd();
TTree globalOut("globalTree", "globalTree");
globalOut.Branch("global", "caf::SRGlobal", &global);
assert(globalIn->GetEntries() == 1);
// TODO check that the globalTree is the same in every file
globalIn->GetEntry(0);
globalOut.Fill();
globalOut.Write();
}
TH1* hPOT = (TH1*)fin->Get("TotalPOT");
TH1* hEvts = (TH1*)fin->Get("TotalEvents");
fout.cd();
hPOT->Write("TotalPOT");
hEvts->Write("TotalEvents");
TTree* metain = (TTree*)fin->Get("metadata/metatree");
if(metain){
TDirectory* metadir = fout.mkdir("metadata");
metadir->cd();
std::string key, value;
std::string *pkey = &key, *pvalue = &value;
TTree* metaout = new TTree("metatree", "metatree");
metaout->Branch("key", &key);
metaout->Branch("value", &value);
metain->SetBranchAddress("key", &pkey);
metain->SetBranchAddress("value", &pvalue);
for(int i = 0; i < metain->GetEntries(); ++i){
metain->GetEntry(i);
if(key == "data_tier") value = "\"flat_caf\"";
if(key == "file_format") value = "\"flat_caf\"";
metaout->Fill();
}
metaout->Write();
}
return 0;
}
|
5db2601e64d3a063939e47c6b80ecbd16925778d
|
09a5f628f61aa97be79f67e8d2dfb920fcc8f894
|
/Projects/FrameWork/FrameWork/Systems/Input/BaseInput.h
|
33f261e8482f233ced01fcdceb31ca6bf29f76f5
|
[] |
no_license
|
tozawa0406/SpriteMeshEditer
|
daafdedb9b5957263553d65107357a6bbdac3c76
|
e8c02aa73045ba4cdfb45443ad7d5f96091e968e
|
refs/heads/master
| 2020-04-24T17:38:46.367375
| 2019-11-13T12:04:49
| 2019-11-13T12:04:49
| 172,154,914
| 0
| 0
| null | null | null | null |
SHIFT_JIS
|
C++
| false
| false
| 1,900
|
h
|
BaseInput.h
|
//-----------------------------------------------------------------------------
//
// コントローラ基底[BaseInput.h]
// Auther : 戸澤翔太
// 2018/08/18
//-----------------------------------------------------------------------------
#ifndef _BASE_INPUT_H_
#define _BASE_INPUT_H_
#include <Windows.h>
#define DIRECTINPUT_VERSION (0x0800) //dinput.hを使う場合は前述しておく
#include <dinput.h>
#include "../../Define/Define.h"
#include "Input.h"
//-----------------------------------------------------------------------------
// クラス宣言
//-----------------------------------------------------------------------------
class BaseInput
{
friend class Controller;
public:
virtual ~BaseInput(void) {}
protected:
BaseInput(void) {}
void ButtonPress(INPUT_BUTTON& newState, INPUT_BUTTON& button)
{
button.trigger = (button.press ^ newState.press) & newState.press;
button.release = (button.press ^ newState.press) & button.press;
this->RepeatCheck(newState.press, button, Input::REPEAT_RANGE);
button.press = newState.press;
}
void RepeatCheck(WORD& newStatePress, INPUT_BUTTON& button, int range)
{
if (newStatePress)
{
if (button.repeatCnt < range)
{
button.repeatCnt++;
if (button.repeatCnt == 1)
{
button.repeat = newStatePress;
}
else
{
button.repeat = 0;
}
}
else
{
button.repeatCnt = 0;
}
}
else
{
button.repeatCnt = 0;
button.repeat = 0;
}
}
void AxisPress(WORD& axisPress, const SHORT& newAxis, SHORT& axis, WORD bit, bool inverted)
{
if (inverted) { bit *= 2; }
if (newAxis > Half(Input::RANGE))
{
axisPress |= bit;
}
else if (newAxis < -Half(Input::RANGE))
{
if (inverted) { bit /= 4; }
axisPress |= bit * 2;
}
axis = newAxis;
}
virtual void Update(INPUT_STATE& state) = 0;
virtual void GuiUpdate(void) {};
};
#endif
|
4e68a94f544a582067eacd951523152747f34dbb
|
c9af82733640aa1dd6d08313d084dae5d9ca4f66
|
/Plotting/HInvPlot/Root/RecParticle.cxx
|
7ef7cf8e68a9f6b46da541f8bc4188738fd2886f
|
[] |
no_license
|
schaed/STPostProcessing
|
4f7f2c216ce2da93ddf0874a58226ee05d2f72f4
|
14931b4512f07fa4ec481fc3482d18e8534464c6
|
refs/heads/master
| 2023-05-04T12:23:51.984327
| 2021-05-20T16:40:35
| 2021-05-20T16:40:35
| 369,274,722
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 985
|
cxx
|
RecParticle.cxx
|
// Local
#include "HInvPlot/RecParticle.h"
using namespace std;
//-----------------------------------------------------------------------------
Msl::RecParticle::RecParticle():
eta (0.0),
phi (0.0),
pt (0.0),
m (0.0),
bits (0)
{
}
//-----------------------------------------------------------------------------
void Msl::RecParticle::Clear()
{
//
// Clear vector of variables
//
VarHolder::ClearVars();
eta = 0.0;
phi = 0.0;
pt = 0.0;
m = 0.0;
bits = 0;
}
//-----------------------------------------------------------------------------
void Msl::RecParticle::Print() const
{
cout << "RecParticle::Print" << endl
<< " Eta: " << eta << endl
<< " Phi: " << phi << endl
<< " Pt: " << pt << endl
<< " M: " << m << endl;
}
|
fe98f21912403ea100aa51732bfcf73dea67c7e7
|
e0d1c0d2ae04642d850bfeeca27202bb08bcd3b4
|
/src/GLOBAL_DATA_FROM_SOURCES.h
|
8daee48c252fd3cb1452f1b3e7cb366f345ea40c
|
[] |
no_license
|
ArturWaz/bulbulator_head_banger
|
bafd6d03b0d76c57c7490c4e8333e7c37e064156
|
cfb0bb4f54ecb2afbf87427f8ca3b5da8ea5ca49
|
refs/heads/master
| 2021-01-19T18:32:51.117367
| 2015-03-11T09:49:56
| 2015-03-11T09:49:56
| 30,066,076
| 0
| 0
| null | 2015-03-06T08:59:55
| 2015-01-30T09:49:48
|
C
|
UTF-8
|
C++
| false
| false
| 994
|
h
|
GLOBAL_DATA_FROM_SOURCES.h
|
/*
* GLOBAL_DATA_FROM_SOURCES.h
*
* Created on: 3/6/2015
* Author: Artur
*/
#ifndef GLOBAL_DATA_FROM_SOURCES_H_
#define GLOBAL_DATA_FROM_SOURCES_H_
#include "Buffer.h"
#include "SensorsStructures.h"
namespace GlobalData {
static const size_t bufferLength = 5000;
namespace AccelRaw {
static Buffer<Vector3DTime> buffer(bufferLength); // accelerometer measures in [m/s/s]
}
namespace AccelProcessed {
static Buffer<Vector3DTime> buffer(bufferLength); // accelerometer measures in [m/s/s]
}
namespace GyroProcessed {
static Buffer<Vector3DTime> buffer(bufferLength);
}
namespace MagProcessed {
static Buffer<Vector3DTime> buffer(bufferLength);
}
namespace EulerAngle {
static Buffer<Vector3DTime> buffer(bufferLength); // euler angles measures in [rad]
}
namespace Quaternion {
static Buffer<Vector3DTime> buffer(bufferLength);
}
}
#endif //__GLOBAL_DATA_FROM_SOURCES_H_
|
67f44bec87e5313620a8d637d3773a190f1cfb14
|
df59b0571730619d5d3f72bdf3d9427393fcf8cc
|
/ld21/fingers/code/Entities/Entity.h
|
a247a2af2fa6618760f17de98b82500fb0759c90
|
[] |
no_license
|
stuckie/ludumdare
|
69642be40da72e64bd0c1a17d4c4d6937fd278a9
|
b61d30e97a63b56376defaf06a8eaebe3322811c
|
refs/heads/master
| 2021-01-21T10:13:02.901439
| 2019-01-02T14:48:56
| 2019-01-02T14:48:56
| 4,536,120
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,612
|
h
|
Entity.h
|
#ifndef _ENTITY_H_
#define _ENTITY_H_
#include <Resources/Resource.h>
#include <Graphics/Mesh.h>
#include <Maths/Vector2.h>
#include <Maths/Vector3.h>
#include <Maths/Matrix4.h>
#include <Graphics/VertexBuffer.h>
#include <Graphics/IndexBuffer.h>
#include <Graphics/Material.h>
#include "../Resources/Entities.h"
/// Common entity for Fingers... very hacky...
/// The Type describes to the EntityManager which list(s) to throw this in.. one can collide, one can draw.
/// Also, when doing collision checks, if it finds two sphere collision checks, it can perform a faster check.
/// The Tag is effectively the means which I can check in the Collision Callback what Entity has been hit and deal with it appropriately.
class Entity
{
public:
enum Type
{
RENDER_ONLY
, SPHERE_COLLIDE
, BOX_COLLIDE
, RENDER_SPHERE_COLLIDE
, RENDER_BOX_COLLIDE
};
virtual ~Entity();
/// Requires a Mesh to act with
Entity(const GLESGAE::Resources::Locator& mesh, const Type type, const Fingers::Entities::Tag tag);
/// Set the position directly
virtual void setPosition(const GLESGAE::Vector2& position);
/// Get the position
GLESGAE::Vector2 getPosition() const;
/// Rotate the entity
void rotate(const float radians);
/// Translate
void translate(const GLESGAE::Vector2& translate);
/// Check collision
bool collide(const GLESGAE::Resource<Entity>& entity);
/// Set sphere collision size
void setSphereSize(const float size) { mSphereSize = size; }
/// Get sphere collision size
float getSphereSize() const { return mSphereSize; }
/// Set box collision size
void setBoxSize(const GLESGAE::Vector2& size) { mBoxSize = size; }
/// Get box collision size
const GLESGAE::Vector2& getBoxSize() const { return mBoxSize; }
/// Const access to the Mesh
const GLESGAE::Resource<GLESGAE::Mesh>& getMesh() const { return mMesh; }
/// Const access to the Transform
const GLESGAE::Resource<GLESGAE::Matrix4>& getTransform() const { return mTransform; }
/// Overloadable render function
virtual void render();
/// Overloadable update function
virtual void update(const float delta);
/// Get the type of Entity
Type getType() const { return mType; }
/// Get the tag
Fingers::Entities::Tag getTag() const { return mTag; }
// Move back
void moveBack();
protected:
GLESGAE::Resource<GLESGAE::Mesh> mMesh;
GLESGAE::Resource<GLESGAE::Matrix4> mTransform;
Type mType;
float mSphereSize;
GLESGAE::Vector2 mBoxSize;
Fingers::Entities::Tag mTag;
GLESGAE::Vector3 mLastPosition;
};
#endif
|
199e2868651268394e78e1930d09083a063b9a1c
|
16239dbdff8ebfa9f75e13833b215a8e72f39a43
|
/JSonWriter.cpp
|
dfdba4c18bad67fd1691276ddcf2beb56a197736
|
[] |
no_license
|
gta4roy/XML_dear
|
b0a2a0de95e9a2cf6efa297d2ba1004dc3b1566c
|
59cb3f91facecb72a047aa7241ef9a6970faa3e3
|
refs/heads/master
| 2022-06-27T19:28:24.856299
| 2020-05-09T05:46:54
| 2020-05-09T05:46:54
| 262,497,744
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,329
|
cpp
|
JSonWriter.cpp
|
#include "JSonWriter.h"
#include "Nodes.h"
namespace Gta4Roy {
namespace XMLJSONConvertor
{
using namespace std;
using namespace rapidjson;
JSonWriter::JSonWriter(const std::string & xmlFileName,const Node & rootNode)
:
m_fileName(xmlFileName),
m_rootNode(rootNode)
{
rapidjson::Document document;
// define the document as an object rather than an array
document.SetObject();
// create a rapidjson array type with similar syntax to std::vector
rapidjson::Value array(rapidjson::kArrayType);
// must pass an allocator when the object may need to allocate memory
rapidjson::Document::AllocatorType& allocator = document.GetAllocator();
// chain methods as rapidjson provides a fluent interface when modifying its objects
array.PushBack("hello", allocator).PushBack("world", allocator);//"array":["hello","world"]
document.AddMember("Name", "XYZ", allocator);
document.AddMember("Rollnumer", 2, allocator);
document.AddMember("array", array, allocator);
// create a rapidjson object type
rapidjson::Value object(rapidjson::kObjectType);
object.AddMember("Math", "50", allocator);
object.AddMember("Science", "70", allocator);
object.AddMember("English", "50", allocator);
object.AddMember("Social Science", "70", allocator);
document.AddMember("Marks", object, allocator);
// fromScratch["object"]["hello"] = "Yourname";
StringBuffer strbuf;
Writer<StringBuffer> writer(strbuf);
document.Accept(writer);
std::cout << strbuf.GetString() << std::endl;
}
// rapidjson::Value & JSonWriter::createJSonObject(const Node & nodeObject,rapidjson::Value & jsonObject)
// {
// }
void JSonWriter::writeJson()
{
rapidjson::Document document;
// define the document as an object rather than an array
document.SetObject();
// document = createJSonObject(m_rootNode,document.GetObject());
}
}
}
|
09ad0f587231da664434c434d6b55cc32a3a78c3
|
55ad45d68e1f895f98b0ffd944b1461b3ca492db
|
/Classes/RoleBossBullet.h
|
344022a1988bd5e2539f868c01f131359b7ee849
|
[] |
no_license
|
koala1122/MyMario
|
ec07aa6b03f9014e6e5b32aaf3d2e59b2e4dfc28
|
dad34d2adfbf918231c9f5ab0fddcdd8b92c4bf8
|
refs/heads/master
| 2021-01-22T13:52:37.801314
| 2017-09-04T03:14:31
| 2017-09-04T03:14:31
| 100,695,785
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 317
|
h
|
RoleBossBullet.h
|
#ifndef __RoleBossBullet_H__
#define __RoleBossBullet_H__
#include "Role.h"
class RoleBossBullet:public Role
{
public:
bool init(ValueMap& objProperty);
void updateStatus();
void moveLeft(float dt);
void moveRight(float dt);
virtual CollisionResult collsion(Role*, const Rect&);
};
#endif
|
75b78e6792cd607f340b1a8855dbdf3308b9d558
|
f9a6d748f95023016416ffbd62b6d73b70a6df66
|
/Opengl08/Geometry.cpp
|
9fef173dd79860460bbc16b532f8804992171753
|
[] |
no_license
|
JoseRHdz/graficacion_clase
|
ec4372b4cc1818925c35d500b741980cc149e008
|
e591d25079f6999614e3972f48070295cd3fa87f
|
refs/heads/master
| 2020-07-31T05:38:40.348067
| 2019-10-29T19:12:21
| 2019-10-29T19:12:21
| 210,502,584
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,981
|
cpp
|
Geometry.cpp
|
/*
* File: Geometry.cpp
* Author: ulises
*
* Created on 27 de agosto de 2019, 10:20
*/
#include "Geometry.h"
#include <fstream>
#include <sstream>
Geometry::Geometry()
{
//ctor
}
Geometry::~Geometry()
{
//dtor
}
void Geometry::create()
{
glGenVertexArrays(1, &vao);
glGenBuffers(1, &vbo);
glGenBuffers(1, &cbo);
glGenBuffers(1,&ebo);
glGenBuffers(1, &tbo);
glGenBuffers(1, &nbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glBufferData(GL_ARRAY_BUFFER, ver.vertex.size()*sizeof(vec3), &ver.vertex[0], GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, cbo);
glBufferData(GL_ARRAY_BUFFER, ver.colors.size()*sizeof(vec3), &ver.colors[0], GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, ver.index.size()*sizeof(GLuint), &ver.index[0], GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, tbo);
glBufferData(GL_ARRAY_BUFFER, ver.texCoords.size()*sizeof(vec2), &ver.texCoords[0], GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, nbo);
glBufferData(GL_ARRAY_BUFFER, ver.normals.size()*sizeof(vec3), &ver.normals[0], GL_STATIC_DRAW);
glBindVertexArray(vao);
}
void Geometry::startup(vector<vec3> v, vector<vec3> c, vector<GLuint> i)
{
ver.vertex = v;
ver.colors = c;
ver.index=i;
create();
bindData();
}
void Geometry::startup(string s){
readObj(s);
create();
bindData();
}
void Geometry::bindData()
{
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, nullptr);
glBindBuffer(GL_ARRAY_BUFFER, nbo);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, nullptr);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo);
}
void Geometry::draw()
{
glBindVertexArray(vao);
glDrawElements(GL_TRIANGLES, ver.index.size(),GL_UNSIGNED_INT, nullptr);
}
void Geometry::shutdown()
{
glDeleteBuffers(1, &tbo);
glDeleteBuffers(1, &nbo);
glDeleteBuffers(1, &vbo);
glDeleteBuffers(1, &cbo);
glDeleteBuffers(1, &ebo);
glDeleteVertexArrays(1, &vao);
}
void Geometry::readObj(string path){
fstream file;
file.open(path.c_str());
if(file.is_open()){
string line;
stringstream sline;
while(!file.eof()){
getline(file, line);
sline = stringstream(line);
string head;
sline>>head;
if(head == "v"){
vec3 vertex;
sline>>vertex.x;
sline>>vertex.y;
sline>>vertex.z;
ver.vertex.push_back(vertex);
}else if(head == "vn"){
vec3 normal;
sline>>normal.x;
sline>>normal.y;
sline>>normal.z;
ver.normals.push_back(normal);
}else if(head == "vt"){
vec2 tex;
sline>>tex.x;
sline>>tex.y;
ver.texCoords.push_back(tex);
}else if(head == "f"){
string tok;
for(int i = 0; i < 3; i++){
sline>>head;
stringstream data(head);
//for(int j = 0; j < 3; j++){
getline(data, tok, '/');
ver.index.push_back(stoi(tok)-1);
//}
}
}
}
}
}
|
9159707153822c4c0ad325394da31b464146becb
|
f20e965e19b749e84281cb35baea6787f815f777
|
/LHCb/ST/STKernel/Kernel/STCommonBase.h
|
a40d8e0bbdd55adf4d7e199128b12de6810cd1f1
|
[] |
no_license
|
marromlam/lhcb-software
|
f677abc9c6a27aa82a9b68c062eab587e6883906
|
f3a80ecab090d9ec1b33e12b987d3d743884dc24
|
refs/heads/master
| 2020-12-23T15:26:01.606128
| 2016-04-08T15:48:59
| 2016-04-08T15:48:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,441
|
h
|
STCommonBase.h
|
//-----------------------------------------------------------------------------
/** @file STCommonBase.h
*
* Header file for ST base class : STCommonBase
*
* CVS Log :-
* $Id: STCommonBase.h,v 1.8 2010-04-24 11:35:49 mneedham Exp $
*
* @author Matthew Needham Matthew.Needham@cern.ch
* @date 2005-11-10
*/
//-----------------------------------------------------------------------------
#ifndef STKERNEL_STCOMMONBASE_H
#define STKERNEL_STCOMMONBASE_H 1
#include <vector>
#include <string>
#include <map>
class ISTReadoutTool;
class DeSTDetector;
class DeSTSector;
namespace LHCb{
class STChannelID;
}
namespace ST
{
//-----------------------------------------------------------------------------
/** @class CommonBase STCommonBase.h STKernel/STCommonBase.h
*
* Base class providing common functionality for all ST tools and algorithms
*
* @author Matthew Needham
* @date 2008-10-11
*/
//-----------------------------------------------------------------------------
template <class PBASE>
class CommonBase : public PBASE
{
public:
/// Standard algorithm-like constructor
CommonBase( const std::string& name,
ISvcLocator* pSvcLocator );
/// Standard tool-like constructor
CommonBase( const std::string& type,
const std::string& name,
const IInterface* parent );
/// Destructor
virtual ~CommonBase( );
/** Initialization of the algorithm after creation
*
* @return The status of the initialization
* @retval StatusCode::SUCCESS Initialization was successful
* @retval StatusCode::FAILURE Initialization failed
*/
virtual StatusCode initialize();
/** Finalization of the algorithm before deletion
*
* @return The status of the finalization
* @retval StatusCode::SUCCESS Finalization was successful
* @retval StatusCode::FAILURE Finalization failed
*/
virtual StatusCode finalize();
/** get the top level detector element */
DeSTDetector* tracker() const;
/** get the readout tool */
ISTReadoutTool* readoutTool() const;
/** force init of base class tool */
void setForcedInit();
/** set the detType */
void setDetType(const std::string& aString);
/** detector type (IT or TT) */
const std::string& detType() const;
/** station as a string */
std::string station(const LHCb::STChannelID& chan) const;
/** region as string */
std::string uniqueDetRegion(const LHCb::STChannelID& chan) const;
/** layer as a string */
std::string uniqueLayer(const LHCb::STChannelID& chan) const;
/** sector as a string */
std::string uniqueSector(const LHCb::STChannelID& chan) const;
/** beetle as a string */
std::string uniqueBeetle(const LHCb::STChannelID& chan) const;
/** port */
std::string uniquePort(const LHCb::STChannelID& chan) const;
/** detector type as a string */
std::string detectorType(const LHCb::STChannelID& chan) const;
/** flip all flippables **/
void flip() const;
/** flip the given string */
void flip(std::string& aString) const;
/** add to flipable list **/
void addToFlipList(std::string* aString) const;
/** declarePropery the ST way **/
Property* declareSTConfigProperty(const std::string& name,
std::string& value,
const std::string& def,
const std::string& doc="none") const{
addToFlipList(&value); // add to list of flippable
return this->declareProperty(name, value = def , doc); // normal property declaration
}
/** accessor to the list of things to be flipped */
const std::vector<std::string*>& flipList() const;
/** safe finding of the sector - exception thrown if not valid */
DeSTSector* findSector(const LHCb::STChannelID& aChannel) const;
/** return a procstatus in case event is aborted */
StatusCode procFailure(const std::string& reason, const bool aborted = false) const;
private:
void commonInit();
DeSTDetector* getTracker() const;
ISTReadoutTool* getReadoutTool() const;
mutable DeSTDetector* m_tracker;
mutable ISTReadoutTool* m_readoutTool;
std::string m_readoutToolName;
std::string m_detType;
bool m_forcedInit;
mutable std::vector<std::string*> m_toBeFlipped;
};
}
#endif // STKERNEL_STCOMMONBASE_H
|
f1ee341a4dd75505a6c91a1948e4466aa598d535
|
75ae2e16b483f34c86538a2015416e03c563ae06
|
/code/windows/qt/dialog_ui/dialog.cpp
|
3ac2173e06d71db5f9ddc8a9c3abc6620b11f17f
|
[] |
no_license
|
nijiahe/code
|
962d61efced0e4b7af0fcb93f158a489ed9237b0
|
4ac258c2e968d9bdfea7ffb76d1da4d79d6de94a
|
refs/heads/master
| 2021-02-08T00:49:28.074815
| 2020-03-01T05:32:44
| 2020-03-01T05:32:44
| 244,090,411
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 464
|
cpp
|
dialog.cpp
|
#include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
x=y=cx=cy=0;
}
Dialog::~Dialog()
{
delete ui;
}
void Dialog::on_pushButton_clicked()
{
QString str1=ui->lineEdit->text();
QString str2=ui->lineEdit_2->text();
double db1=str1.toDouble();
double db2=str2.toDouble();
QString str3;
str3.setNum(db1+db2);
ui->label->setText(str3);
}
|
6dcb9c6468a88d529d95c92807a4e17ad24e2864
|
510afaf6e11518f06e1e22e56f0dc556d7a32452
|
/Lab_6_Class_Factory/Class_B.cpp
|
2c3dd3782715cdb73d74156ade47a50b65988651
|
[] |
no_license
|
VladMurat/Lab_6
|
b39710017773512b3a033328a1522817375ef964
|
eae9a204c0330f3ad30403276407df0430a6f65a
|
refs/heads/master
| 2021-01-16T00:22:13.646581
| 2014-06-03T18:11:41
| 2014-06-03T18:11:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 138
|
cpp
|
Class_B.cpp
|
#include "Class_B.h"
Class_B::Class_B(void)
{
}
Class_B::~Class_B(void)
{
}
void Class_B::Show(void)
{
cout<<"Class B"<<endl;
}
|
9fd182a3891258280a8a2abc12db974abd99dde0
|
8894ab29e8c99f964b33075e306c5db7f984247a
|
/DataStructure/review/LinearList.cpp
|
c011b1d1aa98dafc84a33672f72b579e25f4f9d9
|
[] |
no_license
|
WooKimm/Homework
|
d5e5d29cddcae66d50fda9259f7b4d1e9f5b38fc
|
58efb0f6c5fe6460cc572353ca94e7cc29a4227c
|
refs/heads/master
| 2022-01-04T22:36:30.251938
| 2018-07-28T08:29:46
| 2018-07-28T08:29:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,525
|
cpp
|
LinearList.cpp
|
//Linear List(Sequential List)
//ADT of 1D Array
#include <iostream>
#include <stdlib.h>
template <class T>
class Array{
private:
T *elements;
int ArraySize;
void getArray();
public:
Array(int Size = DefaultSize);//constructor
Array(const Array<T>& x);//copy constructor
~Array(){delete []elements}
Array<T> & operator = (const Array<T> & A);
T & operator [] (int i);
T * operator () const{return elements;}
int Length() const{return ArraySize;}
void ReSize(int sz);
}
template <class T>
void Array<T>::getArray(){
elements = new T[ArraySize];
if(elements == 0){
ArraySize = 0;
cerr<<"Error"<<endl;
return;
}
}
template <class T>
Array<T>::Array(int sz){
if(sz<0){
ArraySize = 0;
cerr<<"Invalid size"<<endl;
return;
}
ArraySize = sz;
getArray();
}
template <class T>
Array<T>::Array(const Array<T> & x){
int n = ArraySize = x.ArraySize;
elements = new T[n];
if(elements == 0){
ArraySize = 0;
cerr<<"Error"<<endl;
return;
}
T *srcptr = x.elements;
T *destptr = elements;
while(n--) *destptr++ = * srcptr++;
}
template <class T>
T & Array<T>::operator[](int i){
if(i<0 || i>ArraySize-1){
cerr<<"out bound"<<endl;
return NULL;
}
return elements[i];
}
template class<T>
void Array<T>::ReSize(int sz){
if(sz>=0 && sz!=ArraySize){
T * newarray = new T[sz];
if(newarray = 0){
cerr<<"Error"<<endl;
return;
}
int n = (sz<=ArraySize)?sz:ArraySize;
T *srcptr = elements;
T *destptr = newarray;
while(n--) *destptr++ = *srcptr++;
delete []elements;
elements = newarray;
ArraySize = sz;
}
}
//ADT of Sequential List
template <class T>
class SeqList{
private:
T *data;
int MaxSize;
int last;
public:
SeqList (int MaxSize = DefaultSize);
~SeqList(){delete [] data;}
int Length()const{return last+1}
int Find(T & x) const;
int IsIn(T & x);
int Insert(T & x, int i);
int Remove(T & x);
int Prior(T & x);
int Next(T & x);
int IsEmpty(){return last == -1;}
int IsFull(){return last==MaxSize-1;}
T Get(int i){
return i<0||i>last?NULL:data[i];
}
}
template <class T>
SeqList<T>::SeqList(int sz){
if(sz>0){
MaxSize = sz;
last = -1;
data = new T[MaxSize];
if(data == NULL){
MaxSize = 0;
last = -1;
return;
}
}
}
template class<T>
SeqList<T>::Find(T & x)const{
int i=0;
while(i<=last && data[i]!=x)
i++;
if(i>last) return -1;
else return i;
}
template <class T>
int SeqList<T>::Insert(T & x, int i){
if(i<0||i>last+1||last==MaxSize-1)
return 0;
else{
last++;
for(int j=last;j>i;j--){
data[j] = data[j-1];
}
data[i] = x;
return 1;
}
}
template <class T>
int SeqList<T>::Remove(T & x){
int i = Find(x);
if(i>=0){
last--;
for(int j=i;j<last;j++){
data[j] = data[j+1];
}
return 1;
}
return 0;
}
//Union of two Sets 并集
template <class T>
void Union(SeqList<T> & LA, SeqList<T> & LB){
int n = LA.Length();
int m = LB.Length();
for(int i=1;i<=m;i++){
T x = LB.Get(i);
int k = LA.Find(x);
if(k==-1){
LA.Insert(x,n+1);
n++;
}
}
}
//Intersection of two sets
template <class T>
void Intersection(SeqList<T> & LA, SeqList<T> & LB){
int n = LA.Length();
int m = LB.Length();
int i=0;
while(i<n){
T x = LA.Get(i);
int k = LB.Find(x);
if(k==-1){
LA.Remove(i);
n--;
}
else i++;
}
}
//Merge two sorted list
template <class T>
SeqList & Merge_List(SeqList<T> & LA, SeqList<T> & LB){
int n = LA.Length();
int m = LB.Length();
SeqList LC(m+n);
int i=j=k=0;
while(i<n && j<m){
T x = LA.Get(i);
T y = LB.Get(j);
if(x<=y){
LC.Insert(k,x);
i++;
k++;
}
else{
LC.Insert(k,y);
j++;
k++;
}
}
while(i<n){
T x = LA.Get(i);
LC.Insert(k,x);
i++;
k++;
}
while(j<m){
T y = LA.Get(i);
LC.Insert(k,y);
j++;
k++;
}
return LC;
}
|
bfa9c077538c842075e6bed7e770afb9fca9065f
|
78dc9f153549b281be709227bc9897931b06260d
|
/generation/WinSDK/RecompiledIdlHeaders/um/urlmon.h
|
8b30d8613690272623678d0f6373e25582b40919
|
[
"MIT"
] |
permissive
|
microsoft/win32metadata
|
dff35b4fe904d556162cee5133294c4498f1a79a
|
5bf233f04d45f7a697e112e9639722551103eb07
|
refs/heads/main
| 2023-09-01T19:51:22.972899
| 2023-08-30T21:39:44
| 2023-08-30T21:39:44
| 270,838,404
| 1,240
| 107
|
NOASSERTION
| 2023-09-14T18:49:44
| 2020-06-08T21:52:10
|
C++
|
UTF-8
|
C++
| false
| false
| 431,580
|
h
|
urlmon.h
|
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0628 */
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 500
#endif
/* verify that the <rpcsal.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCSAL_H_VERSION__
#define __REQUIRED_RPCSAL_H_VERSION__ 100
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/
#ifndef __urlmon_h__
#define __urlmon_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#ifndef DECLSPEC_XFGVIRT
#if defined(_CONTROL_FLOW_GUARD_XFG)
#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
#else
#define DECLSPEC_XFGVIRT(base, func)
#endif
#endif
/* Forward Declarations */
#ifndef __IPersistMoniker_FWD_DEFINED__
#define __IPersistMoniker_FWD_DEFINED__
typedef interface IPersistMoniker IPersistMoniker;
#endif /* __IPersistMoniker_FWD_DEFINED__ */
#ifndef __IMonikerProp_FWD_DEFINED__
#define __IMonikerProp_FWD_DEFINED__
typedef interface IMonikerProp IMonikerProp;
#endif /* __IMonikerProp_FWD_DEFINED__ */
#ifndef __IBindProtocol_FWD_DEFINED__
#define __IBindProtocol_FWD_DEFINED__
typedef interface IBindProtocol IBindProtocol;
#endif /* __IBindProtocol_FWD_DEFINED__ */
#ifndef __IBinding_FWD_DEFINED__
#define __IBinding_FWD_DEFINED__
typedef interface IBinding IBinding;
#endif /* __IBinding_FWD_DEFINED__ */
#ifndef __IBindStatusCallback_FWD_DEFINED__
#define __IBindStatusCallback_FWD_DEFINED__
typedef interface IBindStatusCallback IBindStatusCallback;
#endif /* __IBindStatusCallback_FWD_DEFINED__ */
#ifndef __IBindStatusCallbackEx_FWD_DEFINED__
#define __IBindStatusCallbackEx_FWD_DEFINED__
typedef interface IBindStatusCallbackEx IBindStatusCallbackEx;
#endif /* __IBindStatusCallbackEx_FWD_DEFINED__ */
#ifndef __IAuthenticate_FWD_DEFINED__
#define __IAuthenticate_FWD_DEFINED__
typedef interface IAuthenticate IAuthenticate;
#endif /* __IAuthenticate_FWD_DEFINED__ */
#ifndef __IAuthenticateEx_FWD_DEFINED__
#define __IAuthenticateEx_FWD_DEFINED__
typedef interface IAuthenticateEx IAuthenticateEx;
#endif /* __IAuthenticateEx_FWD_DEFINED__ */
#ifndef __IHttpNegotiate_FWD_DEFINED__
#define __IHttpNegotiate_FWD_DEFINED__
typedef interface IHttpNegotiate IHttpNegotiate;
#endif /* __IHttpNegotiate_FWD_DEFINED__ */
#ifndef __IHttpNegotiate2_FWD_DEFINED__
#define __IHttpNegotiate2_FWD_DEFINED__
typedef interface IHttpNegotiate2 IHttpNegotiate2;
#endif /* __IHttpNegotiate2_FWD_DEFINED__ */
#ifndef __IHttpNegotiate3_FWD_DEFINED__
#define __IHttpNegotiate3_FWD_DEFINED__
typedef interface IHttpNegotiate3 IHttpNegotiate3;
#endif /* __IHttpNegotiate3_FWD_DEFINED__ */
#ifndef __IWinInetFileStream_FWD_DEFINED__
#define __IWinInetFileStream_FWD_DEFINED__
typedef interface IWinInetFileStream IWinInetFileStream;
#endif /* __IWinInetFileStream_FWD_DEFINED__ */
#ifndef __IWindowForBindingUI_FWD_DEFINED__
#define __IWindowForBindingUI_FWD_DEFINED__
typedef interface IWindowForBindingUI IWindowForBindingUI;
#endif /* __IWindowForBindingUI_FWD_DEFINED__ */
#ifndef __ICodeInstall_FWD_DEFINED__
#define __ICodeInstall_FWD_DEFINED__
typedef interface ICodeInstall ICodeInstall;
#endif /* __ICodeInstall_FWD_DEFINED__ */
#ifndef __IUri_FWD_DEFINED__
#define __IUri_FWD_DEFINED__
typedef interface IUri IUri;
#endif /* __IUri_FWD_DEFINED__ */
#ifndef __IUriContainer_FWD_DEFINED__
#define __IUriContainer_FWD_DEFINED__
typedef interface IUriContainer IUriContainer;
#endif /* __IUriContainer_FWD_DEFINED__ */
#ifndef __IUriBuilder_FWD_DEFINED__
#define __IUriBuilder_FWD_DEFINED__
typedef interface IUriBuilder IUriBuilder;
#endif /* __IUriBuilder_FWD_DEFINED__ */
#ifndef __IUriBuilderFactory_FWD_DEFINED__
#define __IUriBuilderFactory_FWD_DEFINED__
typedef interface IUriBuilderFactory IUriBuilderFactory;
#endif /* __IUriBuilderFactory_FWD_DEFINED__ */
#ifndef __IWinInetInfo_FWD_DEFINED__
#define __IWinInetInfo_FWD_DEFINED__
typedef interface IWinInetInfo IWinInetInfo;
#endif /* __IWinInetInfo_FWD_DEFINED__ */
#ifndef __IHttpSecurity_FWD_DEFINED__
#define __IHttpSecurity_FWD_DEFINED__
typedef interface IHttpSecurity IHttpSecurity;
#endif /* __IHttpSecurity_FWD_DEFINED__ */
#ifndef __IWinInetHttpInfo_FWD_DEFINED__
#define __IWinInetHttpInfo_FWD_DEFINED__
typedef interface IWinInetHttpInfo IWinInetHttpInfo;
#endif /* __IWinInetHttpInfo_FWD_DEFINED__ */
#ifndef __IWinInetHttpTimeouts_FWD_DEFINED__
#define __IWinInetHttpTimeouts_FWD_DEFINED__
typedef interface IWinInetHttpTimeouts IWinInetHttpTimeouts;
#endif /* __IWinInetHttpTimeouts_FWD_DEFINED__ */
#ifndef __IWinInetCacheHints_FWD_DEFINED__
#define __IWinInetCacheHints_FWD_DEFINED__
typedef interface IWinInetCacheHints IWinInetCacheHints;
#endif /* __IWinInetCacheHints_FWD_DEFINED__ */
#ifndef __IWinInetCacheHints2_FWD_DEFINED__
#define __IWinInetCacheHints2_FWD_DEFINED__
typedef interface IWinInetCacheHints2 IWinInetCacheHints2;
#endif /* __IWinInetCacheHints2_FWD_DEFINED__ */
#ifndef __IBindHost_FWD_DEFINED__
#define __IBindHost_FWD_DEFINED__
typedef interface IBindHost IBindHost;
#endif /* __IBindHost_FWD_DEFINED__ */
#ifndef __IInternet_FWD_DEFINED__
#define __IInternet_FWD_DEFINED__
typedef interface IInternet IInternet;
#endif /* __IInternet_FWD_DEFINED__ */
#ifndef __IInternetBindInfo_FWD_DEFINED__
#define __IInternetBindInfo_FWD_DEFINED__
typedef interface IInternetBindInfo IInternetBindInfo;
#endif /* __IInternetBindInfo_FWD_DEFINED__ */
#ifndef __IInternetBindInfoEx_FWD_DEFINED__
#define __IInternetBindInfoEx_FWD_DEFINED__
typedef interface IInternetBindInfoEx IInternetBindInfoEx;
#endif /* __IInternetBindInfoEx_FWD_DEFINED__ */
#ifndef __IInternetProtocolRoot_FWD_DEFINED__
#define __IInternetProtocolRoot_FWD_DEFINED__
typedef interface IInternetProtocolRoot IInternetProtocolRoot;
#endif /* __IInternetProtocolRoot_FWD_DEFINED__ */
#ifndef __IInternetProtocol_FWD_DEFINED__
#define __IInternetProtocol_FWD_DEFINED__
typedef interface IInternetProtocol IInternetProtocol;
#endif /* __IInternetProtocol_FWD_DEFINED__ */
#ifndef __IInternetProtocolEx_FWD_DEFINED__
#define __IInternetProtocolEx_FWD_DEFINED__
typedef interface IInternetProtocolEx IInternetProtocolEx;
#endif /* __IInternetProtocolEx_FWD_DEFINED__ */
#ifndef __IInternetProtocolSink_FWD_DEFINED__
#define __IInternetProtocolSink_FWD_DEFINED__
typedef interface IInternetProtocolSink IInternetProtocolSink;
#endif /* __IInternetProtocolSink_FWD_DEFINED__ */
#ifndef __IInternetProtocolSinkStackable_FWD_DEFINED__
#define __IInternetProtocolSinkStackable_FWD_DEFINED__
typedef interface IInternetProtocolSinkStackable IInternetProtocolSinkStackable;
#endif /* __IInternetProtocolSinkStackable_FWD_DEFINED__ */
#ifndef __IInternetSession_FWD_DEFINED__
#define __IInternetSession_FWD_DEFINED__
typedef interface IInternetSession IInternetSession;
#endif /* __IInternetSession_FWD_DEFINED__ */
#ifndef __IInternetThreadSwitch_FWD_DEFINED__
#define __IInternetThreadSwitch_FWD_DEFINED__
typedef interface IInternetThreadSwitch IInternetThreadSwitch;
#endif /* __IInternetThreadSwitch_FWD_DEFINED__ */
#ifndef __IInternetPriority_FWD_DEFINED__
#define __IInternetPriority_FWD_DEFINED__
typedef interface IInternetPriority IInternetPriority;
#endif /* __IInternetPriority_FWD_DEFINED__ */
#ifndef __IInternetProtocolInfo_FWD_DEFINED__
#define __IInternetProtocolInfo_FWD_DEFINED__
typedef interface IInternetProtocolInfo IInternetProtocolInfo;
#endif /* __IInternetProtocolInfo_FWD_DEFINED__ */
#ifndef __IInternetSecurityMgrSite_FWD_DEFINED__
#define __IInternetSecurityMgrSite_FWD_DEFINED__
typedef interface IInternetSecurityMgrSite IInternetSecurityMgrSite;
#endif /* __IInternetSecurityMgrSite_FWD_DEFINED__ */
#ifndef __IInternetSecurityManager_FWD_DEFINED__
#define __IInternetSecurityManager_FWD_DEFINED__
typedef interface IInternetSecurityManager IInternetSecurityManager;
#endif /* __IInternetSecurityManager_FWD_DEFINED__ */
#ifndef __IInternetSecurityManagerEx_FWD_DEFINED__
#define __IInternetSecurityManagerEx_FWD_DEFINED__
typedef interface IInternetSecurityManagerEx IInternetSecurityManagerEx;
#endif /* __IInternetSecurityManagerEx_FWD_DEFINED__ */
#ifndef __IInternetSecurityManagerEx2_FWD_DEFINED__
#define __IInternetSecurityManagerEx2_FWD_DEFINED__
typedef interface IInternetSecurityManagerEx2 IInternetSecurityManagerEx2;
#endif /* __IInternetSecurityManagerEx2_FWD_DEFINED__ */
#ifndef __IZoneIdentifier_FWD_DEFINED__
#define __IZoneIdentifier_FWD_DEFINED__
typedef interface IZoneIdentifier IZoneIdentifier;
#endif /* __IZoneIdentifier_FWD_DEFINED__ */
#ifndef __IZoneIdentifier2_FWD_DEFINED__
#define __IZoneIdentifier2_FWD_DEFINED__
typedef interface IZoneIdentifier2 IZoneIdentifier2;
#endif /* __IZoneIdentifier2_FWD_DEFINED__ */
#ifndef __IInternetHostSecurityManager_FWD_DEFINED__
#define __IInternetHostSecurityManager_FWD_DEFINED__
typedef interface IInternetHostSecurityManager IInternetHostSecurityManager;
#endif /* __IInternetHostSecurityManager_FWD_DEFINED__ */
#ifndef __IInternetZoneManager_FWD_DEFINED__
#define __IInternetZoneManager_FWD_DEFINED__
typedef interface IInternetZoneManager IInternetZoneManager;
#endif /* __IInternetZoneManager_FWD_DEFINED__ */
#ifndef __IInternetZoneManagerEx_FWD_DEFINED__
#define __IInternetZoneManagerEx_FWD_DEFINED__
typedef interface IInternetZoneManagerEx IInternetZoneManagerEx;
#endif /* __IInternetZoneManagerEx_FWD_DEFINED__ */
#ifndef __IInternetZoneManagerEx2_FWD_DEFINED__
#define __IInternetZoneManagerEx2_FWD_DEFINED__
typedef interface IInternetZoneManagerEx2 IInternetZoneManagerEx2;
#endif /* __IInternetZoneManagerEx2_FWD_DEFINED__ */
#ifndef __ISoftDistExt_FWD_DEFINED__
#define __ISoftDistExt_FWD_DEFINED__
typedef interface ISoftDistExt ISoftDistExt;
#endif /* __ISoftDistExt_FWD_DEFINED__ */
#ifndef __ICatalogFileInfo_FWD_DEFINED__
#define __ICatalogFileInfo_FWD_DEFINED__
typedef interface ICatalogFileInfo ICatalogFileInfo;
#endif /* __ICatalogFileInfo_FWD_DEFINED__ */
#ifndef __IDataFilter_FWD_DEFINED__
#define __IDataFilter_FWD_DEFINED__
typedef interface IDataFilter IDataFilter;
#endif /* __IDataFilter_FWD_DEFINED__ */
#ifndef __IEncodingFilterFactory_FWD_DEFINED__
#define __IEncodingFilterFactory_FWD_DEFINED__
typedef interface IEncodingFilterFactory IEncodingFilterFactory;
#endif /* __IEncodingFilterFactory_FWD_DEFINED__ */
#ifndef __IWrappedProtocol_FWD_DEFINED__
#define __IWrappedProtocol_FWD_DEFINED__
typedef interface IWrappedProtocol IWrappedProtocol;
#endif /* __IWrappedProtocol_FWD_DEFINED__ */
#ifndef __IGetBindHandle_FWD_DEFINED__
#define __IGetBindHandle_FWD_DEFINED__
typedef interface IGetBindHandle IGetBindHandle;
#endif /* __IGetBindHandle_FWD_DEFINED__ */
#ifndef __IBindCallbackRedirect_FWD_DEFINED__
#define __IBindCallbackRedirect_FWD_DEFINED__
typedef interface IBindCallbackRedirect IBindCallbackRedirect;
#endif /* __IBindCallbackRedirect_FWD_DEFINED__ */
#ifndef __IBindHttpSecurity_FWD_DEFINED__
#define __IBindHttpSecurity_FWD_DEFINED__
typedef interface IBindHttpSecurity IBindHttpSecurity;
#endif /* __IBindHttpSecurity_FWD_DEFINED__ */
/* header files for imported files */
#include "objidl.h"
#include "oleidl.h"
#include "servprov.h"
#include "msxml.h"
#ifdef __cplusplus
extern "C"{
#endif
/* interface __MIDL_itf_urlmon_0000_0000 */
/* [local] */
//=--------------------------------------------------------------------------=
// UrlMon.h
//=--------------------------------------------------------------------------=
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
#pragma comment(lib,"uuid.lib")
//---------------------------------------------------------------------------=
// URL Moniker Interfaces.
#include <winapifamily.h>
#if _MSC_VER >= 1200
#pragma warning(push)
#ifndef _MSC_EXTENSIONS
#pragma warning(disable:4309) /* truncation of constant value */
#endif
#pragma warning(disable:4820) /* padding added after data member */
#endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// Side-by-Side clsid
EXTERN_C const IID CLSID_SBS_StdURLMoniker;
EXTERN_C const IID CLSID_SBS_HttpProtocol;
EXTERN_C const IID CLSID_SBS_FtpProtocol;
EXTERN_C const IID CLSID_SBS_GopherProtocol;
EXTERN_C const IID CLSID_SBS_HttpSProtocol;
EXTERN_C const IID CLSID_SBS_FileProtocol;
EXTERN_C const IID CLSID_SBS_MkProtocol;
EXTERN_C const IID CLSID_SBS_UrlMkBindCtx;
EXTERN_C const IID CLSID_SBS_SoftDistExt;
EXTERN_C const IID CLSID_SBS_CdlProtocol;
EXTERN_C const IID CLSID_SBS_ClassInstallFilter;
EXTERN_C const IID CLSID_SBS_InternetSecurityManager;
EXTERN_C const IID CLSID_SBS_InternetZoneManager;
// END Side-by-Side clsid
// These are for backwards compatibility with previous URLMON versions
#define BINDF_DONTUSECACHE BINDF_GETNEWESTVERSION
#define BINDF_DONTPUTINCACHE BINDF_NOWRITECACHE
#define BINDF_NOCOPYDATA BINDF_PULLDATA
#define INVALID_P_ROOT_SECURITY_ID ((BYTE*)-1)
#define PI_DOCFILECLSIDLOOKUP PI_CLSIDLOOKUP
EXTERN_C const IID IID_IAsyncMoniker;
EXTERN_C const IID CLSID_StdURLMoniker;
EXTERN_C const IID CLSID_HttpProtocol;
EXTERN_C const IID CLSID_FtpProtocol;
EXTERN_C const IID CLSID_GopherProtocol;
EXTERN_C const IID CLSID_HttpSProtocol;
EXTERN_C const IID CLSID_FileProtocol;
EXTERN_C const IID CLSID_ResProtocol;
EXTERN_C const IID CLSID_AboutProtocol;
EXTERN_C const IID CLSID_JSProtocol;
EXTERN_C const IID CLSID_MailtoProtocol;
EXTERN_C const IID CLSID_IE4_PROTOCOLS;
EXTERN_C const IID CLSID_MkProtocol;
EXTERN_C const IID CLSID_StdURLProtocol;
EXTERN_C const IID CLSID_TBAuthProtocol;
EXTERN_C const IID CLSID_UrlMkBindCtx;
EXTERN_C const IID CLSID_CdlProtocol;
EXTERN_C const IID CLSID_ClassInstallFilter;
EXTERN_C const IID IID_IAsyncBindCtx;
#define SZ_URLCONTEXT OLESTR("URL Context")
#define SZ_ASYNC_CALLEE OLESTR("AsyncCallee")
#define MKSYS_URLMONIKER 6
#define URL_MK_LEGACY 0
#define URL_MK_UNIFORM 1
#define URL_MK_NO_CANONICALIZE 2
STDAPI CreateURLMoniker(_In_opt_ LPMONIKER pMkCtx, _In_ LPCWSTR szURL, _Outptr_ LPMONIKER FAR * ppmk);
STDAPI CreateURLMonikerEx(_In_opt_ LPMONIKER pMkCtx, _In_ LPCWSTR szURL, _Outptr_ LPMONIKER FAR * ppmk, DWORD dwFlags);
STDAPI GetClassURL(_In_ LPCWSTR szURL, _Out_ CLSID *pClsID);
STDAPI CreateAsyncBindCtx(DWORD reserved, _In_ IBindStatusCallback *pBSCb,
_In_opt_ IEnumFORMATETC *pEFetc, _Outptr_ IBindCtx **ppBC);
#if (_WIN32_IE >= _WIN32_IE_IE70)
STDAPI CreateURLMonikerEx2(_In_opt_ LPMONIKER pMkCtx, _In_ IUri* pUri, _Outptr_ LPMONIKER FAR * ppmk, DWORD dwFlags);
#endif
STDAPI CreateAsyncBindCtxEx(_In_ IBindCtx *pbc, DWORD dwOptions, _In_ IBindStatusCallback *pBSCb, _In_opt_ IEnumFORMATETC *pEnum,
_Outptr_ IBindCtx **ppBC, DWORD reserved);
STDAPI MkParseDisplayNameEx(_In_ IBindCtx *pbc, _In_ LPCWSTR szDisplayName, _Out_ _Out_range_(<=, _String_length_(szDisplayName)) ULONG *pchEaten,
_Outptr_ LPMONIKER *ppmk);
STDAPI RegisterBindStatusCallback(_In_ LPBC pBC, _In_ IBindStatusCallback *pBSCb,
_Outptr_ IBindStatusCallback** ppBSCBPrev, DWORD dwReserved);
STDAPI RevokeBindStatusCallback(_In_ LPBC pBC, _In_ IBindStatusCallback *pBSCb);
STDAPI GetClassFileOrMime(_In_opt_ LPBC pBC, _In_opt_ LPCWSTR szFilename, _In_reads_bytes_opt_(cbSize) LPVOID pBuffer, DWORD cbSize, _In_opt_ LPCWSTR szMime, DWORD dwReserved, _Out_ CLSID *pclsid);
STDAPI IsValidURL(_In_opt_ LPBC pBC, _In_ LPCWSTR szURL, DWORD dwReserved);
STDAPI CoGetClassObjectFromURL( _In_ REFCLSID rCLASSID,
_In_ LPCWSTR szCODE, DWORD dwFileVersionMS,
DWORD dwFileVersionLS, _In_ LPCWSTR szTYPE,
_In_ LPBINDCTX pBindCtx, DWORD dwClsContext,
_Reserved_ LPVOID pvReserved, REFIID riid, _Outptr_ LPVOID * ppv);
STDAPI IEInstallScope(_Out_ LPDWORD pdwScope);
STDAPI FaultInIEFeature( HWND hWnd,
_In_ uCLSSPEC *pClassSpec,
_Inout_opt_ QUERYCONTEXT *pQuery, DWORD dwFlags);
STDAPI GetComponentIDFromCLSSPEC(_In_ uCLSSPEC *pClassspec,
_Outptr_ LPSTR * ppszComponentID);
// flags for FaultInIEFeature
#define FIEF_FLAG_FORCE_JITUI 0x1 // force JIT ui even if
// previoulsy rejected by
// user in this session or
// marked as Never Ask Again
#define FIEF_FLAG_PEEK 0x2 // just peek, don't faultin
#define FIEF_FLAG_SKIP_INSTALLED_VERSION_CHECK 0x4 // force JIT without checking local version
#define FIEF_FLAG_RESERVED_0 0x8 // reserved
//helper apis
STDAPI IsAsyncMoniker(_In_ IMoniker* pmk);
STDAPI CreateURLBinding(LPCWSTR lpszUrl, _In_ IBindCtx *pbc, _Inout_ IBinding **ppBdg);
STDAPI RegisterMediaTypes(_In_ _In_range_(>, 0) UINT ctypes, _In_reads_(ctypes) const LPCSTR* rgszTypes, _Out_writes_(ctypes) CLIPFORMAT* rgcfTypes);
STDAPI FindMediaType(_In_ LPCSTR rgszTypes, _Out_ CLIPFORMAT* rgcfTypes);
STDAPI CreateFormatEnumerator( _In_ _In_range_(>, 0) UINT cfmtetc, _In_reads_(cfmtetc) FORMATETC* rgfmtetc, _Outptr_ IEnumFORMATETC** ppenumfmtetc);
STDAPI RegisterFormatEnumerator(_In_ LPBC pBC, _In_ IEnumFORMATETC *pEFetc, DWORD reserved);
STDAPI RevokeFormatEnumerator(_In_ LPBC pBC, _In_ IEnumFORMATETC *pEFetc);
STDAPI RegisterMediaTypeClass(_In_ LPBC pBC, _In_ _In_range_(>, 0) UINT ctypes, _In_reads_(ctypes) const LPCSTR* rgszTypes, _In_reads_(ctypes) CLSID *rgclsID, DWORD reserved);
STDAPI FindMediaTypeClass(_In_ LPBC pBC, _In_ LPCSTR szType, _Out_ CLSID *pclsID, DWORD reserved);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
STDAPI UrlMkSetSessionOption(DWORD dwOption, _In_reads_bytes_opt_(dwBufferLength) LPVOID pBuffer, DWORD dwBufferLength, _Reserved_ DWORD dwReserved);
STDAPI UrlMkGetSessionOption(DWORD dwOption, _Out_writes_bytes_to_opt_(dwBufferLength,*pdwBufferLengthOut) LPVOID pBuffer, DWORD dwBufferLength, _Out_ DWORD *pdwBufferLengthOut, _Reserved_ DWORD dwReserved);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
STDAPI FindMimeFromData(
_In_opt_ LPBC pBC, // bind context - can be NULL
_In_opt_ LPCWSTR pwzUrl, // url - can be null
_In_reads_bytes_opt_(cbSize) LPVOID pBuffer, // buffer with data to sniff - can be null (pwzUrl must be valid)
DWORD cbSize, // size of buffer
_In_opt_ LPCWSTR pwzMimeProposed, // proposed mime if - can be null
DWORD dwMimeFlags, // will be defined
_Outptr_ LPWSTR *ppwzMimeOut, // the suggested mime
_Reserved_ DWORD dwReserved); // must be 0
#define FMFD_DEFAULT 0x00000000
#define FMFD_URLASFILENAME 0x00000001
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define FMFD_ENABLEMIMESNIFFING 0x00000002
#define FMFD_IGNOREMIMETEXTPLAIN 0x00000004
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#define FMFD_SERVERMIME 0x00000008
#define FMFD_RESPECTTEXTPLAIN 0x00000010
#define FMFD_RETURNUPDATEDIMGMIMES 0x00000020
#define FMFD_RESERVED_1 0x00000040
#define FMFD_RESERVED_2 0x00000080
#define UAS_EXACTLEGACY 0x00001000
STDAPI ObtainUserAgentString(
DWORD dwOption,
_Out_writes_to_(*cbSize, *cbSize) LPSTR pszUAOut,
_Inout_ DWORD *cbSize);
STDAPI CompareSecurityIds(_In_reads_(dwLen1) BYTE* pbSecurityId1, _In_ DWORD dwLen1, _In_reads_(dwLen2) BYTE* pbSecurityId2, _In_ DWORD dwLen2, _In_ DWORD dwReserved);
STDAPI CompatFlagsFromClsid(_In_ CLSID *pclsid, _Out_ LPDWORD pdwCompatFlags, _Out_ LPDWORD pdwMiscStatusFlags);
#if (NTDDI_VERSION > NTDDI_WINBLUE || (NTDDI_VERSION == NTDDI_WINBLUE && defined(WINBLUE_KBSPRING14)))
// Enhanced Protected Mode (EPM) Convenience Functions
typedef enum IEObjectType
{
IE_EPM_OBJECT_EVENT,
IE_EPM_OBJECT_MUTEX,
IE_EPM_OBJECT_SEMAPHORE,
IE_EPM_OBJECT_SHARED_MEMORY,
IE_EPM_OBJECT_WAITABLE_TIMER,
IE_EPM_OBJECT_FILE,
IE_EPM_OBJECT_NAMED_PIPE,
IE_EPM_OBJECT_REGISTRY,
} IEObjectType;
STDAPI SetAccessForIEAppContainer(
_In_ HANDLE hObject,
_In_ IEObjectType ieObjectType,
_In_ DWORD dwAccessMask
);
#endif
// URLMON-specific defines for UrlMkSetSessionOption() above
#define URLMON_OPTION_USERAGENT 0x10000001
#define URLMON_OPTION_USERAGENT_REFRESH 0x10000002
#define URLMON_OPTION_URL_ENCODING 0x10000004
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define URLMON_OPTION_USE_BINDSTRINGCREDS 0x10000008
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define URLMON_OPTION_USE_BROWSERAPPSDOCUMENTS 0x10000010
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
#define CF_NULL 0
#define CFSTR_MIME_NULL NULL
#define CFSTR_MIME_TEXT (TEXT("text/plain"))
#define CFSTR_MIME_RICHTEXT (TEXT("text/richtext"))
#define CFSTR_MIME_MANIFEST (TEXT("text/cache-manifest"))
#define CFSTR_MIME_WEBVTT (TEXT("text/vtt"))
#define CFSTR_MIME_X_BITMAP (TEXT("image/x-xbitmap"))
#define CFSTR_MIME_POSTSCRIPT (TEXT("application/postscript"))
#define CFSTR_MIME_AIFF (TEXT("audio/aiff"))
#define CFSTR_MIME_BASICAUDIO (TEXT("audio/basic"))
#define CFSTR_MIME_WAV (TEXT("audio/wav"))
#define CFSTR_MIME_X_WAV (TEXT("audio/x-wav"))
#define CFSTR_MIME_GIF (TEXT("image/gif"))
#define CFSTR_MIME_PJPEG (TEXT("image/pjpeg"))
#define CFSTR_MIME_JPEG (TEXT("image/jpeg"))
#define CFSTR_MIME_TIFF (TEXT("image/tiff"))
#define CFSTR_MIME_JPEG_XR (TEXT("image/vnd.ms-photo"))
#define CFSTR_MIME_PNG (TEXT("image/png"))
#define CFSTR_MIME_DDS (TEXT("image/vnd.ms-dds"))
#define CFSTR_MIME_X_PNG (TEXT("image/x-png"))
#define CFSTR_MIME_X_ICON (TEXT("image/x-icon"))
#define CFSTR_MIME_SVG_XML (TEXT("image/svg+xml"))
#define CFSTR_MIME_BMP (TEXT("image/bmp"))
#define CFSTR_MIME_X_EMF (TEXT("image/x-emf"))
#define CFSTR_MIME_X_WMF (TEXT("image/x-wmf"))
#define CFSTR_MIME_AVI (TEXT("video/avi"))
#define CFSTR_MIME_MPEG (TEXT("video/mpeg"))
#define CFSTR_MIME_FRACTALS (TEXT("application/fractals"))
#define CFSTR_MIME_RAWDATA (TEXT("application/octet-stream"))
#define CFSTR_MIME_RAWDATASTRM (TEXT("application/octet-stream"))
#define CFSTR_MIME_PDF (TEXT("application/pdf"))
#define CFSTR_MIME_HTA (TEXT("application/hta"))
#define CFSTR_MIME_APP_XML (TEXT("application/xml"))
#define CFSTR_MIME_XHTML (TEXT("application/xhtml+xml"))
#define CFSTR_MIME_X_AIFF (TEXT("audio/x-aiff"))
#define CFSTR_MIME_X_REALAUDIO (TEXT("audio/x-pn-realaudio"))
#define CFSTR_MIME_XBM (TEXT("image/xbm"))
#define CFSTR_MIME_QUICKTIME (TEXT("video/quicktime"))
#define CFSTR_MIME_X_MSVIDEO (TEXT("video/x-msvideo"))
#define CFSTR_MIME_X_SGI_MOVIE (TEXT("video/x-sgi-movie"))
#define CFSTR_MIME_X_MIXED_REPLACE (TEXT("multipart/x-mixed-replace"))
#define CFSTR_MIME_HTML (TEXT("text/html"))
#define CFSTR_MIME_XML (TEXT("text/xml"))
#define CFSTR_MIME_TTML (TEXT("application/ttml+xml"))
#define CFSTR_MIME_TTAF (TEXT("application/ttaf+xml"))
#define CFSTR_MIME_X_JAVASCRIPT (TEXT("application/x-javascript"))
#define CFSTR_MIME_TEXT_JSON (TEXT("text/json"))
#define CFSTR_MIME_APPLICATION_JAVASCRIPT (TEXT("application/javascript"))
// MessageId: MK_S_ASYNCHRONOUS
// MessageText: Operation is successful, but will complete asynchronously.
//
#define MK_S_ASYNCHRONOUS _HRESULT_TYPEDEF_(0x000401E8L)
#ifndef S_ASYNCHRONOUS
#define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS
#endif
#ifndef E_PENDING
#define E_PENDING _HRESULT_TYPEDEF_(0x8000000AL)
#endif
//
//
// WinINet and protocol specific errors are mapped to one of the following
// error which are returned in IBSC::OnStopBinding
//
//
// Note: FACILITY C is split into ranges of 1k
// C0000 - C03FF INET_E_ (URLMON's original hresult)
// C0400 - C07FF INET_E_CLIENT_xxx
// C0800 - C0BFF INET_E_SERVER_xxx
// C0C00 - C0FFF INET_E_????
// C1000 - C13FF INET_E_AGENT_xxx (info delivery agents)
#define INET_E_INVALID_URL _HRESULT_TYPEDEF_(0x800C0002L)
#define INET_E_NO_SESSION _HRESULT_TYPEDEF_(0x800C0003L)
#define INET_E_CANNOT_CONNECT _HRESULT_TYPEDEF_(0x800C0004L)
#define INET_E_RESOURCE_NOT_FOUND _HRESULT_TYPEDEF_(0x800C0005L)
#define INET_E_OBJECT_NOT_FOUND _HRESULT_TYPEDEF_(0x800C0006L)
#define INET_E_DATA_NOT_AVAILABLE _HRESULT_TYPEDEF_(0x800C0007L)
#define INET_E_DOWNLOAD_FAILURE _HRESULT_TYPEDEF_(0x800C0008L)
#define INET_E_AUTHENTICATION_REQUIRED _HRESULT_TYPEDEF_(0x800C0009L)
#define INET_E_NO_VALID_MEDIA _HRESULT_TYPEDEF_(0x800C000AL)
#define INET_E_CONNECTION_TIMEOUT _HRESULT_TYPEDEF_(0x800C000BL)
#define INET_E_INVALID_REQUEST _HRESULT_TYPEDEF_(0x800C000CL)
#define INET_E_UNKNOWN_PROTOCOL _HRESULT_TYPEDEF_(0x800C000DL)
#define INET_E_SECURITY_PROBLEM _HRESULT_TYPEDEF_(0x800C000EL)
#define INET_E_CANNOT_LOAD_DATA _HRESULT_TYPEDEF_(0x800C000FL)
#define INET_E_CANNOT_INSTANTIATE_OBJECT _HRESULT_TYPEDEF_(0x800C0010L)
#define INET_E_INVALID_CERTIFICATE _HRESULT_TYPEDEF_(0x800C0019L)
#define INET_E_REDIRECT_FAILED _HRESULT_TYPEDEF_(0x800C0014L)
#define INET_E_REDIRECT_TO_DIR _HRESULT_TYPEDEF_(0x800C0015L)
#define INET_E_CANNOT_LOCK_REQUEST _HRESULT_TYPEDEF_(0x800C0016L)
#define INET_E_USE_EXTEND_BINDING _HRESULT_TYPEDEF_(0x800C0017L)
#define INET_E_TERMINATED_BIND _HRESULT_TYPEDEF_(0x800C0018L)
#define INET_E_RESERVED_1 _HRESULT_TYPEDEF_(0x800C001AL)
#define INET_E_BLOCKED_REDIRECT_XSECURITYID _HRESULT_TYPEDEF_(0x800C001BL)
#define INET_E_DOMINJECTIONVALIDATION _HRESULT_TYPEDEF_(0x800C001CL)
#define INET_E_VTAB_SWITCH_FORCE_ENGINE _HRESULT_TYPEDEF_(0x800C001DL)
#define INET_E_HSTS_CERTIFICATE_ERROR _HRESULT_TYPEDEF_(0x800C001EL)
#define INET_E_RESERVED_2 _HRESULT_TYPEDEF_(0x800C001FL)
#define INET_E_RESERVED_3 _HRESULT_TYPEDEF_(0x800C0020L)
#define INET_E_RESERVED_4 _HRESULT_TYPEDEF_(0x800C0021L)
#define INET_E_RESERVED_5 _HRESULT_TYPEDEF_(0x800C0022L)
#define INET_E_ERROR_FIRST _HRESULT_TYPEDEF_(0x800C0002L)
#define INET_E_CODE_DOWNLOAD_DECLINED _HRESULT_TYPEDEF_(0x800C0100L)
#define INET_E_RESULT_DISPATCHED _HRESULT_TYPEDEF_(0x800C0200L)
#define INET_E_CANNOT_REPLACE_SFP_FILE _HRESULT_TYPEDEF_(0x800C0300L)
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define INET_E_CODE_INSTALL_SUPPRESSED _HRESULT_TYPEDEF_(0x800C0400L)
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY _HRESULT_TYPEDEF_(0x800C0500L)
#define INET_E_DOWNLOAD_BLOCKED_BY_INPRIVATE _HRESULT_TYPEDEF_(0x800C0501L)
#define INET_E_CODE_INSTALL_BLOCKED_IMMERSIVE _HRESULT_TYPEDEF_(0x800C0502L)
#define INET_E_FORBIDFRAMING _HRESULT_TYPEDEF_(0x800C0503L)
#define INET_E_CODE_INSTALL_BLOCKED_ARM _HRESULT_TYPEDEF_(0x800C0504L)
#define INET_E_BLOCKED_PLUGGABLE_PROTOCOL _HRESULT_TYPEDEF_(0x800C0505L)
#define INET_E_BLOCKED_ENHANCEDPROTECTEDMODE _HRESULT_TYPEDEF_(0x800C0506L)
#define INET_E_CODE_INSTALL_BLOCKED_BITNESS _HRESULT_TYPEDEF_(0x800C0507L)
#define INET_E_DOWNLOAD_BLOCKED_BY_CSP _HRESULT_TYPEDEF_(0x800C0508L)
#define INET_E_ERROR_LAST INET_E_DOWNLOAD_BLOCKED_BY_CSP
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef _LPPERSISTMONIKER_DEFINED
#define _LPPERSISTMONIKER_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0000_v0_0_s_ifspec;
#ifndef __IPersistMoniker_INTERFACE_DEFINED__
#define __IPersistMoniker_INTERFACE_DEFINED__
/* interface IPersistMoniker */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IPersistMoniker *LPPERSISTMONIKER;
EXTERN_C const IID IID_IPersistMoniker;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9c9-baf9-11ce-8c82-00aa004ba90b")
IPersistMoniker : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetClassID(
/* [annotation][out] */
_Out_ CLSID *pClassID) = 0;
virtual HRESULT STDMETHODCALLTYPE IsDirty( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Load(
/* [annotation][in] */
_In_ BOOL fFullyAvailable,
/* [annotation][in] */
_In_ IMoniker *pimkName,
/* [annotation][in] */
_In_ LPBC pibc,
/* [annotation][in] */
_In_ DWORD grfMode) = 0;
virtual HRESULT STDMETHODCALLTYPE Save(
/* [annotation][in] */
_In_ IMoniker *pimkName,
/* [annotation][in] */
_In_ LPBC pbc,
/* [annotation][in] */
_In_ BOOL fRemember) = 0;
virtual HRESULT STDMETHODCALLTYPE SaveCompleted(
/* [annotation][in] */
_In_ IMoniker *pimkName,
/* [annotation][in] */
_In_ LPBC pibc) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurMoniker(
/* [annotation][out] */
_Out_ IMoniker **ppimkName) = 0;
};
#else /* C style interface */
typedef struct IPersistMonikerVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IPersistMoniker * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IPersistMoniker * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IPersistMoniker * This);
DECLSPEC_XFGVIRT(IPersistMoniker, GetClassID)
HRESULT ( STDMETHODCALLTYPE *GetClassID )(
__RPC__in IPersistMoniker * This,
/* [annotation][out] */
_Out_ CLSID *pClassID);
DECLSPEC_XFGVIRT(IPersistMoniker, IsDirty)
HRESULT ( STDMETHODCALLTYPE *IsDirty )(
__RPC__in IPersistMoniker * This);
DECLSPEC_XFGVIRT(IPersistMoniker, Load)
HRESULT ( STDMETHODCALLTYPE *Load )(
__RPC__in IPersistMoniker * This,
/* [annotation][in] */
_In_ BOOL fFullyAvailable,
/* [annotation][in] */
_In_ IMoniker *pimkName,
/* [annotation][in] */
_In_ LPBC pibc,
/* [annotation][in] */
_In_ DWORD grfMode);
DECLSPEC_XFGVIRT(IPersistMoniker, Save)
HRESULT ( STDMETHODCALLTYPE *Save )(
__RPC__in IPersistMoniker * This,
/* [annotation][in] */
_In_ IMoniker *pimkName,
/* [annotation][in] */
_In_ LPBC pbc,
/* [annotation][in] */
_In_ BOOL fRemember);
DECLSPEC_XFGVIRT(IPersistMoniker, SaveCompleted)
HRESULT ( STDMETHODCALLTYPE *SaveCompleted )(
__RPC__in IPersistMoniker * This,
/* [annotation][in] */
_In_ IMoniker *pimkName,
/* [annotation][in] */
_In_ LPBC pibc);
DECLSPEC_XFGVIRT(IPersistMoniker, GetCurMoniker)
HRESULT ( STDMETHODCALLTYPE *GetCurMoniker )(
__RPC__in IPersistMoniker * This,
/* [annotation][out] */
_Out_ IMoniker **ppimkName);
END_INTERFACE
} IPersistMonikerVtbl;
interface IPersistMoniker
{
CONST_VTBL struct IPersistMonikerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IPersistMoniker_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IPersistMoniker_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IPersistMoniker_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IPersistMoniker_GetClassID(This,pClassID) \
( (This)->lpVtbl -> GetClassID(This,pClassID) )
#define IPersistMoniker_IsDirty(This) \
( (This)->lpVtbl -> IsDirty(This) )
#define IPersistMoniker_Load(This,fFullyAvailable,pimkName,pibc,grfMode) \
( (This)->lpVtbl -> Load(This,fFullyAvailable,pimkName,pibc,grfMode) )
#define IPersistMoniker_Save(This,pimkName,pbc,fRemember) \
( (This)->lpVtbl -> Save(This,pimkName,pbc,fRemember) )
#define IPersistMoniker_SaveCompleted(This,pimkName,pibc) \
( (This)->lpVtbl -> SaveCompleted(This,pimkName,pibc) )
#define IPersistMoniker_GetCurMoniker(This,ppimkName) \
( (This)->lpVtbl -> GetCurMoniker(This,ppimkName) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IPersistMoniker_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0001 */
/* [local] */
#endif
#ifndef _LPMONIKERPROP_DEFINED
#define _LPMONIKERPROP_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0001_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0001_v0_0_s_ifspec;
#ifndef __IMonikerProp_INTERFACE_DEFINED__
#define __IMonikerProp_INTERFACE_DEFINED__
/* interface IMonikerProp */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IMonikerProp *LPMONIKERPROP;
typedef /* [public][public] */
enum __MIDL_IMonikerProp_0001
{
MIMETYPEPROP = 0,
USE_SRC_URL = 0x1,
CLASSIDPROP = 0x2,
TRUSTEDDOWNLOADPROP = 0x3,
POPUPLEVELPROP = 0x4
} MONIKERPROPERTY;
EXTERN_C const IID IID_IMonikerProp;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a5ca5f7f-1847-4d87-9c5b-918509f7511d")
IMonikerProp : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE PutProperty(
/* [annotation][in] */
_In_ MONIKERPROPERTY mkp,
/* [annotation][in] */
_In_ LPCWSTR val) = 0;
};
#else /* C style interface */
typedef struct IMonikerPropVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IMonikerProp * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IMonikerProp * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IMonikerProp * This);
DECLSPEC_XFGVIRT(IMonikerProp, PutProperty)
HRESULT ( STDMETHODCALLTYPE *PutProperty )(
__RPC__in IMonikerProp * This,
/* [annotation][in] */
_In_ MONIKERPROPERTY mkp,
/* [annotation][in] */
_In_ LPCWSTR val);
END_INTERFACE
} IMonikerPropVtbl;
interface IMonikerProp
{
CONST_VTBL struct IMonikerPropVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMonikerProp_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IMonikerProp_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IMonikerProp_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IMonikerProp_PutProperty(This,mkp,val) \
( (This)->lpVtbl -> PutProperty(This,mkp,val) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IMonikerProp_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0002 */
/* [local] */
#endif
#ifndef _LPBINDPROTOCOL_DEFINED
#define _LPBINDPROTOCOL_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0002_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0002_v0_0_s_ifspec;
#ifndef __IBindProtocol_INTERFACE_DEFINED__
#define __IBindProtocol_INTERFACE_DEFINED__
/* interface IBindProtocol */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IBindProtocol *LPBINDPROTOCOL;
EXTERN_C const IID IID_IBindProtocol;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9cd-baf9-11ce-8c82-00aa004ba90b")
IBindProtocol : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateBinding(
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IBindCtx *pbc,
/* [annotation][out] */
_Out_ IBinding **ppb) = 0;
};
#else /* C style interface */
typedef struct IBindProtocolVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IBindProtocol * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IBindProtocol * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IBindProtocol * This);
DECLSPEC_XFGVIRT(IBindProtocol, CreateBinding)
HRESULT ( STDMETHODCALLTYPE *CreateBinding )(
IBindProtocol * This,
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IBindCtx *pbc,
/* [annotation][out] */
_Out_ IBinding **ppb);
END_INTERFACE
} IBindProtocolVtbl;
interface IBindProtocol
{
CONST_VTBL struct IBindProtocolVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBindProtocol_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBindProtocol_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBindProtocol_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBindProtocol_CreateBinding(This,szUrl,pbc,ppb) \
( (This)->lpVtbl -> CreateBinding(This,szUrl,pbc,ppb) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBindProtocol_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0003 */
/* [local] */
#endif
#ifndef _LPBINDING_DEFINED
#define _LPBINDING_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0003_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0003_v0_0_s_ifspec;
#ifndef __IBinding_INTERFACE_DEFINED__
#define __IBinding_INTERFACE_DEFINED__
/* interface IBinding */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IBinding *LPBINDING;
EXTERN_C const IID IID_IBinding;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9c0-baf9-11ce-8c82-00aa004ba90b")
IBinding : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Suspend( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0;
virtual HRESULT STDMETHODCALLTYPE SetPriority(
/* [annotation][in] */
_In_ LONG nPriority) = 0;
virtual HRESULT STDMETHODCALLTYPE GetPriority(
/* [annotation][out] */
_Out_ LONG *pnPriority) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetBindResult(
/* [annotation][out] */
_Out_ CLSID *pclsidProtocol,
/* [annotation][out] */
_Out_ DWORD *pdwResult,
/* [annotation][out] */
__RPC__out LPOLESTR *pszResult,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved) = 0;
};
#else /* C style interface */
typedef struct IBindingVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBinding * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBinding * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBinding * This);
DECLSPEC_XFGVIRT(IBinding, Abort)
HRESULT ( STDMETHODCALLTYPE *Abort )(
__RPC__in IBinding * This);
DECLSPEC_XFGVIRT(IBinding, Suspend)
HRESULT ( STDMETHODCALLTYPE *Suspend )(
__RPC__in IBinding * This);
DECLSPEC_XFGVIRT(IBinding, Resume)
HRESULT ( STDMETHODCALLTYPE *Resume )(
__RPC__in IBinding * This);
DECLSPEC_XFGVIRT(IBinding, SetPriority)
HRESULT ( STDMETHODCALLTYPE *SetPriority )(
__RPC__in IBinding * This,
/* [annotation][in] */
_In_ LONG nPriority);
DECLSPEC_XFGVIRT(IBinding, GetPriority)
HRESULT ( STDMETHODCALLTYPE *GetPriority )(
__RPC__in IBinding * This,
/* [annotation][out] */
_Out_ LONG *pnPriority);
DECLSPEC_XFGVIRT(IBinding, GetBindResult)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *GetBindResult )(
IBinding * This,
/* [annotation][out] */
_Out_ CLSID *pclsidProtocol,
/* [annotation][out] */
_Out_ DWORD *pdwResult,
/* [annotation][out] */
__RPC__out LPOLESTR *pszResult,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
END_INTERFACE
} IBindingVtbl;
interface IBinding
{
CONST_VTBL struct IBindingVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBinding_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBinding_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBinding_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBinding_Abort(This) \
( (This)->lpVtbl -> Abort(This) )
#define IBinding_Suspend(This) \
( (This)->lpVtbl -> Suspend(This) )
#define IBinding_Resume(This) \
( (This)->lpVtbl -> Resume(This) )
#define IBinding_SetPriority(This,nPriority) \
( (This)->lpVtbl -> SetPriority(This,nPriority) )
#define IBinding_GetPriority(This,pnPriority) \
( (This)->lpVtbl -> GetPriority(This,pnPriority) )
#define IBinding_GetBindResult(This,pclsidProtocol,pdwResult,pszResult,pdwReserved) \
( (This)->lpVtbl -> GetBindResult(This,pclsidProtocol,pdwResult,pszResult,pdwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBinding_RemoteGetBindResult_Proxy(
__RPC__in IBinding * This,
/* [annotation][out] */
_Out_ CLSID *pclsidProtocol,
/* [annotation][out] */
_Out_ DWORD *pdwResult,
/* [annotation][out] */
_Out_ LPOLESTR *pszResult,
/* [annotation][in] */
_In_ DWORD dwReserved);
void __RPC_STUB IBinding_RemoteGetBindResult_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IBinding_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0004 */
/* [local] */
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family or Games Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
#ifndef _LPBINDSTATUSCALLBACK_DEFINED
#define _LPBINDSTATUSCALLBACK_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0004_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0004_v0_0_s_ifspec;
#ifndef __IBindStatusCallback_INTERFACE_DEFINED__
#define __IBindStatusCallback_INTERFACE_DEFINED__
/* interface IBindStatusCallback */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IBindStatusCallback *LPBINDSTATUSCALLBACK;
typedef /* [public] */
enum __MIDL_IBindStatusCallback_0001
{
BINDVERB_GET = 0,
BINDVERB_POST = 0x1,
BINDVERB_PUT = 0x2,
BINDVERB_CUSTOM = 0x3,
BINDVERB_RESERVED1 = 0x4
} BINDVERB;
typedef /* [public] */
enum __MIDL_IBindStatusCallback_0002
{
BINDINFOF_URLENCODESTGMEDDATA = 0x1,
BINDINFOF_URLENCODEDEXTRAINFO = 0x2
} BINDINFOF;
typedef /* [public] */
enum __MIDL_IBindStatusCallback_0003
{
BINDF_ASYNCHRONOUS = 0x1,
BINDF_ASYNCSTORAGE = 0x2,
BINDF_NOPROGRESSIVERENDERING = 0x4,
BINDF_OFFLINEOPERATION = 0x8,
BINDF_GETNEWESTVERSION = 0x10,
BINDF_NOWRITECACHE = 0x20,
BINDF_NEEDFILE = 0x40,
BINDF_PULLDATA = 0x80,
BINDF_IGNORESECURITYPROBLEM = 0x100,
BINDF_RESYNCHRONIZE = 0x200,
BINDF_HYPERLINK = 0x400,
BINDF_NO_UI = 0x800,
BINDF_SILENTOPERATION = 0x1000,
BINDF_PRAGMA_NO_CACHE = 0x2000,
BINDF_GETCLASSOBJECT = 0x4000,
BINDF_RESERVED_1 = 0x8000,
BINDF_FREE_THREADED = 0x10000,
BINDF_DIRECT_READ = 0x20000,
BINDF_FORMS_SUBMIT = 0x40000,
BINDF_GETFROMCACHE_IF_NET_FAIL = 0x80000,
BINDF_FROMURLMON = 0x100000,
BINDF_FWD_BACK = 0x200000,
BINDF_PREFERDEFAULTHANDLER = 0x400000,
BINDF_ENFORCERESTRICTED = 0x800000,
BINDF_RESERVED_2 = 0x80000000,
BINDF_RESERVED_3 = 0x1000000,
BINDF_RESERVED_4 = 0x2000000,
BINDF_RESERVED_5 = 0x4000000,
BINDF_RESERVED_6 = 0x8000000,
BINDF_RESERVED_7 = 0x40000000,
BINDF_RESERVED_8 = 0x20000000
} BINDF;
typedef /* [public] */
enum __MIDL_IBindStatusCallback_0004
{
URL_ENCODING_NONE = 0,
URL_ENCODING_ENABLE_UTF8 = 0x10000000,
URL_ENCODING_DISABLE_UTF8 = 0x20000000
} URL_ENCODING;
typedef struct _tagBINDINFO
{
ULONG cbSize;
LPWSTR szExtraInfo;
STGMEDIUM stgmedData;
DWORD grfBindInfoF;
DWORD dwBindVerb;
LPWSTR szCustomVerb;
DWORD cbstgmedData;
DWORD dwOptions;
DWORD dwOptionsFlags;
DWORD dwCodePage;
SECURITY_ATTRIBUTES securityAttributes;
IID iid;
IUnknown *pUnk;
DWORD dwReserved;
} BINDINFO;
typedef struct _REMSECURITY_ATTRIBUTES
{
DWORD nLength;
DWORD lpSecurityDescriptor;
BOOL bInheritHandle;
} REMSECURITY_ATTRIBUTES;
typedef struct _REMSECURITY_ATTRIBUTES *PREMSECURITY_ATTRIBUTES;
typedef struct _REMSECURITY_ATTRIBUTES *LPREMSECURITY_ATTRIBUTES;
typedef struct _tagRemBINDINFO
{
ULONG cbSize;
LPWSTR szExtraInfo;
DWORD grfBindInfoF;
DWORD dwBindVerb;
LPWSTR szCustomVerb;
DWORD cbstgmedData;
DWORD dwOptions;
DWORD dwOptionsFlags;
DWORD dwCodePage;
REMSECURITY_ATTRIBUTES securityAttributes;
IID iid;
IUnknown *pUnk;
DWORD dwReserved;
} RemBINDINFO;
typedef struct tagRemFORMATETC
{
DWORD cfFormat;
DWORD ptd;
DWORD dwAspect;
LONG lindex;
DWORD tymed;
} RemFORMATETC;
typedef struct tagRemFORMATETC *LPREMFORMATETC;
typedef /* [public] */
enum __MIDL_IBindStatusCallback_0005
{
BINDINFO_OPTIONS_WININETFLAG = 0x10000,
BINDINFO_OPTIONS_ENABLE_UTF8 = 0x20000,
BINDINFO_OPTIONS_DISABLE_UTF8 = 0x40000,
BINDINFO_OPTIONS_USE_IE_ENCODING = 0x80000,
BINDINFO_OPTIONS_BINDTOOBJECT = 0x100000,
BINDINFO_OPTIONS_SECURITYOPTOUT = 0x200000,
BINDINFO_OPTIONS_IGNOREMIMETEXTPLAIN = 0x400000,
BINDINFO_OPTIONS_USEBINDSTRINGCREDS = 0x800000,
BINDINFO_OPTIONS_IGNOREHTTPHTTPSREDIRECTS = 0x1000000,
BINDINFO_OPTIONS_IGNORE_SSLERRORS_ONCE = 0x2000000,
BINDINFO_WPC_DOWNLOADBLOCKED = 0x8000000,
BINDINFO_WPC_LOGGING_ENABLED = 0x10000000,
BINDINFO_OPTIONS_ALLOWCONNECTDATA = 0x20000000,
BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS = 0x40000000,
BINDINFO_OPTIONS_SHDOCVW_NAVIGATE = ( int )0x80000000
} BINDINFO_OPTIONS;
typedef /* [public] */
enum __MIDL_IBindStatusCallback_0006
{
BSCF_FIRSTDATANOTIFICATION = 0x1,
BSCF_INTERMEDIATEDATANOTIFICATION = 0x2,
BSCF_LASTDATANOTIFICATION = 0x4,
BSCF_DATAFULLYAVAILABLE = 0x8,
BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10,
BSCF_SKIPDRAINDATAFORFILEURLS = 0x20,
BSCF_64BITLENGTHDOWNLOAD = 0x40
} BSCF;
typedef
enum tagBINDSTATUS
{
BINDSTATUS_FINDINGRESOURCE = 1,
BINDSTATUS_CONNECTING = ( BINDSTATUS_FINDINGRESOURCE + 1 ) ,
BINDSTATUS_REDIRECTING = ( BINDSTATUS_CONNECTING + 1 ) ,
BINDSTATUS_BEGINDOWNLOADDATA = ( BINDSTATUS_REDIRECTING + 1 ) ,
BINDSTATUS_DOWNLOADINGDATA = ( BINDSTATUS_BEGINDOWNLOADDATA + 1 ) ,
BINDSTATUS_ENDDOWNLOADDATA = ( BINDSTATUS_DOWNLOADINGDATA + 1 ) ,
BINDSTATUS_BEGINDOWNLOADCOMPONENTS = ( BINDSTATUS_ENDDOWNLOADDATA + 1 ) ,
BINDSTATUS_INSTALLINGCOMPONENTS = ( BINDSTATUS_BEGINDOWNLOADCOMPONENTS + 1 ) ,
BINDSTATUS_ENDDOWNLOADCOMPONENTS = ( BINDSTATUS_INSTALLINGCOMPONENTS + 1 ) ,
BINDSTATUS_USINGCACHEDCOPY = ( BINDSTATUS_ENDDOWNLOADCOMPONENTS + 1 ) ,
BINDSTATUS_SENDINGREQUEST = ( BINDSTATUS_USINGCACHEDCOPY + 1 ) ,
BINDSTATUS_CLASSIDAVAILABLE = ( BINDSTATUS_SENDINGREQUEST + 1 ) ,
BINDSTATUS_MIMETYPEAVAILABLE = ( BINDSTATUS_CLASSIDAVAILABLE + 1 ) ,
BINDSTATUS_CACHEFILENAMEAVAILABLE = ( BINDSTATUS_MIMETYPEAVAILABLE + 1 ) ,
BINDSTATUS_BEGINSYNCOPERATION = ( BINDSTATUS_CACHEFILENAMEAVAILABLE + 1 ) ,
BINDSTATUS_ENDSYNCOPERATION = ( BINDSTATUS_BEGINSYNCOPERATION + 1 ) ,
BINDSTATUS_BEGINUPLOADDATA = ( BINDSTATUS_ENDSYNCOPERATION + 1 ) ,
BINDSTATUS_UPLOADINGDATA = ( BINDSTATUS_BEGINUPLOADDATA + 1 ) ,
BINDSTATUS_ENDUPLOADDATA = ( BINDSTATUS_UPLOADINGDATA + 1 ) ,
BINDSTATUS_PROTOCOLCLASSID = ( BINDSTATUS_ENDUPLOADDATA + 1 ) ,
BINDSTATUS_ENCODING = ( BINDSTATUS_PROTOCOLCLASSID + 1 ) ,
BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE = ( BINDSTATUS_ENCODING + 1 ) ,
BINDSTATUS_CLASSINSTALLLOCATION = ( BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE + 1 ) ,
BINDSTATUS_DECODING = ( BINDSTATUS_CLASSINSTALLLOCATION + 1 ) ,
BINDSTATUS_LOADINGMIMEHANDLER = ( BINDSTATUS_DECODING + 1 ) ,
BINDSTATUS_CONTENTDISPOSITIONATTACH = ( BINDSTATUS_LOADINGMIMEHANDLER + 1 ) ,
BINDSTATUS_FILTERREPORTMIMETYPE = ( BINDSTATUS_CONTENTDISPOSITIONATTACH + 1 ) ,
BINDSTATUS_CLSIDCANINSTANTIATE = ( BINDSTATUS_FILTERREPORTMIMETYPE + 1 ) ,
BINDSTATUS_IUNKNOWNAVAILABLE = ( BINDSTATUS_CLSIDCANINSTANTIATE + 1 ) ,
BINDSTATUS_DIRECTBIND = ( BINDSTATUS_IUNKNOWNAVAILABLE + 1 ) ,
BINDSTATUS_RAWMIMETYPE = ( BINDSTATUS_DIRECTBIND + 1 ) ,
BINDSTATUS_PROXYDETECTING = ( BINDSTATUS_RAWMIMETYPE + 1 ) ,
BINDSTATUS_ACCEPTRANGES = ( BINDSTATUS_PROXYDETECTING + 1 ) ,
BINDSTATUS_COOKIE_SENT = ( BINDSTATUS_ACCEPTRANGES + 1 ) ,
BINDSTATUS_COMPACT_POLICY_RECEIVED = ( BINDSTATUS_COOKIE_SENT + 1 ) ,
BINDSTATUS_COOKIE_SUPPRESSED = ( BINDSTATUS_COMPACT_POLICY_RECEIVED + 1 ) ,
BINDSTATUS_COOKIE_STATE_UNKNOWN = ( BINDSTATUS_COOKIE_SUPPRESSED + 1 ) ,
BINDSTATUS_COOKIE_STATE_ACCEPT = ( BINDSTATUS_COOKIE_STATE_UNKNOWN + 1 ) ,
BINDSTATUS_COOKIE_STATE_REJECT = ( BINDSTATUS_COOKIE_STATE_ACCEPT + 1 ) ,
BINDSTATUS_COOKIE_STATE_PROMPT = ( BINDSTATUS_COOKIE_STATE_REJECT + 1 ) ,
BINDSTATUS_COOKIE_STATE_LEASH = ( BINDSTATUS_COOKIE_STATE_PROMPT + 1 ) ,
BINDSTATUS_COOKIE_STATE_DOWNGRADE = ( BINDSTATUS_COOKIE_STATE_LEASH + 1 ) ,
BINDSTATUS_POLICY_HREF = ( BINDSTATUS_COOKIE_STATE_DOWNGRADE + 1 ) ,
BINDSTATUS_P3P_HEADER = ( BINDSTATUS_POLICY_HREF + 1 ) ,
BINDSTATUS_SESSION_COOKIE_RECEIVED = ( BINDSTATUS_P3P_HEADER + 1 ) ,
BINDSTATUS_PERSISTENT_COOKIE_RECEIVED = ( BINDSTATUS_SESSION_COOKIE_RECEIVED + 1 ) ,
BINDSTATUS_SESSION_COOKIES_ALLOWED = ( BINDSTATUS_PERSISTENT_COOKIE_RECEIVED + 1 ) ,
BINDSTATUS_CACHECONTROL = ( BINDSTATUS_SESSION_COOKIES_ALLOWED + 1 ) ,
BINDSTATUS_CONTENTDISPOSITIONFILENAME = ( BINDSTATUS_CACHECONTROL + 1 ) ,
BINDSTATUS_MIMETEXTPLAINMISMATCH = ( BINDSTATUS_CONTENTDISPOSITIONFILENAME + 1 ) ,
BINDSTATUS_PUBLISHERAVAILABLE = ( BINDSTATUS_MIMETEXTPLAINMISMATCH + 1 ) ,
BINDSTATUS_DISPLAYNAMEAVAILABLE = ( BINDSTATUS_PUBLISHERAVAILABLE + 1 ) ,
BINDSTATUS_SSLUX_NAVBLOCKED = ( BINDSTATUS_DISPLAYNAMEAVAILABLE + 1 ) ,
BINDSTATUS_SERVER_MIMETYPEAVAILABLE = ( BINDSTATUS_SSLUX_NAVBLOCKED + 1 ) ,
BINDSTATUS_SNIFFED_CLASSIDAVAILABLE = ( BINDSTATUS_SERVER_MIMETYPEAVAILABLE + 1 ) ,
BINDSTATUS_64BIT_PROGRESS = ( BINDSTATUS_SNIFFED_CLASSIDAVAILABLE + 1 ) ,
BINDSTATUS_LAST = BINDSTATUS_64BIT_PROGRESS,
BINDSTATUS_RESERVED_0 = ( BINDSTATUS_LAST + 1 ) ,
BINDSTATUS_RESERVED_1 = ( BINDSTATUS_RESERVED_0 + 1 ) ,
BINDSTATUS_RESERVED_2 = ( BINDSTATUS_RESERVED_1 + 1 ) ,
BINDSTATUS_RESERVED_3 = ( BINDSTATUS_RESERVED_2 + 1 ) ,
BINDSTATUS_RESERVED_4 = ( BINDSTATUS_RESERVED_3 + 1 ) ,
BINDSTATUS_RESERVED_5 = ( BINDSTATUS_RESERVED_4 + 1 ) ,
BINDSTATUS_RESERVED_6 = ( BINDSTATUS_RESERVED_5 + 1 ) ,
BINDSTATUS_RESERVED_7 = ( BINDSTATUS_RESERVED_6 + 1 ) ,
BINDSTATUS_RESERVED_8 = ( BINDSTATUS_RESERVED_7 + 1 ) ,
BINDSTATUS_RESERVED_9 = ( BINDSTATUS_RESERVED_8 + 1 ) ,
BINDSTATUS_RESERVED_A = ( BINDSTATUS_RESERVED_9 + 1 ) ,
BINDSTATUS_RESERVED_B = ( BINDSTATUS_RESERVED_A + 1 ) ,
BINDSTATUS_RESERVED_C = ( BINDSTATUS_RESERVED_B + 1 ) ,
BINDSTATUS_RESERVED_D = ( BINDSTATUS_RESERVED_C + 1 ) ,
BINDSTATUS_RESERVED_E = ( BINDSTATUS_RESERVED_D + 1 ) ,
BINDSTATUS_RESERVED_F = ( BINDSTATUS_RESERVED_E + 1 ) ,
BINDSTATUS_RESERVED_10 = ( BINDSTATUS_RESERVED_F + 1 ) ,
BINDSTATUS_RESERVED_11 = ( BINDSTATUS_RESERVED_10 + 1 ) ,
BINDSTATUS_RESERVED_12 = ( BINDSTATUS_RESERVED_11 + 1 ) ,
BINDSTATUS_RESERVED_13 = ( BINDSTATUS_RESERVED_12 + 1 ) ,
BINDSTATUS_RESERVED_14 = ( BINDSTATUS_RESERVED_13 + 1 ) ,
BINDSTATUS_LAST_PRIVATE = BINDSTATUS_RESERVED_14
} BINDSTATUS;
EXTERN_C const IID IID_IBindStatusCallback;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9c1-baf9-11ce-8c82-00aa004ba90b")
IBindStatusCallback : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE OnStartBinding(
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][in] */
_In_ IBinding *pib) = 0;
virtual HRESULT STDMETHODCALLTYPE GetPriority(
/* [annotation][out] */
_Out_ LONG *pnPriority) = 0;
virtual HRESULT STDMETHODCALLTYPE OnLowResource(
/* [annotation][in] */
_In_ DWORD reserved) = 0;
virtual HRESULT STDMETHODCALLTYPE OnProgress(
/* [annotation][in] */
_In_ ULONG ulProgress,
/* [annotation][in] */
_In_ ULONG ulProgressMax,
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szStatusText) = 0;
virtual HRESULT STDMETHODCALLTYPE OnStopBinding(
/* [annotation][in] */
_In_ HRESULT hresult,
/* [annotation][unique][in] */
_In_ LPCWSTR szError) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetBindInfo(
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE OnDataAvailable(
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ DWORD dwSize,
/* [annotation][in] */
_In_ FORMATETC *pformatetc,
/* [annotation][in] */
_In_ STGMEDIUM *pstgmed) = 0;
virtual HRESULT STDMETHODCALLTYPE OnObjectAvailable(
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][in] */
_In_ IUnknown *punk) = 0;
};
#else /* C style interface */
typedef struct IBindStatusCallbackVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBindStatusCallback * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBindStatusCallback * This);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnStartBinding)
HRESULT ( STDMETHODCALLTYPE *OnStartBinding )(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][in] */
_In_ IBinding *pib);
DECLSPEC_XFGVIRT(IBindStatusCallback, GetPriority)
HRESULT ( STDMETHODCALLTYPE *GetPriority )(
__RPC__in IBindStatusCallback * This,
/* [annotation][out] */
_Out_ LONG *pnPriority);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnLowResource)
HRESULT ( STDMETHODCALLTYPE *OnLowResource )(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ DWORD reserved);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnProgress)
HRESULT ( STDMETHODCALLTYPE *OnProgress )(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ ULONG ulProgress,
/* [annotation][in] */
_In_ ULONG ulProgressMax,
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szStatusText);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnStopBinding)
HRESULT ( STDMETHODCALLTYPE *OnStopBinding )(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ HRESULT hresult,
/* [annotation][unique][in] */
_In_ LPCWSTR szError);
DECLSPEC_XFGVIRT(IBindStatusCallback, GetBindInfo)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *GetBindInfo )(
IBindStatusCallback * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnDataAvailable)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *OnDataAvailable )(
IBindStatusCallback * This,
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ DWORD dwSize,
/* [annotation][in] */
_In_ FORMATETC *pformatetc,
/* [annotation][in] */
_In_ STGMEDIUM *pstgmed);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnObjectAvailable)
HRESULT ( STDMETHODCALLTYPE *OnObjectAvailable )(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][in] */
_In_ IUnknown *punk);
END_INTERFACE
} IBindStatusCallbackVtbl;
interface IBindStatusCallback
{
CONST_VTBL struct IBindStatusCallbackVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBindStatusCallback_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBindStatusCallback_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBindStatusCallback_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBindStatusCallback_OnStartBinding(This,dwReserved,pib) \
( (This)->lpVtbl -> OnStartBinding(This,dwReserved,pib) )
#define IBindStatusCallback_GetPriority(This,pnPriority) \
( (This)->lpVtbl -> GetPriority(This,pnPriority) )
#define IBindStatusCallback_OnLowResource(This,reserved) \
( (This)->lpVtbl -> OnLowResource(This,reserved) )
#define IBindStatusCallback_OnProgress(This,ulProgress,ulProgressMax,ulStatusCode,szStatusText) \
( (This)->lpVtbl -> OnProgress(This,ulProgress,ulProgressMax,ulStatusCode,szStatusText) )
#define IBindStatusCallback_OnStopBinding(This,hresult,szError) \
( (This)->lpVtbl -> OnStopBinding(This,hresult,szError) )
#define IBindStatusCallback_GetBindInfo(This,grfBINDF,pbindinfo) \
( (This)->lpVtbl -> GetBindInfo(This,grfBINDF,pbindinfo) )
#define IBindStatusCallback_OnDataAvailable(This,grfBSCF,dwSize,pformatetc,pstgmed) \
( (This)->lpVtbl -> OnDataAvailable(This,grfBSCF,dwSize,pformatetc,pstgmed) )
#define IBindStatusCallback_OnObjectAvailable(This,riid,punk) \
( (This)->lpVtbl -> OnObjectAvailable(This,riid,punk) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindStatusCallback_RemoteGetBindInfo_Proxy(
__RPC__in IBindStatusCallback * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ RemBINDINFO *pbindinfo,
/* [annotation][unique][out][in] */
_Inout_ RemSTGMEDIUM *pstgmed);
void __RPC_STUB IBindStatusCallback_RemoteGetBindInfo_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindStatusCallback_RemoteOnDataAvailable_Proxy(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ DWORD dwSize,
/* [annotation][in] */
_In_ RemFORMATETC *pformatetc,
/* [annotation][in] */
_In_ RemSTGMEDIUM *pstgmed);
void __RPC_STUB IBindStatusCallback_RemoteOnDataAvailable_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IBindStatusCallback_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0005 */
/* [local] */
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef _LPBINDSTATUSCALLBACKEX_DEFINED
#define _LPBINDSTATUSCALLBACKEX_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0005_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0005_v0_0_s_ifspec;
#ifndef __IBindStatusCallbackEx_INTERFACE_DEFINED__
#define __IBindStatusCallbackEx_INTERFACE_DEFINED__
/* interface IBindStatusCallbackEx */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IBindStatusCallbackEx *LPBINDSTATUSCALLBACKEX;
typedef /* [public] */
enum __MIDL_IBindStatusCallbackEx_0001
{
BINDF2_DISABLEBASICOVERHTTP = 0x1,
BINDF2_DISABLEAUTOCOOKIEHANDLING = 0x2,
BINDF2_READ_DATA_GREATER_THAN_4GB = 0x4,
BINDF2_DISABLE_HTTP_REDIRECT_XSECURITYID = 0x8,
BINDF2_SETDOWNLOADMODE = 0x20,
BINDF2_DISABLE_HTTP_REDIRECT_CACHING = 0x40,
BINDF2_KEEP_CALLBACK_MODULE_LOADED = 0x80,
BINDF2_ALLOW_PROXY_CRED_PROMPT = 0x100,
BINDF2_RESERVED_17 = 0x200,
BINDF2_RESERVED_16 = 0x400,
BINDF2_RESERVED_15 = 0x800,
BINDF2_RESERVED_14 = 0x1000,
BINDF2_RESERVED_13 = 0x2000,
BINDF2_RESERVED_12 = 0x4000,
BINDF2_RESERVED_11 = 0x8000,
BINDF2_RESERVED_10 = 0x10000,
BINDF2_RESERVED_F = 0x20000,
BINDF2_RESERVED_E = 0x40000,
BINDF2_RESERVED_D = 0x80000,
BINDF2_RESERVED_C = 0x100000,
BINDF2_RESERVED_B = 0x200000,
BINDF2_RESERVED_A = 0x400000,
BINDF2_RESERVED_9 = 0x800000,
BINDF2_RESERVED_8 = 0x1000000,
BINDF2_RESERVED_7 = 0x2000000,
BINDF2_RESERVED_6 = 0x4000000,
BINDF2_RESERVED_5 = 0x8000000,
BINDF2_RESERVED_4 = 0x10000000,
BINDF2_RESERVED_3 = 0x20000000,
BINDF2_RESERVED_2 = 0x40000000,
BINDF2_RESERVED_1 = 0x80000000
} BINDF2;
EXTERN_C const IID IID_IBindStatusCallbackEx;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("aaa74ef9-8ee7-4659-88d9-f8c504da73cc")
IBindStatusCallbackEx : public IBindStatusCallback
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetBindInfoEx(
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved) = 0;
};
#else /* C style interface */
typedef struct IBindStatusCallbackExVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBindStatusCallbackEx * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBindStatusCallbackEx * This);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnStartBinding)
HRESULT ( STDMETHODCALLTYPE *OnStartBinding )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][in] */
_In_ IBinding *pib);
DECLSPEC_XFGVIRT(IBindStatusCallback, GetPriority)
HRESULT ( STDMETHODCALLTYPE *GetPriority )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][out] */
_Out_ LONG *pnPriority);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnLowResource)
HRESULT ( STDMETHODCALLTYPE *OnLowResource )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ DWORD reserved);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnProgress)
HRESULT ( STDMETHODCALLTYPE *OnProgress )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ ULONG ulProgress,
/* [annotation][in] */
_In_ ULONG ulProgressMax,
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szStatusText);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnStopBinding)
HRESULT ( STDMETHODCALLTYPE *OnStopBinding )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ HRESULT hresult,
/* [annotation][unique][in] */
_In_ LPCWSTR szError);
DECLSPEC_XFGVIRT(IBindStatusCallback, GetBindInfo)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *GetBindInfo )(
IBindStatusCallbackEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnDataAvailable)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *OnDataAvailable )(
IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ DWORD dwSize,
/* [annotation][in] */
_In_ FORMATETC *pformatetc,
/* [annotation][in] */
_In_ STGMEDIUM *pstgmed);
DECLSPEC_XFGVIRT(IBindStatusCallback, OnObjectAvailable)
HRESULT ( STDMETHODCALLTYPE *OnObjectAvailable )(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][in] */
_In_ IUnknown *punk);
DECLSPEC_XFGVIRT(IBindStatusCallbackEx, GetBindInfoEx)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *GetBindInfoEx )(
IBindStatusCallbackEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved);
END_INTERFACE
} IBindStatusCallbackExVtbl;
interface IBindStatusCallbackEx
{
CONST_VTBL struct IBindStatusCallbackExVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBindStatusCallbackEx_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBindStatusCallbackEx_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBindStatusCallbackEx_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBindStatusCallbackEx_OnStartBinding(This,dwReserved,pib) \
( (This)->lpVtbl -> OnStartBinding(This,dwReserved,pib) )
#define IBindStatusCallbackEx_GetPriority(This,pnPriority) \
( (This)->lpVtbl -> GetPriority(This,pnPriority) )
#define IBindStatusCallbackEx_OnLowResource(This,reserved) \
( (This)->lpVtbl -> OnLowResource(This,reserved) )
#define IBindStatusCallbackEx_OnProgress(This,ulProgress,ulProgressMax,ulStatusCode,szStatusText) \
( (This)->lpVtbl -> OnProgress(This,ulProgress,ulProgressMax,ulStatusCode,szStatusText) )
#define IBindStatusCallbackEx_OnStopBinding(This,hresult,szError) \
( (This)->lpVtbl -> OnStopBinding(This,hresult,szError) )
#define IBindStatusCallbackEx_GetBindInfo(This,grfBINDF,pbindinfo) \
( (This)->lpVtbl -> GetBindInfo(This,grfBINDF,pbindinfo) )
#define IBindStatusCallbackEx_OnDataAvailable(This,grfBSCF,dwSize,pformatetc,pstgmed) \
( (This)->lpVtbl -> OnDataAvailable(This,grfBSCF,dwSize,pformatetc,pstgmed) )
#define IBindStatusCallbackEx_OnObjectAvailable(This,riid,punk) \
( (This)->lpVtbl -> OnObjectAvailable(This,riid,punk) )
#define IBindStatusCallbackEx_GetBindInfoEx(This,grfBINDF,pbindinfo,grfBINDF2,pdwReserved) \
( (This)->lpVtbl -> GetBindInfoEx(This,grfBINDF,pbindinfo,grfBINDF2,pdwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindStatusCallbackEx_RemoteGetBindInfoEx_Proxy(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ RemBINDINFO *pbindinfo,
/* [annotation][unique][out][in] */
_Inout_ RemSTGMEDIUM *pstgmed,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved);
void __RPC_STUB IBindStatusCallbackEx_RemoteGetBindInfoEx_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IBindStatusCallbackEx_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0006 */
/* [local] */
#endif
#ifndef _LPAUTHENTICATION_DEFINED
#define _LPAUTHENTICATION_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0006_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0006_v0_0_s_ifspec;
#ifndef __IAuthenticate_INTERFACE_DEFINED__
#define __IAuthenticate_INTERFACE_DEFINED__
/* interface IAuthenticate */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IAuthenticate *LPAUTHENTICATION;
EXTERN_C const IID IID_IAuthenticate;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d0-baf9-11ce-8c82-00aa004ba90b")
IAuthenticate : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Authenticate(
/* [annotation][out] */
_Out_ HWND *phwnd,
/* [annotation][out] */
_Out_ LPWSTR *pszUsername,
/* [annotation][out] */
_Out_ LPWSTR *pszPassword) = 0;
};
#else /* C style interface */
typedef struct IAuthenticateVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IAuthenticate * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IAuthenticate * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IAuthenticate * This);
DECLSPEC_XFGVIRT(IAuthenticate, Authenticate)
HRESULT ( STDMETHODCALLTYPE *Authenticate )(
__RPC__in IAuthenticate * This,
/* [annotation][out] */
_Out_ HWND *phwnd,
/* [annotation][out] */
_Out_ LPWSTR *pszUsername,
/* [annotation][out] */
_Out_ LPWSTR *pszPassword);
END_INTERFACE
} IAuthenticateVtbl;
interface IAuthenticate
{
CONST_VTBL struct IAuthenticateVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAuthenticate_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAuthenticate_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAuthenticate_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAuthenticate_Authenticate(This,phwnd,pszUsername,pszPassword) \
( (This)->lpVtbl -> Authenticate(This,phwnd,pszUsername,pszPassword) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAuthenticate_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0007 */
/* [local] */
#endif
#ifndef _LPAUTHENTICATIONEX_DEFINED
#define _LPAUTHENTICATIONEX_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0007_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0007_v0_0_s_ifspec;
#ifndef __IAuthenticateEx_INTERFACE_DEFINED__
#define __IAuthenticateEx_INTERFACE_DEFINED__
/* interface IAuthenticateEx */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IAuthenticateEx *LPAUTHENTICATIONEX;
typedef /* [public] */
enum __MIDL_IAuthenticateEx_0001
{
AUTHENTICATEF_PROXY = 0x1,
AUTHENTICATEF_BASIC = 0x2,
AUTHENTICATEF_HTTP = 0x4
} AUTHENTICATEF;
typedef struct _tagAUTHENTICATEINFO
{
DWORD dwFlags;
DWORD dwReserved;
} AUTHENTICATEINFO;
EXTERN_C const IID IID_IAuthenticateEx;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("2ad1edaf-d83d-48b5-9adf-03dbe19f53bd")
IAuthenticateEx : public IAuthenticate
{
public:
virtual HRESULT STDMETHODCALLTYPE AuthenticateEx(
/* [annotation][out] */
_Out_ HWND *phwnd,
/* [annotation][out] */
_Out_ LPWSTR *pszUsername,
/* [annotation][out] */
_Out_ LPWSTR *pszPassword,
/* [annotation][in] */
_In_ AUTHENTICATEINFO *pauthinfo) = 0;
};
#else /* C style interface */
typedef struct IAuthenticateExVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IAuthenticateEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IAuthenticateEx * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IAuthenticateEx * This);
DECLSPEC_XFGVIRT(IAuthenticate, Authenticate)
HRESULT ( STDMETHODCALLTYPE *Authenticate )(
__RPC__in IAuthenticateEx * This,
/* [annotation][out] */
_Out_ HWND *phwnd,
/* [annotation][out] */
_Out_ LPWSTR *pszUsername,
/* [annotation][out] */
_Out_ LPWSTR *pszPassword);
DECLSPEC_XFGVIRT(IAuthenticateEx, AuthenticateEx)
HRESULT ( STDMETHODCALLTYPE *AuthenticateEx )(
__RPC__in IAuthenticateEx * This,
/* [annotation][out] */
_Out_ HWND *phwnd,
/* [annotation][out] */
_Out_ LPWSTR *pszUsername,
/* [annotation][out] */
_Out_ LPWSTR *pszPassword,
/* [annotation][in] */
_In_ AUTHENTICATEINFO *pauthinfo);
END_INTERFACE
} IAuthenticateExVtbl;
interface IAuthenticateEx
{
CONST_VTBL struct IAuthenticateExVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IAuthenticateEx_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IAuthenticateEx_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IAuthenticateEx_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IAuthenticateEx_Authenticate(This,phwnd,pszUsername,pszPassword) \
( (This)->lpVtbl -> Authenticate(This,phwnd,pszUsername,pszPassword) )
#define IAuthenticateEx_AuthenticateEx(This,phwnd,pszUsername,pszPassword,pauthinfo) \
( (This)->lpVtbl -> AuthenticateEx(This,phwnd,pszUsername,pszPassword,pauthinfo) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IAuthenticateEx_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0008 */
/* [local] */
#endif
#ifndef _LPHTTPNEGOTIATE_DEFINED
#define _LPHTTPNEGOTIATE_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0008_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0008_v0_0_s_ifspec;
#ifndef __IHttpNegotiate_INTERFACE_DEFINED__
#define __IHttpNegotiate_INTERFACE_DEFINED__
/* interface IHttpNegotiate */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IHttpNegotiate *LPHTTPNEGOTIATE;
EXTERN_C const IID IID_IHttpNegotiate;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d2-baf9-11ce-8c82-00aa004ba90b")
IHttpNegotiate : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE BeginningTransaction(
/* [annotation][in] */
_In_ LPCWSTR szURL,
/* [annotation][unique][in] */
_In_ LPCWSTR szHeaders,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalHeaders) = 0;
virtual HRESULT STDMETHODCALLTYPE OnResponse(
/* [annotation][in] */
_In_ DWORD dwResponseCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szResponseHeaders,
/* [annotation][unique][in] */
_In_ LPCWSTR szRequestHeaders,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalRequestHeaders) = 0;
};
#else /* C style interface */
typedef struct IHttpNegotiateVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IHttpNegotiate * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IHttpNegotiate * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IHttpNegotiate * This);
DECLSPEC_XFGVIRT(IHttpNegotiate, BeginningTransaction)
HRESULT ( STDMETHODCALLTYPE *BeginningTransaction )(
__RPC__in IHttpNegotiate * This,
/* [annotation][in] */
_In_ LPCWSTR szURL,
/* [annotation][unique][in] */
_In_ LPCWSTR szHeaders,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalHeaders);
DECLSPEC_XFGVIRT(IHttpNegotiate, OnResponse)
HRESULT ( STDMETHODCALLTYPE *OnResponse )(
__RPC__in IHttpNegotiate * This,
/* [annotation][in] */
_In_ DWORD dwResponseCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szResponseHeaders,
/* [annotation][unique][in] */
_In_ LPCWSTR szRequestHeaders,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalRequestHeaders);
END_INTERFACE
} IHttpNegotiateVtbl;
interface IHttpNegotiate
{
CONST_VTBL struct IHttpNegotiateVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IHttpNegotiate_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IHttpNegotiate_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IHttpNegotiate_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IHttpNegotiate_BeginningTransaction(This,szURL,szHeaders,dwReserved,pszAdditionalHeaders) \
( (This)->lpVtbl -> BeginningTransaction(This,szURL,szHeaders,dwReserved,pszAdditionalHeaders) )
#define IHttpNegotiate_OnResponse(This,dwResponseCode,szResponseHeaders,szRequestHeaders,pszAdditionalRequestHeaders) \
( (This)->lpVtbl -> OnResponse(This,dwResponseCode,szResponseHeaders,szRequestHeaders,pszAdditionalRequestHeaders) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IHttpNegotiate_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0009 */
/* [local] */
#endif
#ifndef _LPHTTPNEGOTIATE2_DEFINED
#define _LPHTTPNEGOTIATE2_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0009_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0009_v0_0_s_ifspec;
#ifndef __IHttpNegotiate2_INTERFACE_DEFINED__
#define __IHttpNegotiate2_INTERFACE_DEFINED__
/* interface IHttpNegotiate2 */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IHttpNegotiate2 *LPHTTPNEGOTIATE2;
EXTERN_C const IID IID_IHttpNegotiate2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4F9F9FCB-E0F4-48eb-B7AB-FA2EA9365CB4")
IHttpNegotiate2 : public IHttpNegotiate
{
public:
virtual HRESULT STDMETHODCALLTYPE GetRootSecurityId(
/* [annotation][size_is][out] */
_Out_writes_(*pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
};
#else /* C style interface */
typedef struct IHttpNegotiate2Vtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IHttpNegotiate2 * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IHttpNegotiate2 * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IHttpNegotiate2 * This);
DECLSPEC_XFGVIRT(IHttpNegotiate, BeginningTransaction)
HRESULT ( STDMETHODCALLTYPE *BeginningTransaction )(
__RPC__in IHttpNegotiate2 * This,
/* [annotation][in] */
_In_ LPCWSTR szURL,
/* [annotation][unique][in] */
_In_ LPCWSTR szHeaders,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalHeaders);
DECLSPEC_XFGVIRT(IHttpNegotiate, OnResponse)
HRESULT ( STDMETHODCALLTYPE *OnResponse )(
__RPC__in IHttpNegotiate2 * This,
/* [annotation][in] */
_In_ DWORD dwResponseCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szResponseHeaders,
/* [annotation][unique][in] */
_In_ LPCWSTR szRequestHeaders,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalRequestHeaders);
DECLSPEC_XFGVIRT(IHttpNegotiate2, GetRootSecurityId)
HRESULT ( STDMETHODCALLTYPE *GetRootSecurityId )(
__RPC__in IHttpNegotiate2 * This,
/* [annotation][size_is][out] */
_Out_writes_(*pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
END_INTERFACE
} IHttpNegotiate2Vtbl;
interface IHttpNegotiate2
{
CONST_VTBL struct IHttpNegotiate2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IHttpNegotiate2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IHttpNegotiate2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IHttpNegotiate2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IHttpNegotiate2_BeginningTransaction(This,szURL,szHeaders,dwReserved,pszAdditionalHeaders) \
( (This)->lpVtbl -> BeginningTransaction(This,szURL,szHeaders,dwReserved,pszAdditionalHeaders) )
#define IHttpNegotiate2_OnResponse(This,dwResponseCode,szResponseHeaders,szRequestHeaders,pszAdditionalRequestHeaders) \
( (This)->lpVtbl -> OnResponse(This,dwResponseCode,szResponseHeaders,szRequestHeaders,pszAdditionalRequestHeaders) )
#define IHttpNegotiate2_GetRootSecurityId(This,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetRootSecurityId(This,pbSecurityId,pcbSecurityId,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IHttpNegotiate2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0010 */
/* [local] */
#endif
#ifndef _LPHTTPNEGOTIATE3_DEFINED
#define _LPHTTPNEGOTIATE3_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0010_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0010_v0_0_s_ifspec;
#ifndef __IHttpNegotiate3_INTERFACE_DEFINED__
#define __IHttpNegotiate3_INTERFACE_DEFINED__
/* interface IHttpNegotiate3 */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IHttpNegotiate3 *LPHTTPNEGOTIATE3;
EXTERN_C const IID IID_IHttpNegotiate3;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("57b6c80a-34c2-4602-bc26-66a02fc57153")
IHttpNegotiate3 : public IHttpNegotiate2
{
public:
virtual HRESULT STDMETHODCALLTYPE GetSerializedClientCertContext(
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbCert) BYTE **ppbCert,
/* [annotation][out] */
_Out_ DWORD *pcbCert) = 0;
};
#else /* C style interface */
typedef struct IHttpNegotiate3Vtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IHttpNegotiate3 * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IHttpNegotiate3 * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IHttpNegotiate3 * This);
DECLSPEC_XFGVIRT(IHttpNegotiate, BeginningTransaction)
HRESULT ( STDMETHODCALLTYPE *BeginningTransaction )(
__RPC__in IHttpNegotiate3 * This,
/* [annotation][in] */
_In_ LPCWSTR szURL,
/* [annotation][unique][in] */
_In_ LPCWSTR szHeaders,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalHeaders);
DECLSPEC_XFGVIRT(IHttpNegotiate, OnResponse)
HRESULT ( STDMETHODCALLTYPE *OnResponse )(
__RPC__in IHttpNegotiate3 * This,
/* [annotation][in] */
_In_ DWORD dwResponseCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szResponseHeaders,
/* [annotation][unique][in] */
_In_ LPCWSTR szRequestHeaders,
/* [annotation][out] */
_Out_ LPWSTR *pszAdditionalRequestHeaders);
DECLSPEC_XFGVIRT(IHttpNegotiate2, GetRootSecurityId)
HRESULT ( STDMETHODCALLTYPE *GetRootSecurityId )(
__RPC__in IHttpNegotiate3 * This,
/* [annotation][size_is][out] */
_Out_writes_(*pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IHttpNegotiate3, GetSerializedClientCertContext)
HRESULT ( STDMETHODCALLTYPE *GetSerializedClientCertContext )(
__RPC__in IHttpNegotiate3 * This,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbCert) BYTE **ppbCert,
/* [annotation][out] */
_Out_ DWORD *pcbCert);
END_INTERFACE
} IHttpNegotiate3Vtbl;
interface IHttpNegotiate3
{
CONST_VTBL struct IHttpNegotiate3Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IHttpNegotiate3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IHttpNegotiate3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IHttpNegotiate3_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IHttpNegotiate3_BeginningTransaction(This,szURL,szHeaders,dwReserved,pszAdditionalHeaders) \
( (This)->lpVtbl -> BeginningTransaction(This,szURL,szHeaders,dwReserved,pszAdditionalHeaders) )
#define IHttpNegotiate3_OnResponse(This,dwResponseCode,szResponseHeaders,szRequestHeaders,pszAdditionalRequestHeaders) \
( (This)->lpVtbl -> OnResponse(This,dwResponseCode,szResponseHeaders,szRequestHeaders,pszAdditionalRequestHeaders) )
#define IHttpNegotiate3_GetRootSecurityId(This,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetRootSecurityId(This,pbSecurityId,pcbSecurityId,dwReserved) )
#define IHttpNegotiate3_GetSerializedClientCertContext(This,ppbCert,pcbCert) \
( (This)->lpVtbl -> GetSerializedClientCertContext(This,ppbCert,pcbCert) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IHttpNegotiate3_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0011 */
/* [local] */
#endif
#ifndef _LPWININETFILESTREAM_DEFINED
#define _LPWININETFILESTREAM_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0011_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0011_v0_0_s_ifspec;
#ifndef __IWinInetFileStream_INTERFACE_DEFINED__
#define __IWinInetFileStream_INTERFACE_DEFINED__
/* interface IWinInetFileStream */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IWinInetFileStream *LPWININETFILESTREAM;
EXTERN_C const IID IID_IWinInetFileStream;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("F134C4B7-B1F8-4e75-B886-74B90943BECB")
IWinInetFileStream : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetHandleForUnlock(
/* [annotation][in] */
_In_ DWORD_PTR hWinInetLockHandle,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE SetDeleteFile(
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
};
#else /* C style interface */
typedef struct IWinInetFileStreamVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IWinInetFileStream * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IWinInetFileStream * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IWinInetFileStream * This);
DECLSPEC_XFGVIRT(IWinInetFileStream, SetHandleForUnlock)
HRESULT ( STDMETHODCALLTYPE *SetHandleForUnlock )(
__RPC__in IWinInetFileStream * This,
/* [annotation][in] */
_In_ DWORD_PTR hWinInetLockHandle,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IWinInetFileStream, SetDeleteFile)
HRESULT ( STDMETHODCALLTYPE *SetDeleteFile )(
__RPC__in IWinInetFileStream * This,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
END_INTERFACE
} IWinInetFileStreamVtbl;
interface IWinInetFileStream
{
CONST_VTBL struct IWinInetFileStreamVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWinInetFileStream_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWinInetFileStream_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWinInetFileStream_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWinInetFileStream_SetHandleForUnlock(This,hWinInetLockHandle,dwReserved) \
( (This)->lpVtbl -> SetHandleForUnlock(This,hWinInetLockHandle,dwReserved) )
#define IWinInetFileStream_SetDeleteFile(This,dwReserved) \
( (This)->lpVtbl -> SetDeleteFile(This,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IWinInetFileStream_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0012 */
/* [local] */
#endif
#ifndef _LPWINDOWFORBINDINGUI_DEFINED
#define _LPWINDOWFORBINDINGUI_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0012_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0012_v0_0_s_ifspec;
#ifndef __IWindowForBindingUI_INTERFACE_DEFINED__
#define __IWindowForBindingUI_INTERFACE_DEFINED__
/* interface IWindowForBindingUI */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IWindowForBindingUI *LPWINDOWFORBINDINGUI;
EXTERN_C const IID IID_IWindowForBindingUI;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d5-bafa-11ce-8c82-00aa004ba90b")
IWindowForBindingUI : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetWindow(
/* [annotation][in] */
_In_ REFGUID rguidReason,
/* [annotation][out] */
_Out_ HWND *phwnd) = 0;
};
#else /* C style interface */
typedef struct IWindowForBindingUIVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IWindowForBindingUI * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IWindowForBindingUI * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IWindowForBindingUI * This);
DECLSPEC_XFGVIRT(IWindowForBindingUI, GetWindow)
HRESULT ( STDMETHODCALLTYPE *GetWindow )(
IWindowForBindingUI * This,
/* [annotation][in] */
_In_ REFGUID rguidReason,
/* [annotation][out] */
_Out_ HWND *phwnd);
END_INTERFACE
} IWindowForBindingUIVtbl;
interface IWindowForBindingUI
{
CONST_VTBL struct IWindowForBindingUIVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWindowForBindingUI_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWindowForBindingUI_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWindowForBindingUI_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWindowForBindingUI_GetWindow(This,rguidReason,phwnd) \
( (This)->lpVtbl -> GetWindow(This,rguidReason,phwnd) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IWindowForBindingUI_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0013 */
/* [local] */
#endif
#ifndef _LPCODEINSTALL_DEFINED
#define _LPCODEINSTALL_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0013_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0013_v0_0_s_ifspec;
#ifndef __ICodeInstall_INTERFACE_DEFINED__
#define __ICodeInstall_INTERFACE_DEFINED__
/* interface ICodeInstall */
/* [unique][uuid][object][local] */
typedef /* [unique] */ ICodeInstall *LPCODEINSTALL;
typedef /* [public] */
enum __MIDL_ICodeInstall_0001
{
CIP_DISK_FULL = 0,
CIP_ACCESS_DENIED = ( CIP_DISK_FULL + 1 ) ,
CIP_NEWER_VERSION_EXISTS = ( CIP_ACCESS_DENIED + 1 ) ,
CIP_OLDER_VERSION_EXISTS = ( CIP_NEWER_VERSION_EXISTS + 1 ) ,
CIP_NAME_CONFLICT = ( CIP_OLDER_VERSION_EXISTS + 1 ) ,
CIP_TRUST_VERIFICATION_COMPONENT_MISSING = ( CIP_NAME_CONFLICT + 1 ) ,
CIP_EXE_SELF_REGISTERATION_TIMEOUT = ( CIP_TRUST_VERIFICATION_COMPONENT_MISSING + 1 ) ,
CIP_UNSAFE_TO_ABORT = ( CIP_EXE_SELF_REGISTERATION_TIMEOUT + 1 ) ,
CIP_NEED_REBOOT = ( CIP_UNSAFE_TO_ABORT + 1 ) ,
CIP_NEED_REBOOT_UI_PERMISSION = ( CIP_NEED_REBOOT + 1 )
} CIP_STATUS;
EXTERN_C const IID IID_ICodeInstall;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d1-baf9-11ce-8c82-00aa004ba90b")
ICodeInstall : public IWindowForBindingUI
{
public:
virtual HRESULT STDMETHODCALLTYPE OnCodeInstallProblem(
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szDestination,
/* [annotation][unique][in] */
_In_ LPCWSTR szSource,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
};
#else /* C style interface */
typedef struct ICodeInstallVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICodeInstall * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICodeInstall * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICodeInstall * This);
DECLSPEC_XFGVIRT(IWindowForBindingUI, GetWindow)
HRESULT ( STDMETHODCALLTYPE *GetWindow )(
ICodeInstall * This,
/* [annotation][in] */
_In_ REFGUID rguidReason,
/* [annotation][out] */
_Out_ HWND *phwnd);
DECLSPEC_XFGVIRT(ICodeInstall, OnCodeInstallProblem)
HRESULT ( STDMETHODCALLTYPE *OnCodeInstallProblem )(
ICodeInstall * This,
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][unique][in] */
_In_ LPCWSTR szDestination,
/* [annotation][unique][in] */
_In_ LPCWSTR szSource,
/* [annotation][in] */
_In_ DWORD dwReserved);
END_INTERFACE
} ICodeInstallVtbl;
interface ICodeInstall
{
CONST_VTBL struct ICodeInstallVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICodeInstall_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICodeInstall_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICodeInstall_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICodeInstall_GetWindow(This,rguidReason,phwnd) \
( (This)->lpVtbl -> GetWindow(This,rguidReason,phwnd) )
#define ICodeInstall_OnCodeInstallProblem(This,ulStatusCode,szDestination,szSource,dwReserved) \
( (This)->lpVtbl -> OnCodeInstallProblem(This,ulStatusCode,szDestination,szSource,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICodeInstall_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0014 */
/* [local] */
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if (_WIN32_IE >= _WIN32_IE_IE70)
#ifndef _LPUri_DEFINED
#define _LPUri_DEFINED
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0014_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0014_v0_0_s_ifspec;
#ifndef __IUri_INTERFACE_DEFINED__
#define __IUri_INTERFACE_DEFINED__
/* interface IUri */
/* [unique][uuid][object] */
typedef /* [public][public][public][public][public][helpstring] */
enum __MIDL_IUri_0001
{
Uri_PROPERTY_ABSOLUTE_URI = 0,
Uri_PROPERTY_STRING_START = Uri_PROPERTY_ABSOLUTE_URI,
Uri_PROPERTY_AUTHORITY = 1,
Uri_PROPERTY_DISPLAY_URI = 2,
Uri_PROPERTY_DOMAIN = 3,
Uri_PROPERTY_EXTENSION = 4,
Uri_PROPERTY_FRAGMENT = 5,
Uri_PROPERTY_HOST = 6,
Uri_PROPERTY_PASSWORD = 7,
Uri_PROPERTY_PATH = 8,
Uri_PROPERTY_PATH_AND_QUERY = 9,
Uri_PROPERTY_QUERY = 10,
Uri_PROPERTY_RAW_URI = 11,
Uri_PROPERTY_SCHEME_NAME = 12,
Uri_PROPERTY_USER_INFO = 13,
Uri_PROPERTY_USER_NAME = 14,
Uri_PROPERTY_STRING_LAST = Uri_PROPERTY_USER_NAME,
Uri_PROPERTY_HOST_TYPE = 15,
Uri_PROPERTY_DWORD_START = Uri_PROPERTY_HOST_TYPE,
Uri_PROPERTY_PORT = 16,
Uri_PROPERTY_SCHEME = 17,
Uri_PROPERTY_ZONE = 18,
Uri_PROPERTY_DWORD_LAST = Uri_PROPERTY_ZONE
} Uri_PROPERTY;
typedef /* [public][helpstring] */
enum __MIDL_IUri_0002
{
Uri_HOST_UNKNOWN = 0,
Uri_HOST_DNS = ( Uri_HOST_UNKNOWN + 1 ) ,
Uri_HOST_IPV4 = ( Uri_HOST_DNS + 1 ) ,
Uri_HOST_IPV6 = ( Uri_HOST_IPV4 + 1 ) ,
Uri_HOST_IDN = ( Uri_HOST_IPV6 + 1 )
} Uri_HOST_TYPE;
EXTERN_C const IID IID_IUri;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("A39EE748-6A27-4817-A6F2-13914BEF5890")
IUri : public IUnknown
{
public:
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertyBSTR(
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ BSTR *pbstrProperty,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertyLength(
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ DWORD *pcchProperty,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertyDWORD(
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ DWORD *pdwProperty,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE HasProperty(
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ BOOL *pfHasProperty) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetAbsoluteUri(
/* [annotation][out] */
_Out_ BSTR *pbstrAbsoluteUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetAuthority(
/* [annotation][out] */
_Out_ BSTR *pbstrAuthority) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayUri(
/* [annotation][out] */
_Out_ BSTR *pbstrDisplayString) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDomain(
/* [annotation][out] */
_Out_ BSTR *pbstrDomain) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetExtension(
/* [annotation][out] */
_Out_ BSTR *pbstrExtension) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetFragment(
/* [annotation][out] */
_Out_ BSTR *pbstrFragment) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetHost(
/* [annotation][out] */
_Out_ BSTR *pbstrHost) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPassword(
/* [annotation][out] */
_Out_ BSTR *pbstrPassword) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPath(
/* [annotation][out] */
_Out_ BSTR *pbstrPath) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPathAndQuery(
/* [annotation][out] */
_Out_ BSTR *pbstrPathAndQuery) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetQuery(
/* [annotation][out] */
_Out_ BSTR *pbstrQuery) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetRawUri(
/* [annotation][out] */
_Out_ BSTR *pbstrRawUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSchemeName(
/* [annotation][out] */
_Out_ BSTR *pbstrSchemeName) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserInfo(
/* [annotation][out] */
_Out_ BSTR *pbstrUserInfo) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserName(
/* [annotation][out] */
_Out_ BSTR *pbstrUserName) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetHostType(
/* [annotation][out] */
_Out_ DWORD *pdwHostType) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPort(
/* [annotation][out] */
_Out_ DWORD *pdwPort) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetScheme(
/* [annotation][out] */
_Out_ DWORD *pdwScheme) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetZone(
/* [annotation][out] */
_Out_ DWORD *pdwZone) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetProperties(
/* [annotation][out] */
_Out_ LPDWORD pdwFlags) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE IsEqual(
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][out] */
_Out_ BOOL *pfEqual) = 0;
};
#else /* C style interface */
typedef struct IUriVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IUri * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IUri * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IUri * This);
DECLSPEC_XFGVIRT(IUri, GetPropertyBSTR)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertyBSTR )(
__RPC__in IUri * This,
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ BSTR *pbstrProperty,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IUri, GetPropertyLength)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertyLength )(
__RPC__in IUri * This,
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ DWORD *pcchProperty,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IUri, GetPropertyDWORD)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertyDWORD )(
__RPC__in IUri * This,
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ DWORD *pdwProperty,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IUri, HasProperty)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *HasProperty )(
__RPC__in IUri * This,
/* [range][in] */ Uri_PROPERTY uriProp,
/* [annotation][out] */
_Out_ BOOL *pfHasProperty);
DECLSPEC_XFGVIRT(IUri, GetAbsoluteUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetAbsoluteUri )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrAbsoluteUri);
DECLSPEC_XFGVIRT(IUri, GetAuthority)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetAuthority )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrAuthority);
DECLSPEC_XFGVIRT(IUri, GetDisplayUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDisplayUri )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrDisplayString);
DECLSPEC_XFGVIRT(IUri, GetDomain)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDomain )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrDomain);
DECLSPEC_XFGVIRT(IUri, GetExtension)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetExtension )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrExtension);
DECLSPEC_XFGVIRT(IUri, GetFragment)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetFragment )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrFragment);
DECLSPEC_XFGVIRT(IUri, GetHost)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetHost )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrHost);
DECLSPEC_XFGVIRT(IUri, GetPassword)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPassword )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrPassword);
DECLSPEC_XFGVIRT(IUri, GetPath)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPath )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrPath);
DECLSPEC_XFGVIRT(IUri, GetPathAndQuery)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPathAndQuery )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrPathAndQuery);
DECLSPEC_XFGVIRT(IUri, GetQuery)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrQuery);
DECLSPEC_XFGVIRT(IUri, GetRawUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRawUri )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrRawUri);
DECLSPEC_XFGVIRT(IUri, GetSchemeName)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSchemeName )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrSchemeName);
DECLSPEC_XFGVIRT(IUri, GetUserInfo)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserInfo )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrUserInfo);
DECLSPEC_XFGVIRT(IUri, GetUserName)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserName )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ BSTR *pbstrUserName);
DECLSPEC_XFGVIRT(IUri, GetHostType)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetHostType )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ DWORD *pdwHostType);
DECLSPEC_XFGVIRT(IUri, GetPort)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPort )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ DWORD *pdwPort);
DECLSPEC_XFGVIRT(IUri, GetScheme)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetScheme )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ DWORD *pdwScheme);
DECLSPEC_XFGVIRT(IUri, GetZone)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetZone )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ DWORD *pdwZone);
DECLSPEC_XFGVIRT(IUri, GetProperties)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetProperties )(
__RPC__in IUri * This,
/* [annotation][out] */
_Out_ LPDWORD pdwFlags);
DECLSPEC_XFGVIRT(IUri, IsEqual)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsEqual )(
__RPC__in IUri * This,
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][out] */
_Out_ BOOL *pfEqual);
END_INTERFACE
} IUriVtbl;
interface IUri
{
CONST_VTBL struct IUriVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUri_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUri_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUri_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUri_GetPropertyBSTR(This,uriProp,pbstrProperty,dwFlags) \
( (This)->lpVtbl -> GetPropertyBSTR(This,uriProp,pbstrProperty,dwFlags) )
#define IUri_GetPropertyLength(This,uriProp,pcchProperty,dwFlags) \
( (This)->lpVtbl -> GetPropertyLength(This,uriProp,pcchProperty,dwFlags) )
#define IUri_GetPropertyDWORD(This,uriProp,pdwProperty,dwFlags) \
( (This)->lpVtbl -> GetPropertyDWORD(This,uriProp,pdwProperty,dwFlags) )
#define IUri_HasProperty(This,uriProp,pfHasProperty) \
( (This)->lpVtbl -> HasProperty(This,uriProp,pfHasProperty) )
#define IUri_GetAbsoluteUri(This,pbstrAbsoluteUri) \
( (This)->lpVtbl -> GetAbsoluteUri(This,pbstrAbsoluteUri) )
#define IUri_GetAuthority(This,pbstrAuthority) \
( (This)->lpVtbl -> GetAuthority(This,pbstrAuthority) )
#define IUri_GetDisplayUri(This,pbstrDisplayString) \
( (This)->lpVtbl -> GetDisplayUri(This,pbstrDisplayString) )
#define IUri_GetDomain(This,pbstrDomain) \
( (This)->lpVtbl -> GetDomain(This,pbstrDomain) )
#define IUri_GetExtension(This,pbstrExtension) \
( (This)->lpVtbl -> GetExtension(This,pbstrExtension) )
#define IUri_GetFragment(This,pbstrFragment) \
( (This)->lpVtbl -> GetFragment(This,pbstrFragment) )
#define IUri_GetHost(This,pbstrHost) \
( (This)->lpVtbl -> GetHost(This,pbstrHost) )
#define IUri_GetPassword(This,pbstrPassword) \
( (This)->lpVtbl -> GetPassword(This,pbstrPassword) )
#define IUri_GetPath(This,pbstrPath) \
( (This)->lpVtbl -> GetPath(This,pbstrPath) )
#define IUri_GetPathAndQuery(This,pbstrPathAndQuery) \
( (This)->lpVtbl -> GetPathAndQuery(This,pbstrPathAndQuery) )
#define IUri_GetQuery(This,pbstrQuery) \
( (This)->lpVtbl -> GetQuery(This,pbstrQuery) )
#define IUri_GetRawUri(This,pbstrRawUri) \
( (This)->lpVtbl -> GetRawUri(This,pbstrRawUri) )
#define IUri_GetSchemeName(This,pbstrSchemeName) \
( (This)->lpVtbl -> GetSchemeName(This,pbstrSchemeName) )
#define IUri_GetUserInfo(This,pbstrUserInfo) \
( (This)->lpVtbl -> GetUserInfo(This,pbstrUserInfo) )
#define IUri_GetUserName(This,pbstrUserName) \
( (This)->lpVtbl -> GetUserName(This,pbstrUserName) )
#define IUri_GetHostType(This,pdwHostType) \
( (This)->lpVtbl -> GetHostType(This,pdwHostType) )
#define IUri_GetPort(This,pdwPort) \
( (This)->lpVtbl -> GetPort(This,pdwPort) )
#define IUri_GetScheme(This,pdwScheme) \
( (This)->lpVtbl -> GetScheme(This,pdwScheme) )
#define IUri_GetZone(This,pdwZone) \
( (This)->lpVtbl -> GetZone(This,pdwZone) )
#define IUri_GetProperties(This,pdwFlags) \
( (This)->lpVtbl -> GetProperties(This,pdwFlags) )
#define IUri_IsEqual(This,pUri,pfEqual) \
( (This)->lpVtbl -> IsEqual(This,pUri,pfEqual) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUri_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0015 */
/* [local] */
STDAPI CreateUri(_In_ LPCWSTR pwzURI,
_In_ DWORD dwFlags,
_Reserved_ DWORD_PTR dwReserved, // must be 0
_Outptr_ IUri** ppURI);
STDAPI CreateUriWithFragment(
_In_ LPCWSTR pwzURI,
_In_opt_ LPCWSTR pwzFragment, // can be NULL
_In_ DWORD dwFlags,
_Reserved_ DWORD_PTR dwReserved, // must be 0
_Outptr_ IUri** ppURI);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
STDAPI CreateUriFromMultiByteString(
_In_ LPCSTR pszANSIInputUri,
DWORD dwEncodingFlags, // ORed set of Uri_ENCODING_ flags
DWORD dwCodePage,
DWORD dwCreateFlags,
_Reserved_ DWORD_PTR dwReserved, // must be 0
_Outptr_ IUri** ppUri);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#pragma region Application Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
//The following flags are used with IUri::GetProperties.
#define Uri_HAS_ABSOLUTE_URI (1 << Uri_PROPERTY_ABSOLUTE_URI)
#define Uri_HAS_AUTHORITY (1 << Uri_PROPERTY_AUTHORITY)
#define Uri_HAS_DISPLAY_URI (1 << Uri_PROPERTY_DISPLAY_URI)
#define Uri_HAS_DOMAIN (1 << Uri_PROPERTY_DOMAIN)
#define Uri_HAS_EXTENSION (1 << Uri_PROPERTY_EXTENSION)
#define Uri_HAS_FRAGMENT (1 << Uri_PROPERTY_FRAGMENT)
#define Uri_HAS_HOST (1 << Uri_PROPERTY_HOST)
#define Uri_HAS_PASSWORD (1 << Uri_PROPERTY_PASSWORD)
#define Uri_HAS_PATH (1 << Uri_PROPERTY_PATH)
#define Uri_HAS_QUERY (1 << Uri_PROPERTY_QUERY)
#define Uri_HAS_RAW_URI (1 << Uri_PROPERTY_RAW_URI)
#define Uri_HAS_SCHEME_NAME (1 << Uri_PROPERTY_SCHEME_NAME)
#define Uri_HAS_USER_NAME (1 << Uri_PROPERTY_USER_NAME)
#define Uri_HAS_PATH_AND_QUERY (1 << Uri_PROPERTY_PATH_AND_QUERY)
#define Uri_HAS_USER_INFO (1 << Uri_PROPERTY_USER_INFO)
#define Uri_HAS_HOST_TYPE (1 << Uri_PROPERTY_HOST_TYPE)
#define Uri_HAS_PORT (1 << Uri_PROPERTY_PORT)
#define Uri_HAS_SCHEME (1 << Uri_PROPERTY_SCHEME)
#define Uri_HAS_ZONE (1 << Uri_PROPERTY_ZONE)
//The following public Uri_CREATE flags may be passed in
//through the dwFlags parameter of the CreateUri functions.
//Note that ALLOW_RELATIVE and ALLOW_IMPLICIT_WILDCARD_SCHEME are mutually exclusive and may not be passed together.
#define Uri_CREATE_ALLOW_RELATIVE 0x00000001 // When the scheme is unspecified and not implicit file, assume relative.
#define Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME 0x00000002 // When the scheme is unspecified and not implicit file, assume wildcard.
#define Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME 0x00000004 // When the scheme is unspecified and it starts with X: or \\ assume its a file scheme.
#define Uri_CREATE_NOFRAG 0x00000008 // If there's a query string don't look for a fragment
#define Uri_CREATE_NO_CANONICALIZE 0x00000010 // Do not canonicalize the scheme, host, authority, or path
#define Uri_CREATE_CANONICALIZE 0x00000100 // DEFAULT: Canonicalize the scheme, host, authority, and path
#define Uri_CREATE_FILE_USE_DOS_PATH 0x00000020 // Use DOS path compat mode for file URI creation
#define Uri_CREATE_DECODE_EXTRA_INFO 0x00000040 // Beta2 DEFAULT: Decode the contents of query and fragment, then re-encode reserved characters
#define Uri_CREATE_NO_DECODE_EXTRA_INFO 0x00000080 // Beta1 DEFAULT: Neither decode nor re-encode any part of the query or fragment
#define Uri_CREATE_CRACK_UNKNOWN_SCHEMES 0x00000200 // Beta2 DEFAULT: Heirarchical URIs with present and unknown schemes will be treated like heirarchical URIs
#define Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES 0x00000400 // Beta1 DEFAULT: Heirarchical URIs with present and unknown schemes will be treated like opaque URIs
#define Uri_CREATE_PRE_PROCESS_HTML_URI 0x00000800 // DEFAULT: Perform pre-processing on the URI to remove control characters and whitespace as if the URI comes from the raw href value of an HTML page.
#define Uri_CREATE_NO_PRE_PROCESS_HTML_URI 0x00001000 // Don't perform pre-processing to remove control characters and whitespace as appropriate.
#define Uri_CREATE_IE_SETTINGS 0x00002000 // Use IE registry settings for such things as whether or not to use IDN.
#define Uri_CREATE_NO_IE_SETTINGS 0x00004000 // DEFAULT: Don't use IE registry settings.
#define Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS 0x00008000 // Don't percent-encode characters that are forbidden by the RFC.
#define Uri_CREATE_NORMALIZE_INTL_CHARACTERS 0x00010000 // Percent encode all extended unicode charcters, then decode all percent encoded extended unicode characters (except those identified as dangerous)
#define Uri_CREATE_CANONICALIZE_ABSOLUTE 0x00020000 // Generate a fully UTF-8 encoded value for absoluteUri
//The following flags may be passed in through the dwFlags
//parameter of the IUri::GetPropertyBSTR or IUri::GetPropertyLength functions.
//The following flags apply only to the property Uri_PROPERTY_DISPLAY_URI:
#define Uri_DISPLAY_NO_FRAGMENT 0x00000001 // Exclude fragment from the DisplayUri, if one exists
#define Uri_PUNYCODE_IDN_HOST 0x00000002 // Show the hostname encoded as punycode inside the Host, Domain, or AbsoluteUri properties, if the Uri is IDN
#define Uri_DISPLAY_IDN_HOST 0x00000004 // Show the hostname encoded as punycode or Unicode as it would appear in the DisplayUri property. This applies to the Host, Domain, and AbsoluteUri properties.
#define Uri_DISPLAY_NO_PUNYCODE 0x00000008 // Show the hostname encoded as Unicode from the DisplayUri, if the Uri is IDN
// The following are Uri_ENCODING_ flags for use with the function CreateUriFromMultiByteString
#define Uri_ENCODING_USER_INFO_AND_PATH_IS_PERCENT_ENCODED_UTF8 0x00000001
#define Uri_ENCODING_USER_INFO_AND_PATH_IS_CP 0x00000002
#define Uri_ENCODING_HOST_IS_IDN 0x00000004
#define Uri_ENCODING_HOST_IS_PERCENT_ENCODED_UTF8 0x00000008
#define Uri_ENCODING_HOST_IS_PERCENT_ENCODED_CP 0x00000010
#define Uri_ENCODING_QUERY_AND_FRAGMENT_IS_PERCENT_ENCODED_UTF8 0x00000020
#define Uri_ENCODING_QUERY_AND_FRAGMENT_IS_CP 0x00000040
#define Uri_ENCODING_RFC (Uri_ENCODING_USER_INFO_AND_PATH_IS_PERCENT_ENCODED_UTF8 | Uri_ENCODING_HOST_IS_PERCENT_ENCODED_UTF8 | Uri_ENCODING_QUERY_AND_FRAGMENT_IS_PERCENT_ENCODED_UTF8)
//The following flags may be passed in through the dwUriBuilderFlags
//parameter of the IUriBuilder::CreateUri
#define UriBuilder_USE_ORIGINAL_FLAGS 0x00000001 // Use the create flags from the underlying IUri if they are available.
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#endif
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0015_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0015_v0_0_s_ifspec;
#ifndef __IUriContainer_INTERFACE_DEFINED__
#define __IUriContainer_INTERFACE_DEFINED__
/* interface IUriContainer */
/* [unique][uuid][local][object] */
EXTERN_C const IID IID_IUriContainer;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a158a630-ed6f-45fb-b987-f68676f57752")
IUriContainer : public IUnknown
{
public:
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetIUri(
/* [annotation][out] */
_Out_ IUri **ppIUri) = 0;
};
#else /* C style interface */
typedef struct IUriContainerVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUriContainer * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUriContainer * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IUriContainer * This);
DECLSPEC_XFGVIRT(IUriContainer, GetIUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetIUri )(
IUriContainer * This,
/* [annotation][out] */
_Out_ IUri **ppIUri);
END_INTERFACE
} IUriContainerVtbl;
interface IUriContainer
{
CONST_VTBL struct IUriContainerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUriContainer_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUriContainer_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUriContainer_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUriContainer_GetIUri(This,ppIUri) \
( (This)->lpVtbl -> GetIUri(This,ppIUri) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUriContainer_INTERFACE_DEFINED__ */
#ifndef __IUriBuilder_INTERFACE_DEFINED__
#define __IUriBuilder_INTERFACE_DEFINED__
/* interface IUriBuilder */
/* [unique][uuid][object][local][helpstring] */
EXTERN_C const IID IID_IUriBuilder;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("4221B2E1-8955-46c0-BD5B-DE9897565DE7")
IUriBuilder : public IUnknown
{
public:
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateUriSimple(
/* [annotation][in] */
_In_ DWORD dwAllowEncodingPropertyMask,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Outptr_ IUri **ppIUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateUri(
/* [annotation][in] */
_In_ DWORD dwCreateFlags,
/* [annotation][in] */
_In_ DWORD dwAllowEncodingPropertyMask,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Outptr_ IUri **ppIUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateUriWithFlags(
/* [annotation][in] */
_In_ DWORD dwCreateFlags,
/* [annotation][in] */
_In_ DWORD dwUriBuilderFlags,
/* [annotation][in] */
_In_ DWORD dwAllowEncodingPropertyMask,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Outptr_ IUri **ppIUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetIUri(
/* [annotation][out] */
_Outptr_result_maybenull_ IUri **ppIUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetIUri(
/* [annotation][unique][in] */
_In_opt_ IUri *pIUri) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetFragment(
/* [annotation][out] */
_Out_ DWORD *pcchFragment,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzFragment) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetHost(
/* [annotation][out] */
_Out_ DWORD *pcchHost,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzHost) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPassword(
/* [annotation][out] */
_Out_ DWORD *pcchPassword,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzPassword) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPath(
/* [annotation][out] */
_Out_ DWORD *pcchPath,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzPath) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPort(
/* [annotation][out] */
_Out_ BOOL *pfHasPort,
/* [annotation][out] */
_Out_ DWORD *pdwPort) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetQuery(
/* [annotation][out] */
_Out_ DWORD *pcchQuery,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzQuery) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSchemeName(
/* [annotation][out] */
_Out_ DWORD *pcchSchemeName,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzSchemeName) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserName(
/* [annotation][out] */
_Out_ DWORD *pcchUserName,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzUserName) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetFragment(
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetHost(
/* [annotation][in] */
_In_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPassword(
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPath(
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPort(
/* [annotation][in] */
_In_ BOOL fHasPort,
/* [annotation][in] */
_In_ DWORD dwNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetQuery(
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSchemeName(
/* [annotation][in] */
_In_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserName(
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveProperties(
/* [annotation][in] */
_In_ DWORD dwPropertyMask) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE HasBeenModified(
/* [annotation][out] */
_Out_ BOOL *pfModified) = 0;
};
#else /* C style interface */
typedef struct IUriBuilderVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUriBuilder * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUriBuilder * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IUriBuilder * This);
DECLSPEC_XFGVIRT(IUriBuilder, CreateUriSimple)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateUriSimple )(
IUriBuilder * This,
/* [annotation][in] */
_In_ DWORD dwAllowEncodingPropertyMask,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Outptr_ IUri **ppIUri);
DECLSPEC_XFGVIRT(IUriBuilder, CreateUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateUri )(
IUriBuilder * This,
/* [annotation][in] */
_In_ DWORD dwCreateFlags,
/* [annotation][in] */
_In_ DWORD dwAllowEncodingPropertyMask,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Outptr_ IUri **ppIUri);
DECLSPEC_XFGVIRT(IUriBuilder, CreateUriWithFlags)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateUriWithFlags )(
IUriBuilder * This,
/* [annotation][in] */
_In_ DWORD dwCreateFlags,
/* [annotation][in] */
_In_ DWORD dwUriBuilderFlags,
/* [annotation][in] */
_In_ DWORD dwAllowEncodingPropertyMask,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Outptr_ IUri **ppIUri);
DECLSPEC_XFGVIRT(IUriBuilder, GetIUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetIUri )(
IUriBuilder * This,
/* [annotation][out] */
_Outptr_result_maybenull_ IUri **ppIUri);
DECLSPEC_XFGVIRT(IUriBuilder, SetIUri)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetIUri )(
IUriBuilder * This,
/* [annotation][unique][in] */
_In_opt_ IUri *pIUri);
DECLSPEC_XFGVIRT(IUriBuilder, GetFragment)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetFragment )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchFragment,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzFragment);
DECLSPEC_XFGVIRT(IUriBuilder, GetHost)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetHost )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchHost,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzHost);
DECLSPEC_XFGVIRT(IUriBuilder, GetPassword)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPassword )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchPassword,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzPassword);
DECLSPEC_XFGVIRT(IUriBuilder, GetPath)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPath )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchPath,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzPath);
DECLSPEC_XFGVIRT(IUriBuilder, GetPort)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPort )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ BOOL *pfHasPort,
/* [annotation][out] */
_Out_ DWORD *pdwPort);
DECLSPEC_XFGVIRT(IUriBuilder, GetQuery)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetQuery )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchQuery,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzQuery);
DECLSPEC_XFGVIRT(IUriBuilder, GetSchemeName)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSchemeName )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchSchemeName,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzSchemeName);
DECLSPEC_XFGVIRT(IUriBuilder, GetUserName)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserName )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ DWORD *pcchUserName,
/* [annotation][out] */
_Outptr_result_maybenull_ LPCWSTR *ppwzUserName);
DECLSPEC_XFGVIRT(IUriBuilder, SetFragment)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetFragment )(
IUriBuilder * This,
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetHost)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetHost )(
IUriBuilder * This,
/* [annotation][in] */
_In_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetPassword)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPassword )(
IUriBuilder * This,
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetPath)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPath )(
IUriBuilder * This,
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetPort)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPort )(
IUriBuilder * This,
/* [annotation][in] */
_In_ BOOL fHasPort,
/* [annotation][in] */
_In_ DWORD dwNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetQuery)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetQuery )(
IUriBuilder * This,
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetSchemeName)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSchemeName )(
IUriBuilder * This,
/* [annotation][in] */
_In_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, SetUserName)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserName )(
IUriBuilder * This,
/* [annotation][in] */
_In_opt_ LPCWSTR pwzNewValue);
DECLSPEC_XFGVIRT(IUriBuilder, RemoveProperties)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveProperties )(
IUriBuilder * This,
/* [annotation][in] */
_In_ DWORD dwPropertyMask);
DECLSPEC_XFGVIRT(IUriBuilder, HasBeenModified)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *HasBeenModified )(
IUriBuilder * This,
/* [annotation][out] */
_Out_ BOOL *pfModified);
END_INTERFACE
} IUriBuilderVtbl;
interface IUriBuilder
{
CONST_VTBL struct IUriBuilderVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUriBuilder_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUriBuilder_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUriBuilder_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUriBuilder_CreateUriSimple(This,dwAllowEncodingPropertyMask,dwReserved,ppIUri) \
( (This)->lpVtbl -> CreateUriSimple(This,dwAllowEncodingPropertyMask,dwReserved,ppIUri) )
#define IUriBuilder_CreateUri(This,dwCreateFlags,dwAllowEncodingPropertyMask,dwReserved,ppIUri) \
( (This)->lpVtbl -> CreateUri(This,dwCreateFlags,dwAllowEncodingPropertyMask,dwReserved,ppIUri) )
#define IUriBuilder_CreateUriWithFlags(This,dwCreateFlags,dwUriBuilderFlags,dwAllowEncodingPropertyMask,dwReserved,ppIUri) \
( (This)->lpVtbl -> CreateUriWithFlags(This,dwCreateFlags,dwUriBuilderFlags,dwAllowEncodingPropertyMask,dwReserved,ppIUri) )
#define IUriBuilder_GetIUri(This,ppIUri) \
( (This)->lpVtbl -> GetIUri(This,ppIUri) )
#define IUriBuilder_SetIUri(This,pIUri) \
( (This)->lpVtbl -> SetIUri(This,pIUri) )
#define IUriBuilder_GetFragment(This,pcchFragment,ppwzFragment) \
( (This)->lpVtbl -> GetFragment(This,pcchFragment,ppwzFragment) )
#define IUriBuilder_GetHost(This,pcchHost,ppwzHost) \
( (This)->lpVtbl -> GetHost(This,pcchHost,ppwzHost) )
#define IUriBuilder_GetPassword(This,pcchPassword,ppwzPassword) \
( (This)->lpVtbl -> GetPassword(This,pcchPassword,ppwzPassword) )
#define IUriBuilder_GetPath(This,pcchPath,ppwzPath) \
( (This)->lpVtbl -> GetPath(This,pcchPath,ppwzPath) )
#define IUriBuilder_GetPort(This,pfHasPort,pdwPort) \
( (This)->lpVtbl -> GetPort(This,pfHasPort,pdwPort) )
#define IUriBuilder_GetQuery(This,pcchQuery,ppwzQuery) \
( (This)->lpVtbl -> GetQuery(This,pcchQuery,ppwzQuery) )
#define IUriBuilder_GetSchemeName(This,pcchSchemeName,ppwzSchemeName) \
( (This)->lpVtbl -> GetSchemeName(This,pcchSchemeName,ppwzSchemeName) )
#define IUriBuilder_GetUserName(This,pcchUserName,ppwzUserName) \
( (This)->lpVtbl -> GetUserName(This,pcchUserName,ppwzUserName) )
#define IUriBuilder_SetFragment(This,pwzNewValue) \
( (This)->lpVtbl -> SetFragment(This,pwzNewValue) )
#define IUriBuilder_SetHost(This,pwzNewValue) \
( (This)->lpVtbl -> SetHost(This,pwzNewValue) )
#define IUriBuilder_SetPassword(This,pwzNewValue) \
( (This)->lpVtbl -> SetPassword(This,pwzNewValue) )
#define IUriBuilder_SetPath(This,pwzNewValue) \
( (This)->lpVtbl -> SetPath(This,pwzNewValue) )
#define IUriBuilder_SetPort(This,fHasPort,dwNewValue) \
( (This)->lpVtbl -> SetPort(This,fHasPort,dwNewValue) )
#define IUriBuilder_SetQuery(This,pwzNewValue) \
( (This)->lpVtbl -> SetQuery(This,pwzNewValue) )
#define IUriBuilder_SetSchemeName(This,pwzNewValue) \
( (This)->lpVtbl -> SetSchemeName(This,pwzNewValue) )
#define IUriBuilder_SetUserName(This,pwzNewValue) \
( (This)->lpVtbl -> SetUserName(This,pwzNewValue) )
#define IUriBuilder_RemoveProperties(This,dwPropertyMask) \
( (This)->lpVtbl -> RemoveProperties(This,dwPropertyMask) )
#define IUriBuilder_HasBeenModified(This,pfModified) \
( (This)->lpVtbl -> HasBeenModified(This,pfModified) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUriBuilder_INTERFACE_DEFINED__ */
#ifndef __IUriBuilderFactory_INTERFACE_DEFINED__
#define __IUriBuilderFactory_INTERFACE_DEFINED__
/* interface IUriBuilderFactory */
/* [unique][uuid][object][local][helpstring] */
EXTERN_C const IID IID_IUriBuilderFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("E982CE48-0B96-440c-BC37-0C869B27A29E")
IUriBuilderFactory : public IUnknown
{
public:
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateIUriBuilder(
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Out_ IUriBuilder **ppIUriBuilder) = 0;
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateInitializedIUriBuilder(
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Out_ IUriBuilder **ppIUriBuilder) = 0;
};
#else /* C style interface */
typedef struct IUriBuilderFactoryVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IUriBuilderFactory * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IUriBuilderFactory * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IUriBuilderFactory * This);
DECLSPEC_XFGVIRT(IUriBuilderFactory, CreateIUriBuilder)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateIUriBuilder )(
IUriBuilderFactory * This,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Out_ IUriBuilder **ppIUriBuilder);
DECLSPEC_XFGVIRT(IUriBuilderFactory, CreateInitializedIUriBuilder)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateInitializedIUriBuilder )(
IUriBuilderFactory * This,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Out_ IUriBuilder **ppIUriBuilder);
END_INTERFACE
} IUriBuilderFactoryVtbl;
interface IUriBuilderFactory
{
CONST_VTBL struct IUriBuilderFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IUriBuilderFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IUriBuilderFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IUriBuilderFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IUriBuilderFactory_CreateIUriBuilder(This,dwFlags,dwReserved,ppIUriBuilder) \
( (This)->lpVtbl -> CreateIUriBuilder(This,dwFlags,dwReserved,ppIUriBuilder) )
#define IUriBuilderFactory_CreateInitializedIUriBuilder(This,dwFlags,dwReserved,ppIUriBuilder) \
( (This)->lpVtbl -> CreateInitializedIUriBuilder(This,dwFlags,dwReserved,ppIUriBuilder) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IUriBuilderFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0018 */
/* [local] */
STDAPI CreateIUriBuilder(
_In_opt_ IUri *pIUri,
_In_ DWORD dwFlags,
_In_ DWORD_PTR dwReserved,
_Outptr_ IUriBuilder **ppIUriBuilder
);
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#ifndef _LPWININETINFO_DEFINED
#define _LPWININETINFO_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0018_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0018_v0_0_s_ifspec;
#ifndef __IWinInetInfo_INTERFACE_DEFINED__
#define __IWinInetInfo_INTERFACE_DEFINED__
/* interface IWinInetInfo */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IWinInetInfo *LPWININETINFO;
EXTERN_C const IID IID_IWinInetInfo;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d6-bafa-11ce-8c82-00aa004ba90b")
IWinInetInfo : public IUnknown
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE QueryOption(
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf) = 0;
};
#else /* C style interface */
typedef struct IWinInetInfoVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IWinInetInfo * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IWinInetInfo * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IWinInetInfo * This);
DECLSPEC_XFGVIRT(IWinInetInfo, QueryOption)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *QueryOption )(
IWinInetInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf);
END_INTERFACE
} IWinInetInfoVtbl;
interface IWinInetInfo
{
CONST_VTBL struct IWinInetInfoVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWinInetInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWinInetInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWinInetInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWinInetInfo_QueryOption(This,dwOption,pBuffer,pcbBuf) \
( (This)->lpVtbl -> QueryOption(This,dwOption,pBuffer,pcbBuf) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IWinInetInfo_RemoteQueryOption_Proxy(
__RPC__in IWinInetInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) BYTE *pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf);
void __RPC_STUB IWinInetInfo_RemoteQueryOption_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IWinInetInfo_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0019 */
/* [local] */
#endif
#define WININETINFO_OPTION_LOCK_HANDLE 65534
#ifndef _LPHTTPSECURITY_DEFINED
#define _LPHTTPSECURITY_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0019_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0019_v0_0_s_ifspec;
#ifndef __IHttpSecurity_INTERFACE_DEFINED__
#define __IHttpSecurity_INTERFACE_DEFINED__
/* interface IHttpSecurity */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IHttpSecurity *LPHTTPSECURITY;
EXTERN_C const IID IID_IHttpSecurity;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d7-bafa-11ce-8c82-00aa004ba90b")
IHttpSecurity : public IWindowForBindingUI
{
public:
virtual HRESULT STDMETHODCALLTYPE OnSecurityProblem(
/* [annotation][in] */
_In_ DWORD dwProblem) = 0;
};
#else /* C style interface */
typedef struct IHttpSecurityVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IHttpSecurity * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IHttpSecurity * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IHttpSecurity * This);
DECLSPEC_XFGVIRT(IWindowForBindingUI, GetWindow)
HRESULT ( STDMETHODCALLTYPE *GetWindow )(
IHttpSecurity * This,
/* [annotation][in] */
_In_ REFGUID rguidReason,
/* [annotation][out] */
_Out_ HWND *phwnd);
DECLSPEC_XFGVIRT(IHttpSecurity, OnSecurityProblem)
HRESULT ( STDMETHODCALLTYPE *OnSecurityProblem )(
IHttpSecurity * This,
/* [annotation][in] */
_In_ DWORD dwProblem);
END_INTERFACE
} IHttpSecurityVtbl;
interface IHttpSecurity
{
CONST_VTBL struct IHttpSecurityVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IHttpSecurity_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IHttpSecurity_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IHttpSecurity_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IHttpSecurity_GetWindow(This,rguidReason,phwnd) \
( (This)->lpVtbl -> GetWindow(This,rguidReason,phwnd) )
#define IHttpSecurity_OnSecurityProblem(This,dwProblem) \
( (This)->lpVtbl -> OnSecurityProblem(This,dwProblem) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IHttpSecurity_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0020 */
/* [local] */
#endif
#ifndef _LPWININETHTTPINFO_DEFINED
#define _LPWININETHTTPINFO_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0020_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0020_v0_0_s_ifspec;
#ifndef __IWinInetHttpInfo_INTERFACE_DEFINED__
#define __IWinInetHttpInfo_INTERFACE_DEFINED__
/* interface IWinInetHttpInfo */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IWinInetHttpInfo *LPWININETHTTPINFO;
EXTERN_C const IID IID_IWinInetHttpInfo;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9d8-bafa-11ce-8c82-00aa004ba90b")
IWinInetHttpInfo : public IWinInetInfo
{
public:
virtual /* [local] */ HRESULT STDMETHODCALLTYPE QueryInfo(
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][out][in] */
_Inout_ DWORD *pdwFlags,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved) = 0;
};
#else /* C style interface */
typedef struct IWinInetHttpInfoVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IWinInetHttpInfo * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IWinInetHttpInfo * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IWinInetHttpInfo * This);
DECLSPEC_XFGVIRT(IWinInetInfo, QueryOption)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *QueryOption )(
IWinInetHttpInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf);
DECLSPEC_XFGVIRT(IWinInetHttpInfo, QueryInfo)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *QueryInfo )(
IWinInetHttpInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][out][in] */
_Inout_ DWORD *pdwFlags,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
END_INTERFACE
} IWinInetHttpInfoVtbl;
interface IWinInetHttpInfo
{
CONST_VTBL struct IWinInetHttpInfoVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWinInetHttpInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWinInetHttpInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWinInetHttpInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWinInetHttpInfo_QueryOption(This,dwOption,pBuffer,pcbBuf) \
( (This)->lpVtbl -> QueryOption(This,dwOption,pBuffer,pcbBuf) )
#define IWinInetHttpInfo_QueryInfo(This,dwOption,pBuffer,pcbBuf,pdwFlags,pdwReserved) \
( (This)->lpVtbl -> QueryInfo(This,dwOption,pBuffer,pcbBuf,pdwFlags,pdwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IWinInetHttpInfo_RemoteQueryInfo_Proxy(
__RPC__in IWinInetHttpInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) BYTE *pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][out][in] */
_Inout_ DWORD *pdwFlags,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
void __RPC_STUB IWinInetHttpInfo_RemoteQueryInfo_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IWinInetHttpInfo_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0021 */
/* [local] */
#endif
#ifndef _LPWININETHTTPTIMEOUTS_DEFINED
#define _LPWININETHTTPTIMEOUTS_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0021_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0021_v0_0_s_ifspec;
#ifndef __IWinInetHttpTimeouts_INTERFACE_DEFINED__
#define __IWinInetHttpTimeouts_INTERFACE_DEFINED__
/* interface IWinInetHttpTimeouts */
/* [unique][uuid][object][local] */
EXTERN_C const IID IID_IWinInetHttpTimeouts;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("F286FA56-C1FD-4270-8E67-B3EB790A81E8")
IWinInetHttpTimeouts : public IUnknown
{
public:
virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetRequestTimeouts(
/* [annotation][out] */
_Out_ DWORD *pdwConnectTimeout,
/* [annotation][out] */
_Out_ DWORD *pdwSendTimeout,
/* [annotation][out] */
_Out_ DWORD *pdwReceiveTimeout) = 0;
};
#else /* C style interface */
typedef struct IWinInetHttpTimeoutsVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IWinInetHttpTimeouts * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IWinInetHttpTimeouts * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IWinInetHttpTimeouts * This);
DECLSPEC_XFGVIRT(IWinInetHttpTimeouts, GetRequestTimeouts)
/* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRequestTimeouts )(
IWinInetHttpTimeouts * This,
/* [annotation][out] */
_Out_ DWORD *pdwConnectTimeout,
/* [annotation][out] */
_Out_ DWORD *pdwSendTimeout,
/* [annotation][out] */
_Out_ DWORD *pdwReceiveTimeout);
END_INTERFACE
} IWinInetHttpTimeoutsVtbl;
interface IWinInetHttpTimeouts
{
CONST_VTBL struct IWinInetHttpTimeoutsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWinInetHttpTimeouts_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWinInetHttpTimeouts_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWinInetHttpTimeouts_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWinInetHttpTimeouts_GetRequestTimeouts(This,pdwConnectTimeout,pdwSendTimeout,pdwReceiveTimeout) \
( (This)->lpVtbl -> GetRequestTimeouts(This,pdwConnectTimeout,pdwSendTimeout,pdwReceiveTimeout) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IWinInetHttpTimeouts_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0022 */
/* [local] */
#endif
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#ifndef _LPWININETCACHEHINTS_DEFINED
#define _LPWININETCACHEHINTS_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0022_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0022_v0_0_s_ifspec;
#ifndef __IWinInetCacheHints_INTERFACE_DEFINED__
#define __IWinInetCacheHints_INTERFACE_DEFINED__
/* interface IWinInetCacheHints */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IWinInetCacheHints *LPWININETCACHEHINTS;
EXTERN_C const IID IID_IWinInetCacheHints;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("DD1EC3B3-8391-4fdb-A9E6-347C3CAAA7DD")
IWinInetCacheHints : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetCacheExtension(
/* [annotation][in] */
_In_ LPCWSTR pwzExt,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbCacheFile) LPVOID pszCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pcbCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pdwWinInetError,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved) = 0;
};
#else /* C style interface */
typedef struct IWinInetCacheHintsVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IWinInetCacheHints * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IWinInetCacheHints * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IWinInetCacheHints * This);
DECLSPEC_XFGVIRT(IWinInetCacheHints, SetCacheExtension)
HRESULT ( STDMETHODCALLTYPE *SetCacheExtension )(
IWinInetCacheHints * This,
/* [annotation][in] */
_In_ LPCWSTR pwzExt,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbCacheFile) LPVOID pszCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pcbCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pdwWinInetError,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
END_INTERFACE
} IWinInetCacheHintsVtbl;
interface IWinInetCacheHints
{
CONST_VTBL struct IWinInetCacheHintsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWinInetCacheHints_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWinInetCacheHints_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWinInetCacheHints_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWinInetCacheHints_SetCacheExtension(This,pwzExt,pszCacheFile,pcbCacheFile,pdwWinInetError,pdwReserved) \
( (This)->lpVtbl -> SetCacheExtension(This,pwzExt,pszCacheFile,pcbCacheFile,pdwWinInetError,pdwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IWinInetCacheHints_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0023 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_IE70)
#ifndef _LPWININETCACHEHINTS2_DEFINED
#define _LPWININETCACHEHINTS2_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0023_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0023_v0_0_s_ifspec;
#ifndef __IWinInetCacheHints2_INTERFACE_DEFINED__
#define __IWinInetCacheHints2_INTERFACE_DEFINED__
/* interface IWinInetCacheHints2 */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IWinInetCacheHints2 *LPWININETCACHEHINTS2;
EXTERN_C const IID IID_IWinInetCacheHints2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("7857AEAC-D31F-49bf-884E-DD46DF36780A")
IWinInetCacheHints2 : public IWinInetCacheHints
{
public:
virtual HRESULT STDMETHODCALLTYPE SetCacheExtension2(
/* [annotation][in] */
_In_ LPCWSTR pwzExt,
/* [annotation][size_is][out] */
__RPC__out_ecount(*pcchCacheFile) WCHAR *pwzCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pcchCacheFile,
/* [annotation][out] */
_Out_ DWORD *pdwWinInetError,
/* [annotation][out] */
_Out_ DWORD *pdwReserved) = 0;
};
#else /* C style interface */
typedef struct IWinInetCacheHints2Vtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IWinInetCacheHints2 * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IWinInetCacheHints2 * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IWinInetCacheHints2 * This);
DECLSPEC_XFGVIRT(IWinInetCacheHints, SetCacheExtension)
HRESULT ( STDMETHODCALLTYPE *SetCacheExtension )(
IWinInetCacheHints2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwzExt,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbCacheFile) LPVOID pszCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pcbCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pdwWinInetError,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
DECLSPEC_XFGVIRT(IWinInetCacheHints2, SetCacheExtension2)
HRESULT ( STDMETHODCALLTYPE *SetCacheExtension2 )(
IWinInetCacheHints2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwzExt,
/* [annotation][size_is][out] */
__RPC__out_ecount(*pcchCacheFile) WCHAR *pwzCacheFile,
/* [annotation][out][in] */
_Inout_ DWORD *pcchCacheFile,
/* [annotation][out] */
_Out_ DWORD *pdwWinInetError,
/* [annotation][out] */
_Out_ DWORD *pdwReserved);
END_INTERFACE
} IWinInetCacheHints2Vtbl;
interface IWinInetCacheHints2
{
CONST_VTBL struct IWinInetCacheHints2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWinInetCacheHints2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWinInetCacheHints2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWinInetCacheHints2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWinInetCacheHints2_SetCacheExtension(This,pwzExt,pszCacheFile,pcbCacheFile,pdwWinInetError,pdwReserved) \
( (This)->lpVtbl -> SetCacheExtension(This,pwzExt,pszCacheFile,pcbCacheFile,pdwWinInetError,pdwReserved) )
#define IWinInetCacheHints2_SetCacheExtension2(This,pwzExt,pwzCacheFile,pcchCacheFile,pdwWinInetError,pdwReserved) \
( (This)->lpVtbl -> SetCacheExtension2(This,pwzExt,pwzCacheFile,pcchCacheFile,pdwWinInetError,pdwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IWinInetCacheHints2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0024 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define SID_IBindHost IID_IBindHost
#define SID_SBindHost IID_IBindHost
#ifndef _LPBINDHOST_DEFINED
#define _LPBINDHOST_DEFINED
EXTERN_C const GUID SID_BindHost;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0024_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0024_v0_0_s_ifspec;
#ifndef __IBindHost_INTERFACE_DEFINED__
#define __IBindHost_INTERFACE_DEFINED__
/* interface IBindHost */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IBindHost *LPBINDHOST;
EXTERN_C const IID IID_IBindHost;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("fc4801a1-2ba9-11cf-a229-00aa003d7352")
IBindHost : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE CreateMoniker(
/* [annotation][in] */
_In_ LPOLESTR szName,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][out] */
_Out_ IMoniker **ppmk,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE MonikerBindToStorage(
/* [annotation][in] */
_In_ IMoniker *pMk,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][out] */
_Out_ void **ppvObj) = 0;
virtual /* [local] */ HRESULT STDMETHODCALLTYPE MonikerBindToObject(
/* [annotation][in] */
_In_ IMoniker *pMk,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][out] */
_Out_ void **ppvObj) = 0;
};
#else /* C style interface */
typedef struct IBindHostVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBindHost * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBindHost * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBindHost * This);
DECLSPEC_XFGVIRT(IBindHost, CreateMoniker)
HRESULT ( STDMETHODCALLTYPE *CreateMoniker )(
__RPC__in IBindHost * This,
/* [annotation][in] */
_In_ LPOLESTR szName,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][out] */
_Out_ IMoniker **ppmk,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IBindHost, MonikerBindToStorage)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *MonikerBindToStorage )(
IBindHost * This,
/* [annotation][in] */
_In_ IMoniker *pMk,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][out] */
_Out_ void **ppvObj);
DECLSPEC_XFGVIRT(IBindHost, MonikerBindToObject)
/* [local] */ HRESULT ( STDMETHODCALLTYPE *MonikerBindToObject )(
IBindHost * This,
/* [annotation][in] */
_In_ IMoniker *pMk,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][out] */
_Out_ void **ppvObj);
END_INTERFACE
} IBindHostVtbl;
interface IBindHost
{
CONST_VTBL struct IBindHostVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBindHost_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBindHost_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBindHost_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBindHost_CreateMoniker(This,szName,pBC,ppmk,dwReserved) \
( (This)->lpVtbl -> CreateMoniker(This,szName,pBC,ppmk,dwReserved) )
#define IBindHost_MonikerBindToStorage(This,pMk,pBC,pBSC,riid,ppvObj) \
( (This)->lpVtbl -> MonikerBindToStorage(This,pMk,pBC,pBSC,riid,ppvObj) )
#define IBindHost_MonikerBindToObject(This,pMk,pBC,pBSC,riid,ppvObj) \
( (This)->lpVtbl -> MonikerBindToObject(This,pMk,pBC,pBSC,riid,ppvObj) )
#endif /* COBJMACROS */
#endif /* C style interface */
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindHost_RemoteMonikerBindToStorage_Proxy(
__RPC__in IBindHost * This,
/* [annotation][unique][in] */
_In_ IMoniker *pMk,
/* [annotation][unique][in] */
_In_ IBindCtx *pBC,
/* [annotation][unique][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ IUnknown **ppvObj);
void __RPC_STUB IBindHost_RemoteMonikerBindToStorage_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindHost_RemoteMonikerBindToObject_Proxy(
__RPC__in IBindHost * This,
/* [annotation][unique][in] */
_In_ IMoniker *pMk,
/* [annotation][unique][in] */
_In_ IBindCtx *pBC,
/* [annotation][unique][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ IUnknown **ppvObj);
void __RPC_STUB IBindHost_RemoteMonikerBindToObject_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
#endif /* __IBindHost_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0025 */
/* [local] */
#endif
// These are for backwards compatibility with previous URLMON versions
// Flags for the UrlDownloadToCacheFile
#define URLOSTRM_USECACHEDCOPY_ONLY 0x1 // Only get from cache
#define URLOSTRM_USECACHEDCOPY 0x2 // Get from cache if available else download
#define URLOSTRM_GETNEWESTVERSION 0x3 // Get new version only. But put it in cache too
struct IBindStatusCallback;
STDAPI HlinkSimpleNavigateToString(
_In_opt_ LPCWSTR szTarget, // required - target document - null if local jump w/in doc
_In_opt_ LPCWSTR szLocation, // optional, for navigation into middle of a doc
_In_opt_ LPCWSTR szTargetFrameName,// optional, for targeting frame-sets
_In_ IUnknown *pUnk, // required - we'll search this for other necessary interfaces
_In_opt_ IBindCtx *pbc, // optional. caller may register an IBSC in this
_In_opt_ IBindStatusCallback *,
/* [in] */ DWORD grfHLNF, // flags
/* [in] */ DWORD dwReserved // for future use, must be NULL
);
STDAPI HlinkSimpleNavigateToMoniker(
_In_opt_ IMoniker *pmkTarget, // required - target document - (may be null
_In_opt_ LPCWSTR szLocation, // optional, for navigation into middle of a doc
_In_opt_ LPCWSTR szTargetFrameName,// optional, for targeting frame-sets
_In_opt_ IUnknown *pUnk, // required - we'll search this for other necessary interfaces
_In_opt_ IBindCtx *pbc, // optional. caller may register an IBSC in this
_In_opt_ IBindStatusCallback *,
/* [in] */ DWORD grfHLNF, // flags
/* [in] */ DWORD dwReserved // for future use, must be NULL
);
STDAPI URLOpenStreamA(_In_opt_ LPUNKNOWN, _In_ LPCSTR,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLOpenStreamW(_In_opt_ LPUNKNOWN, _In_ LPCWSTR,DWORD,_In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLOpenPullStreamA(_In_opt_ LPUNKNOWN, _In_ LPCSTR,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLOpenPullStreamW(_In_opt_ LPUNKNOWN,_In_ LPCWSTR,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLDownloadToFileA(_In_opt_ LPUNKNOWN, _In_ LPCSTR, _In_opt_ LPCSTR,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLDownloadToFileW(_In_opt_ LPUNKNOWN, _In_ LPCWSTR,_In_opt_ LPCWSTR,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLDownloadToCacheFileA(_In_opt_ LPUNKNOWN, _In_ LPCSTR, _Out_writes_(cchFileName) LPSTR, DWORD cchFileName, DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLDownloadToCacheFileW(_In_opt_ LPUNKNOWN, _In_ LPCWSTR, _Out_writes_(cchFileName) LPWSTR, DWORD cchFileName, DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLOpenBlockingStreamA(_In_opt_ LPUNKNOWN, _In_ LPCSTR, _Outptr_ LPSTREAM*,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
STDAPI URLOpenBlockingStreamW(_In_opt_ LPUNKNOWN, _In_ LPCWSTR, _Outptr_ LPSTREAM*,DWORD, _In_opt_ LPBINDSTATUSCALLBACK);
#ifdef UNICODE
#define URLOpenStream URLOpenStreamW
#define URLOpenPullStream URLOpenPullStreamW
#define URLDownloadToFile URLDownloadToFileW
#define URLDownloadToCacheFile URLDownloadToCacheFileW
#define URLOpenBlockingStream URLOpenBlockingStreamW
#else
#define URLOpenStream URLOpenStreamA
#define URLOpenPullStream URLOpenPullStreamA
#define URLDownloadToFile URLDownloadToFileA
#define URLDownloadToCacheFile URLDownloadToCacheFileA
#define URLOpenBlockingStream URLOpenBlockingStreamA
#endif // !UNICODE
STDAPI HlinkGoBack(_In_ IUnknown *pUnk);
STDAPI HlinkGoForward(_In_ IUnknown *pUnk);
STDAPI HlinkNavigateString(_In_opt_ IUnknown *pUnk, _In_opt_ LPCWSTR szTarget);
STDAPI HlinkNavigateMoniker(_In_opt_ IUnknown *pUnk, _In_opt_ IMoniker *pmkTarget);
#ifndef _URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS_
#ifndef _LPIINTERNET
#define _LPIINTERNET
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0025_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0025_v0_0_s_ifspec;
#ifndef __IInternet_INTERFACE_DEFINED__
#define __IInternet_INTERFACE_DEFINED__
/* interface IInternet */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternet *LPIINTERNET;
EXTERN_C const IID IID_IInternet;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e0-baf9-11ce-8c82-00aa004ba90b")
IInternet : public IUnknown
{
public:
};
#else /* C style interface */
typedef struct IInternetVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternet * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternet * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternet * This);
END_INTERFACE
} IInternetVtbl;
interface IInternet
{
CONST_VTBL struct IInternetVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternet_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternet_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternet_Release(This) \
( (This)->lpVtbl -> Release(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternet_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0026 */
/* [local] */
#endif
#ifndef _LPIINTERNETBINDINFO
#define _LPIINTERNETBINDINFO
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0026_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0026_v0_0_s_ifspec;
#ifndef __IInternetBindInfo_INTERFACE_DEFINED__
#define __IInternetBindInfo_INTERFACE_DEFINED__
/* interface IInternetBindInfo */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetBindInfo *LPIINTERNETBINDINFO;
typedef
enum tagBINDSTRING
{
BINDSTRING_HEADERS = 1,
BINDSTRING_ACCEPT_MIMES = ( BINDSTRING_HEADERS + 1 ) ,
BINDSTRING_EXTRA_URL = ( BINDSTRING_ACCEPT_MIMES + 1 ) ,
BINDSTRING_LANGUAGE = ( BINDSTRING_EXTRA_URL + 1 ) ,
BINDSTRING_USERNAME = ( BINDSTRING_LANGUAGE + 1 ) ,
BINDSTRING_PASSWORD = ( BINDSTRING_USERNAME + 1 ) ,
BINDSTRING_UA_PIXELS = ( BINDSTRING_PASSWORD + 1 ) ,
BINDSTRING_UA_COLOR = ( BINDSTRING_UA_PIXELS + 1 ) ,
BINDSTRING_OS = ( BINDSTRING_UA_COLOR + 1 ) ,
BINDSTRING_USER_AGENT = ( BINDSTRING_OS + 1 ) ,
BINDSTRING_ACCEPT_ENCODINGS = ( BINDSTRING_USER_AGENT + 1 ) ,
BINDSTRING_POST_COOKIE = ( BINDSTRING_ACCEPT_ENCODINGS + 1 ) ,
BINDSTRING_POST_DATA_MIME = ( BINDSTRING_POST_COOKIE + 1 ) ,
BINDSTRING_URL = ( BINDSTRING_POST_DATA_MIME + 1 ) ,
BINDSTRING_IID = ( BINDSTRING_URL + 1 ) ,
BINDSTRING_FLAG_BIND_TO_OBJECT = ( BINDSTRING_IID + 1 ) ,
BINDSTRING_PTR_BIND_CONTEXT = ( BINDSTRING_FLAG_BIND_TO_OBJECT + 1 ) ,
BINDSTRING_XDR_ORIGIN = ( BINDSTRING_PTR_BIND_CONTEXT + 1 ) ,
BINDSTRING_DOWNLOADPATH = ( BINDSTRING_XDR_ORIGIN + 1 ) ,
BINDSTRING_ROOTDOC_URL = ( BINDSTRING_DOWNLOADPATH + 1 ) ,
BINDSTRING_INITIAL_FILENAME = ( BINDSTRING_ROOTDOC_URL + 1 ) ,
BINDSTRING_PROXY_USERNAME = ( BINDSTRING_INITIAL_FILENAME + 1 ) ,
BINDSTRING_PROXY_PASSWORD = ( BINDSTRING_PROXY_USERNAME + 1 ) ,
BINDSTRING_ENTERPRISE_ID = ( BINDSTRING_PROXY_PASSWORD + 1 ) ,
BINDSTRING_DOC_URL = ( BINDSTRING_ENTERPRISE_ID + 1 ) ,
BINDSTRING_SAMESITE_COOKIE_LEVEL = ( BINDSTRING_DOC_URL + 1 )
} BINDSTRING;
EXTERN_C const IID IID_IInternetBindInfo;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e1-baf9-11ce-8c82-00aa004ba90b")
IInternetBindInfo : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetBindInfo(
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo) = 0;
virtual HRESULT STDMETHODCALLTYPE GetBindString(
/* [annotation][in] */
_In_ ULONG ulStringType,
/* [annotation][out][in] */
__RPC__out LPOLESTR *ppwzStr,
/* [annotation][in] */
_In_ ULONG cEl,
/* [annotation][out][in] */
_Inout_ ULONG *pcElFetched) = 0;
};
#else /* C style interface */
typedef struct IInternetBindInfoVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetBindInfo * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetBindInfo * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetBindInfo * This);
DECLSPEC_XFGVIRT(IInternetBindInfo, GetBindInfo)
HRESULT ( STDMETHODCALLTYPE *GetBindInfo )(
IInternetBindInfo * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo);
DECLSPEC_XFGVIRT(IInternetBindInfo, GetBindString)
HRESULT ( STDMETHODCALLTYPE *GetBindString )(
IInternetBindInfo * This,
/* [annotation][in] */
_In_ ULONG ulStringType,
/* [annotation][out][in] */
__RPC__out LPOLESTR *ppwzStr,
/* [annotation][in] */
_In_ ULONG cEl,
/* [annotation][out][in] */
_Inout_ ULONG *pcElFetched);
END_INTERFACE
} IInternetBindInfoVtbl;
interface IInternetBindInfo
{
CONST_VTBL struct IInternetBindInfoVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetBindInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetBindInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetBindInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetBindInfo_GetBindInfo(This,grfBINDF,pbindinfo) \
( (This)->lpVtbl -> GetBindInfo(This,grfBINDF,pbindinfo) )
#define IInternetBindInfo_GetBindString(This,ulStringType,ppwzStr,cEl,pcElFetched) \
( (This)->lpVtbl -> GetBindString(This,ulStringType,ppwzStr,cEl,pcElFetched) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetBindInfo_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0027 */
/* [local] */
#endif
#ifndef _LPIINTERNETBINDINFOEX
#define _LPIINTERNETBINDINFOEX
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0027_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0027_v0_0_s_ifspec;
#ifndef __IInternetBindInfoEx_INTERFACE_DEFINED__
#define __IInternetBindInfoEx_INTERFACE_DEFINED__
/* interface IInternetBindInfoEx */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetBindInfoEx *LPIINTERNETBINDINFOEX;
EXTERN_C const IID IID_IInternetBindInfoEx;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a3e015b7-a82c-4dcd-a150-569aeeed36ab")
IInternetBindInfoEx : public IInternetBindInfo
{
public:
virtual HRESULT STDMETHODCALLTYPE GetBindInfoEx(
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetBindInfoExVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetBindInfoEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetBindInfoEx * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetBindInfoEx * This);
DECLSPEC_XFGVIRT(IInternetBindInfo, GetBindInfo)
HRESULT ( STDMETHODCALLTYPE *GetBindInfo )(
IInternetBindInfoEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo);
DECLSPEC_XFGVIRT(IInternetBindInfo, GetBindString)
HRESULT ( STDMETHODCALLTYPE *GetBindString )(
IInternetBindInfoEx * This,
/* [annotation][in] */
_In_ ULONG ulStringType,
/* [annotation][out][in] */
__RPC__out LPOLESTR *ppwzStr,
/* [annotation][in] */
_In_ ULONG cEl,
/* [annotation][out][in] */
_Inout_ ULONG *pcElFetched);
DECLSPEC_XFGVIRT(IInternetBindInfoEx, GetBindInfoEx)
HRESULT ( STDMETHODCALLTYPE *GetBindInfoEx )(
IInternetBindInfoEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved);
END_INTERFACE
} IInternetBindInfoExVtbl;
interface IInternetBindInfoEx
{
CONST_VTBL struct IInternetBindInfoExVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetBindInfoEx_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetBindInfoEx_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetBindInfoEx_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetBindInfoEx_GetBindInfo(This,grfBINDF,pbindinfo) \
( (This)->lpVtbl -> GetBindInfo(This,grfBINDF,pbindinfo) )
#define IInternetBindInfoEx_GetBindString(This,ulStringType,ppwzStr,cEl,pcElFetched) \
( (This)->lpVtbl -> GetBindString(This,ulStringType,ppwzStr,cEl,pcElFetched) )
#define IInternetBindInfoEx_GetBindInfoEx(This,grfBINDF,pbindinfo,grfBINDF2,pdwReserved) \
( (This)->lpVtbl -> GetBindInfoEx(This,grfBINDF,pbindinfo,grfBINDF2,pdwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetBindInfoEx_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0028 */
/* [local] */
#endif
#ifndef _LPIINTERNETPROTOCOLROOT_DEFINED
#define _LPIINTERNETPROTOCOLROOT_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0028_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0028_v0_0_s_ifspec;
#ifndef __IInternetProtocolRoot_INTERFACE_DEFINED__
#define __IInternetProtocolRoot_INTERFACE_DEFINED__
/* interface IInternetProtocolRoot */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetProtocolRoot *LPIINTERNETPROTOCOLROOT;
typedef
enum _tagPI_FLAGS
{
PI_PARSE_URL = 0x1,
PI_FILTER_MODE = 0x2,
PI_FORCE_ASYNC = 0x4,
PI_USE_WORKERTHREAD = 0x8,
PI_MIMEVERIFICATION = 0x10,
PI_CLSIDLOOKUP = 0x20,
PI_DATAPROGRESS = 0x40,
PI_SYNCHRONOUS = 0x80,
PI_APARTMENTTHREADED = 0x100,
PI_CLASSINSTALL = 0x200,
PI_PASSONBINDCTX = 0x2000,
PI_NOMIMEHANDLER = 0x8000,
PI_LOADAPPDIRECT = 0x4000,
PD_FORCE_SWITCH = 0x10000,
PI_PREFERDEFAULTHANDLER = 0x20000
} PI_FLAGS;
typedef struct _tagPROTOCOLDATA
{
DWORD grfFlags;
DWORD dwState;
LPVOID pData;
ULONG cbData;
} PROTOCOLDATA;
typedef struct _tagStartParam
{
IID iid;
IBindCtx *pIBindCtx;
IUnknown *pItf;
} StartParam;
EXTERN_C const IID IID_IInternetProtocolRoot;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e3-baf9-11ce-8c82-00aa004ba90b")
IInternetProtocolRoot : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Start(
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink,
/* [annotation][in] */
_In_ IInternetBindInfo *pOIBindInfo,
/* [annotation][in] */
_In_ DWORD grfPI,
/* [annotation][in] */
_In_ HANDLE_PTR dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE Continue(
/* [annotation][in] */
_In_ PROTOCOLDATA *pProtocolData) = 0;
virtual HRESULT STDMETHODCALLTYPE Abort(
/* [annotation][in] */
_In_ HRESULT hrReason,
/* [annotation][in] */
_In_ DWORD dwOptions) = 0;
virtual HRESULT STDMETHODCALLTYPE Terminate(
/* [annotation][in] */
_In_ DWORD dwOptions) = 0;
virtual HRESULT STDMETHODCALLTYPE Suspend( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0;
};
#else /* C style interface */
typedef struct IInternetProtocolRootVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetProtocolRoot * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetProtocolRoot * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetProtocolRoot * This);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Start)
HRESULT ( STDMETHODCALLTYPE *Start )(
IInternetProtocolRoot * This,
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink,
/* [annotation][in] */
_In_ IInternetBindInfo *pOIBindInfo,
/* [annotation][in] */
_In_ DWORD grfPI,
/* [annotation][in] */
_In_ HANDLE_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
IInternetProtocolRoot * This,
/* [annotation][in] */
_In_ PROTOCOLDATA *pProtocolData);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Abort)
HRESULT ( STDMETHODCALLTYPE *Abort )(
IInternetProtocolRoot * This,
/* [annotation][in] */
_In_ HRESULT hrReason,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
IInternetProtocolRoot * This,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Suspend)
HRESULT ( STDMETHODCALLTYPE *Suspend )(
IInternetProtocolRoot * This);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Resume)
HRESULT ( STDMETHODCALLTYPE *Resume )(
IInternetProtocolRoot * This);
END_INTERFACE
} IInternetProtocolRootVtbl;
interface IInternetProtocolRoot
{
CONST_VTBL struct IInternetProtocolRootVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetProtocolRoot_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetProtocolRoot_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetProtocolRoot_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetProtocolRoot_Start(This,szUrl,pOIProtSink,pOIBindInfo,grfPI,dwReserved) \
( (This)->lpVtbl -> Start(This,szUrl,pOIProtSink,pOIBindInfo,grfPI,dwReserved) )
#define IInternetProtocolRoot_Continue(This,pProtocolData) \
( (This)->lpVtbl -> Continue(This,pProtocolData) )
#define IInternetProtocolRoot_Abort(This,hrReason,dwOptions) \
( (This)->lpVtbl -> Abort(This,hrReason,dwOptions) )
#define IInternetProtocolRoot_Terminate(This,dwOptions) \
( (This)->lpVtbl -> Terminate(This,dwOptions) )
#define IInternetProtocolRoot_Suspend(This) \
( (This)->lpVtbl -> Suspend(This) )
#define IInternetProtocolRoot_Resume(This) \
( (This)->lpVtbl -> Resume(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetProtocolRoot_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0029 */
/* [local] */
#endif
#ifndef _LPIINTERNETPROTOCOL_DEFINED
#define _LPIINTERNETPROTOCOL_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0029_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0029_v0_0_s_ifspec;
#ifndef __IInternetProtocol_INTERFACE_DEFINED__
#define __IInternetProtocol_INTERFACE_DEFINED__
/* interface IInternetProtocol */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetProtocol *LPIINTERNETPROTOCOL;
EXTERN_C const IID IID_IInternetProtocol;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e4-baf9-11ce-8c82-00aa004ba90b")
IInternetProtocol : public IInternetProtocolRoot
{
public:
virtual HRESULT STDMETHODCALLTYPE Read(
/* [annotation][length_is][size_is][out][in] */
_Inout_updates_to_(cb,*pcbRead) void *pv,
/* [annotation][in] */
_In_ ULONG cb,
/* [annotation][out] */
_Out_ ULONG *pcbRead) = 0;
virtual HRESULT STDMETHODCALLTYPE Seek(
/* [annotation][in] */
_In_ LARGE_INTEGER dlibMove,
/* [annotation][in] */
_In_ DWORD dwOrigin,
/* [annotation][out] */
_Out_ ULARGE_INTEGER *plibNewPosition) = 0;
virtual HRESULT STDMETHODCALLTYPE LockRequest(
/* [annotation][in] */
_In_ DWORD dwOptions) = 0;
virtual HRESULT STDMETHODCALLTYPE UnlockRequest( void) = 0;
};
#else /* C style interface */
typedef struct IInternetProtocolVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetProtocol * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetProtocol * This);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Start)
HRESULT ( STDMETHODCALLTYPE *Start )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink,
/* [annotation][in] */
_In_ IInternetBindInfo *pOIBindInfo,
/* [annotation][in] */
_In_ DWORD grfPI,
/* [annotation][in] */
_In_ HANDLE_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ PROTOCOLDATA *pProtocolData);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Abort)
HRESULT ( STDMETHODCALLTYPE *Abort )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ HRESULT hrReason,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Suspend)
HRESULT ( STDMETHODCALLTYPE *Suspend )(
IInternetProtocol * This);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Resume)
HRESULT ( STDMETHODCALLTYPE *Resume )(
IInternetProtocol * This);
DECLSPEC_XFGVIRT(IInternetProtocol, Read)
HRESULT ( STDMETHODCALLTYPE *Read )(
IInternetProtocol * This,
/* [annotation][length_is][size_is][out][in] */
_Inout_updates_to_(cb,*pcbRead) void *pv,
/* [annotation][in] */
_In_ ULONG cb,
/* [annotation][out] */
_Out_ ULONG *pcbRead);
DECLSPEC_XFGVIRT(IInternetProtocol, Seek)
HRESULT ( STDMETHODCALLTYPE *Seek )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ LARGE_INTEGER dlibMove,
/* [annotation][in] */
_In_ DWORD dwOrigin,
/* [annotation][out] */
_Out_ ULARGE_INTEGER *plibNewPosition);
DECLSPEC_XFGVIRT(IInternetProtocol, LockRequest)
HRESULT ( STDMETHODCALLTYPE *LockRequest )(
IInternetProtocol * This,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocol, UnlockRequest)
HRESULT ( STDMETHODCALLTYPE *UnlockRequest )(
IInternetProtocol * This);
END_INTERFACE
} IInternetProtocolVtbl;
interface IInternetProtocol
{
CONST_VTBL struct IInternetProtocolVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetProtocol_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetProtocol_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetProtocol_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetProtocol_Start(This,szUrl,pOIProtSink,pOIBindInfo,grfPI,dwReserved) \
( (This)->lpVtbl -> Start(This,szUrl,pOIProtSink,pOIBindInfo,grfPI,dwReserved) )
#define IInternetProtocol_Continue(This,pProtocolData) \
( (This)->lpVtbl -> Continue(This,pProtocolData) )
#define IInternetProtocol_Abort(This,hrReason,dwOptions) \
( (This)->lpVtbl -> Abort(This,hrReason,dwOptions) )
#define IInternetProtocol_Terminate(This,dwOptions) \
( (This)->lpVtbl -> Terminate(This,dwOptions) )
#define IInternetProtocol_Suspend(This) \
( (This)->lpVtbl -> Suspend(This) )
#define IInternetProtocol_Resume(This) \
( (This)->lpVtbl -> Resume(This) )
#define IInternetProtocol_Read(This,pv,cb,pcbRead) \
( (This)->lpVtbl -> Read(This,pv,cb,pcbRead) )
#define IInternetProtocol_Seek(This,dlibMove,dwOrigin,plibNewPosition) \
( (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) )
#define IInternetProtocol_LockRequest(This,dwOptions) \
( (This)->lpVtbl -> LockRequest(This,dwOptions) )
#define IInternetProtocol_UnlockRequest(This) \
( (This)->lpVtbl -> UnlockRequest(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetProtocol_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0030 */
/* [local] */
#endif
#if (_WIN32_IE >= _WIN32_IE_IE70)
#ifndef _LPIINTERNETPROTOCOLEX_DEFINED
#define _LPIINTERNETPROTOCOLEX_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0030_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0030_v0_0_s_ifspec;
#ifndef __IInternetProtocolEx_INTERFACE_DEFINED__
#define __IInternetProtocolEx_INTERFACE_DEFINED__
/* interface IInternetProtocolEx */
/* [unique][uuid][object][local] */
EXTERN_C const IID IID_IInternetProtocolEx;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("C7A98E66-1010-492c-A1C8-C809E1F75905")
IInternetProtocolEx : public IInternetProtocol
{
public:
virtual HRESULT STDMETHODCALLTYPE StartEx(
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink,
/* [annotation][in] */
_In_ IInternetBindInfo *pOIBindInfo,
/* [annotation][in] */
_In_ DWORD grfPI,
/* [annotation][in] */
_In_ HANDLE_PTR dwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetProtocolExVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetProtocolEx * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetProtocolEx * This);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Start)
HRESULT ( STDMETHODCALLTYPE *Start )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink,
/* [annotation][in] */
_In_ IInternetBindInfo *pOIBindInfo,
/* [annotation][in] */
_In_ DWORD grfPI,
/* [annotation][in] */
_In_ HANDLE_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ PROTOCOLDATA *pProtocolData);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Abort)
HRESULT ( STDMETHODCALLTYPE *Abort )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ HRESULT hrReason,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Suspend)
HRESULT ( STDMETHODCALLTYPE *Suspend )(
IInternetProtocolEx * This);
DECLSPEC_XFGVIRT(IInternetProtocolRoot, Resume)
HRESULT ( STDMETHODCALLTYPE *Resume )(
IInternetProtocolEx * This);
DECLSPEC_XFGVIRT(IInternetProtocol, Read)
HRESULT ( STDMETHODCALLTYPE *Read )(
IInternetProtocolEx * This,
/* [annotation][length_is][size_is][out][in] */
_Inout_updates_to_(cb,*pcbRead) void *pv,
/* [annotation][in] */
_In_ ULONG cb,
/* [annotation][out] */
_Out_ ULONG *pcbRead);
DECLSPEC_XFGVIRT(IInternetProtocol, Seek)
HRESULT ( STDMETHODCALLTYPE *Seek )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ LARGE_INTEGER dlibMove,
/* [annotation][in] */
_In_ DWORD dwOrigin,
/* [annotation][out] */
_Out_ ULARGE_INTEGER *plibNewPosition);
DECLSPEC_XFGVIRT(IInternetProtocol, LockRequest)
HRESULT ( STDMETHODCALLTYPE *LockRequest )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ DWORD dwOptions);
DECLSPEC_XFGVIRT(IInternetProtocol, UnlockRequest)
HRESULT ( STDMETHODCALLTYPE *UnlockRequest )(
IInternetProtocolEx * This);
DECLSPEC_XFGVIRT(IInternetProtocolEx, StartEx)
HRESULT ( STDMETHODCALLTYPE *StartEx )(
IInternetProtocolEx * This,
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink,
/* [annotation][in] */
_In_ IInternetBindInfo *pOIBindInfo,
/* [annotation][in] */
_In_ DWORD grfPI,
/* [annotation][in] */
_In_ HANDLE_PTR dwReserved);
END_INTERFACE
} IInternetProtocolExVtbl;
interface IInternetProtocolEx
{
CONST_VTBL struct IInternetProtocolExVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetProtocolEx_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetProtocolEx_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetProtocolEx_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetProtocolEx_Start(This,szUrl,pOIProtSink,pOIBindInfo,grfPI,dwReserved) \
( (This)->lpVtbl -> Start(This,szUrl,pOIProtSink,pOIBindInfo,grfPI,dwReserved) )
#define IInternetProtocolEx_Continue(This,pProtocolData) \
( (This)->lpVtbl -> Continue(This,pProtocolData) )
#define IInternetProtocolEx_Abort(This,hrReason,dwOptions) \
( (This)->lpVtbl -> Abort(This,hrReason,dwOptions) )
#define IInternetProtocolEx_Terminate(This,dwOptions) \
( (This)->lpVtbl -> Terminate(This,dwOptions) )
#define IInternetProtocolEx_Suspend(This) \
( (This)->lpVtbl -> Suspend(This) )
#define IInternetProtocolEx_Resume(This) \
( (This)->lpVtbl -> Resume(This) )
#define IInternetProtocolEx_Read(This,pv,cb,pcbRead) \
( (This)->lpVtbl -> Read(This,pv,cb,pcbRead) )
#define IInternetProtocolEx_Seek(This,dlibMove,dwOrigin,plibNewPosition) \
( (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) )
#define IInternetProtocolEx_LockRequest(This,dwOptions) \
( (This)->lpVtbl -> LockRequest(This,dwOptions) )
#define IInternetProtocolEx_UnlockRequest(This) \
( (This)->lpVtbl -> UnlockRequest(This) )
#define IInternetProtocolEx_StartEx(This,pUri,pOIProtSink,pOIBindInfo,grfPI,dwReserved) \
( (This)->lpVtbl -> StartEx(This,pUri,pOIProtSink,pOIBindInfo,grfPI,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetProtocolEx_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0031 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#ifndef _LPIINTERNETPROTOCOLSINK_DEFINED
#define _LPIINTERNETPROTOCOLSINK_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0031_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0031_v0_0_s_ifspec;
#ifndef __IInternetProtocolSink_INTERFACE_DEFINED__
#define __IInternetProtocolSink_INTERFACE_DEFINED__
/* interface IInternetProtocolSink */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetProtocolSink *LPIINTERNETPROTOCOLSINK;
EXTERN_C const IID IID_IInternetProtocolSink;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e5-baf9-11ce-8c82-00aa004ba90b")
IInternetProtocolSink : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Switch(
/* [annotation][in] */
_In_ PROTOCOLDATA *pProtocolData) = 0;
virtual HRESULT STDMETHODCALLTYPE ReportProgress(
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][in] */
_In_ LPCWSTR szStatusText) = 0;
virtual HRESULT STDMETHODCALLTYPE ReportData(
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ ULONG ulProgress,
/* [annotation][in] */
_In_ ULONG ulProgressMax) = 0;
virtual HRESULT STDMETHODCALLTYPE ReportResult(
/* [annotation][in] */
_In_ HRESULT hrResult,
/* [annotation][in] */
_In_ DWORD dwError,
/* [annotation][in] */
_In_ LPCWSTR szResult) = 0;
};
#else /* C style interface */
typedef struct IInternetProtocolSinkVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetProtocolSink * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetProtocolSink * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetProtocolSink * This);
DECLSPEC_XFGVIRT(IInternetProtocolSink, Switch)
HRESULT ( STDMETHODCALLTYPE *Switch )(
IInternetProtocolSink * This,
/* [annotation][in] */
_In_ PROTOCOLDATA *pProtocolData);
DECLSPEC_XFGVIRT(IInternetProtocolSink, ReportProgress)
HRESULT ( STDMETHODCALLTYPE *ReportProgress )(
IInternetProtocolSink * This,
/* [annotation][in] */
_In_ ULONG ulStatusCode,
/* [annotation][in] */
_In_ LPCWSTR szStatusText);
DECLSPEC_XFGVIRT(IInternetProtocolSink, ReportData)
HRESULT ( STDMETHODCALLTYPE *ReportData )(
IInternetProtocolSink * This,
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ ULONG ulProgress,
/* [annotation][in] */
_In_ ULONG ulProgressMax);
DECLSPEC_XFGVIRT(IInternetProtocolSink, ReportResult)
HRESULT ( STDMETHODCALLTYPE *ReportResult )(
IInternetProtocolSink * This,
/* [annotation][in] */
_In_ HRESULT hrResult,
/* [annotation][in] */
_In_ DWORD dwError,
/* [annotation][in] */
_In_ LPCWSTR szResult);
END_INTERFACE
} IInternetProtocolSinkVtbl;
interface IInternetProtocolSink
{
CONST_VTBL struct IInternetProtocolSinkVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetProtocolSink_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetProtocolSink_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetProtocolSink_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetProtocolSink_Switch(This,pProtocolData) \
( (This)->lpVtbl -> Switch(This,pProtocolData) )
#define IInternetProtocolSink_ReportProgress(This,ulStatusCode,szStatusText) \
( (This)->lpVtbl -> ReportProgress(This,ulStatusCode,szStatusText) )
#define IInternetProtocolSink_ReportData(This,grfBSCF,ulProgress,ulProgressMax) \
( (This)->lpVtbl -> ReportData(This,grfBSCF,ulProgress,ulProgressMax) )
#define IInternetProtocolSink_ReportResult(This,hrResult,dwError,szResult) \
( (This)->lpVtbl -> ReportResult(This,hrResult,dwError,szResult) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetProtocolSink_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0032 */
/* [local] */
#endif
#ifndef _LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED
#define _LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0032_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0032_v0_0_s_ifspec;
#ifndef __IInternetProtocolSinkStackable_INTERFACE_DEFINED__
#define __IInternetProtocolSinkStackable_INTERFACE_DEFINED__
/* interface IInternetProtocolSinkStackable */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetProtocolSinkStackable *LPIINTERNETPROTOCOLSINKStackable;
EXTERN_C const IID IID_IInternetProtocolSinkStackable;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9f0-baf9-11ce-8c82-00aa004ba90b")
IInternetProtocolSinkStackable : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SwitchSink(
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink) = 0;
virtual HRESULT STDMETHODCALLTYPE CommitSwitch( void) = 0;
virtual HRESULT STDMETHODCALLTYPE RollbackSwitch( void) = 0;
};
#else /* C style interface */
typedef struct IInternetProtocolSinkStackableVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetProtocolSinkStackable * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetProtocolSinkStackable * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetProtocolSinkStackable * This);
DECLSPEC_XFGVIRT(IInternetProtocolSinkStackable, SwitchSink)
HRESULT ( STDMETHODCALLTYPE *SwitchSink )(
IInternetProtocolSinkStackable * This,
/* [annotation][in] */
_In_ IInternetProtocolSink *pOIProtSink);
DECLSPEC_XFGVIRT(IInternetProtocolSinkStackable, CommitSwitch)
HRESULT ( STDMETHODCALLTYPE *CommitSwitch )(
IInternetProtocolSinkStackable * This);
DECLSPEC_XFGVIRT(IInternetProtocolSinkStackable, RollbackSwitch)
HRESULT ( STDMETHODCALLTYPE *RollbackSwitch )(
IInternetProtocolSinkStackable * This);
END_INTERFACE
} IInternetProtocolSinkStackableVtbl;
interface IInternetProtocolSinkStackable
{
CONST_VTBL struct IInternetProtocolSinkStackableVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetProtocolSinkStackable_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetProtocolSinkStackable_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetProtocolSinkStackable_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetProtocolSinkStackable_SwitchSink(This,pOIProtSink) \
( (This)->lpVtbl -> SwitchSink(This,pOIProtSink) )
#define IInternetProtocolSinkStackable_CommitSwitch(This) \
( (This)->lpVtbl -> CommitSwitch(This) )
#define IInternetProtocolSinkStackable_RollbackSwitch(This) \
( (This)->lpVtbl -> RollbackSwitch(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetProtocolSinkStackable_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0033 */
/* [local] */
#endif
#ifndef _LPIINTERNETSESSION_DEFINED
#define _LPIINTERNETSESSION_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0033_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0033_v0_0_s_ifspec;
#ifndef __IInternetSession_INTERFACE_DEFINED__
#define __IInternetSession_INTERFACE_DEFINED__
/* interface IInternetSession */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetSession *LPIINTERNETSESSION;
typedef
enum _tagOIBDG_FLAGS
{
OIBDG_APARTMENTTHREADED = 0x100,
OIBDG_DATAONLY = 0x1000
} OIBDG_FLAGS;
EXTERN_C const IID IID_IInternetSession;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e7-baf9-11ce-8c82-00aa004ba90b")
IInternetSession : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE RegisterNameSpace(
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ REFCLSID rclsid,
/* [annotation][in] */
_In_ LPCWSTR pwzProtocol,
/* [annotation][in] */
_In_ ULONG cPatterns,
/* [annotation][in] */
_In_ const LPCWSTR *ppwzPatterns,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE UnregisterNameSpace(
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ LPCWSTR pszProtocol) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterMimeFilter(
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ REFCLSID rclsid,
/* [annotation][in] */
_In_ LPCWSTR pwzType) = 0;
virtual HRESULT STDMETHODCALLTYPE UnregisterMimeFilter(
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ LPCWSTR pwzType) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateBinding(
/* [annotation][in] */
_In_ LPBC pBC,
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IUnknown *pUnkOuter,
/* [annotation][unique][out] */
_Out_ IUnknown **ppUnk,
/* [annotation][unique][out] */
_Out_ IInternetProtocol **ppOInetProt,
/* [annotation][in] */
_In_ DWORD dwOption) = 0;
virtual HRESULT STDMETHODCALLTYPE SetSessionOption(
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][in] */
_In_ LPVOID pBuffer,
/* [annotation][in] */
_In_ DWORD dwBufferLength,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSessionOption(
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][out][in] */
_Inout_ LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pdwBufferLength,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetSessionVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetSession * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetSession * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetSession * This);
DECLSPEC_XFGVIRT(IInternetSession, RegisterNameSpace)
HRESULT ( STDMETHODCALLTYPE *RegisterNameSpace )(
IInternetSession * This,
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ REFCLSID rclsid,
/* [annotation][in] */
_In_ LPCWSTR pwzProtocol,
/* [annotation][in] */
_In_ ULONG cPatterns,
/* [annotation][in] */
_In_ const LPCWSTR *ppwzPatterns,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSession, UnregisterNameSpace)
HRESULT ( STDMETHODCALLTYPE *UnregisterNameSpace )(
IInternetSession * This,
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ LPCWSTR pszProtocol);
DECLSPEC_XFGVIRT(IInternetSession, RegisterMimeFilter)
HRESULT ( STDMETHODCALLTYPE *RegisterMimeFilter )(
IInternetSession * This,
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ REFCLSID rclsid,
/* [annotation][in] */
_In_ LPCWSTR pwzType);
DECLSPEC_XFGVIRT(IInternetSession, UnregisterMimeFilter)
HRESULT ( STDMETHODCALLTYPE *UnregisterMimeFilter )(
IInternetSession * This,
/* [annotation][in] */
_In_ IClassFactory *pCF,
/* [annotation][in] */
_In_ LPCWSTR pwzType);
DECLSPEC_XFGVIRT(IInternetSession, CreateBinding)
HRESULT ( STDMETHODCALLTYPE *CreateBinding )(
IInternetSession * This,
/* [annotation][in] */
_In_ LPBC pBC,
/* [annotation][in] */
_In_ LPCWSTR szUrl,
/* [annotation][in] */
_In_ IUnknown *pUnkOuter,
/* [annotation][unique][out] */
_Out_ IUnknown **ppUnk,
/* [annotation][unique][out] */
_Out_ IInternetProtocol **ppOInetProt,
/* [annotation][in] */
_In_ DWORD dwOption);
DECLSPEC_XFGVIRT(IInternetSession, SetSessionOption)
HRESULT ( STDMETHODCALLTYPE *SetSessionOption )(
IInternetSession * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][in] */
_In_ LPVOID pBuffer,
/* [annotation][in] */
_In_ DWORD dwBufferLength,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSession, GetSessionOption)
HRESULT ( STDMETHODCALLTYPE *GetSessionOption )(
IInternetSession * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][out][in] */
_Inout_ LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pdwBufferLength,
/* [annotation][in] */
_In_ DWORD dwReserved);
END_INTERFACE
} IInternetSessionVtbl;
interface IInternetSession
{
CONST_VTBL struct IInternetSessionVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetSession_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetSession_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetSession_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetSession_RegisterNameSpace(This,pCF,rclsid,pwzProtocol,cPatterns,ppwzPatterns,dwReserved) \
( (This)->lpVtbl -> RegisterNameSpace(This,pCF,rclsid,pwzProtocol,cPatterns,ppwzPatterns,dwReserved) )
#define IInternetSession_UnregisterNameSpace(This,pCF,pszProtocol) \
( (This)->lpVtbl -> UnregisterNameSpace(This,pCF,pszProtocol) )
#define IInternetSession_RegisterMimeFilter(This,pCF,rclsid,pwzType) \
( (This)->lpVtbl -> RegisterMimeFilter(This,pCF,rclsid,pwzType) )
#define IInternetSession_UnregisterMimeFilter(This,pCF,pwzType) \
( (This)->lpVtbl -> UnregisterMimeFilter(This,pCF,pwzType) )
#define IInternetSession_CreateBinding(This,pBC,szUrl,pUnkOuter,ppUnk,ppOInetProt,dwOption) \
( (This)->lpVtbl -> CreateBinding(This,pBC,szUrl,pUnkOuter,ppUnk,ppOInetProt,dwOption) )
#define IInternetSession_SetSessionOption(This,dwOption,pBuffer,dwBufferLength,dwReserved) \
( (This)->lpVtbl -> SetSessionOption(This,dwOption,pBuffer,dwBufferLength,dwReserved) )
#define IInternetSession_GetSessionOption(This,dwOption,pBuffer,pdwBufferLength,dwReserved) \
( (This)->lpVtbl -> GetSessionOption(This,dwOption,pBuffer,pdwBufferLength,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetSession_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0034 */
/* [local] */
#endif
#ifndef _LPIINTERNETTHREADSWITCH_DEFINED
#define _LPIINTERNETTHREADSWITCH_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0034_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0034_v0_0_s_ifspec;
#ifndef __IInternetThreadSwitch_INTERFACE_DEFINED__
#define __IInternetThreadSwitch_INTERFACE_DEFINED__
/* interface IInternetThreadSwitch */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetThreadSwitch *LPIINTERNETTHREADSWITCH;
EXTERN_C const IID IID_IInternetThreadSwitch;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9e8-baf9-11ce-8c82-00aa004ba90b")
IInternetThreadSwitch : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Prepare( void) = 0;
virtual HRESULT STDMETHODCALLTYPE Continue( void) = 0;
};
#else /* C style interface */
typedef struct IInternetThreadSwitchVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetThreadSwitch * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetThreadSwitch * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetThreadSwitch * This);
DECLSPEC_XFGVIRT(IInternetThreadSwitch, Prepare)
HRESULT ( STDMETHODCALLTYPE *Prepare )(
IInternetThreadSwitch * This);
DECLSPEC_XFGVIRT(IInternetThreadSwitch, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
IInternetThreadSwitch * This);
END_INTERFACE
} IInternetThreadSwitchVtbl;
interface IInternetThreadSwitch
{
CONST_VTBL struct IInternetThreadSwitchVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetThreadSwitch_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetThreadSwitch_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetThreadSwitch_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetThreadSwitch_Prepare(This) \
( (This)->lpVtbl -> Prepare(This) )
#define IInternetThreadSwitch_Continue(This) \
( (This)->lpVtbl -> Continue(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetThreadSwitch_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0035 */
/* [local] */
#endif
#ifndef _LPIINTERNETPRIORITY_DEFINED
#define _LPIINTERNETPRIORITY_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0035_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0035_v0_0_s_ifspec;
#ifndef __IInternetPriority_INTERFACE_DEFINED__
#define __IInternetPriority_INTERFACE_DEFINED__
/* interface IInternetPriority */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetPriority *LPIINTERNETPRIORITY;
EXTERN_C const IID IID_IInternetPriority;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9eb-baf9-11ce-8c82-00aa004ba90b")
IInternetPriority : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetPriority(
/* [annotation][in] */
_In_ LONG nPriority) = 0;
virtual HRESULT STDMETHODCALLTYPE GetPriority(
/* [annotation][out] */
_Out_ LONG *pnPriority) = 0;
};
#else /* C style interface */
typedef struct IInternetPriorityVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetPriority * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetPriority * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetPriority * This);
DECLSPEC_XFGVIRT(IInternetPriority, SetPriority)
HRESULT ( STDMETHODCALLTYPE *SetPriority )(
IInternetPriority * This,
/* [annotation][in] */
_In_ LONG nPriority);
DECLSPEC_XFGVIRT(IInternetPriority, GetPriority)
HRESULT ( STDMETHODCALLTYPE *GetPriority )(
IInternetPriority * This,
/* [annotation][out] */
_Out_ LONG *pnPriority);
END_INTERFACE
} IInternetPriorityVtbl;
interface IInternetPriority
{
CONST_VTBL struct IInternetPriorityVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetPriority_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetPriority_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetPriority_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetPriority_SetPriority(This,nPriority) \
( (This)->lpVtbl -> SetPriority(This,nPriority) )
#define IInternetPriority_GetPriority(This,pnPriority) \
( (This)->lpVtbl -> GetPriority(This,pnPriority) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetPriority_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0036 */
/* [local] */
#endif
#ifndef _LPIINTERNETPROTOCOLINFO_DEFINED
#define _LPIINTERNETPROTOCOLINFO_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0036_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0036_v0_0_s_ifspec;
#ifndef __IInternetProtocolInfo_INTERFACE_DEFINED__
#define __IInternetProtocolInfo_INTERFACE_DEFINED__
/* interface IInternetProtocolInfo */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IInternetProtocolInfo *LPIINTERNETPROTOCOLINFO;
typedef
enum _tagPARSEACTION
{
PARSE_CANONICALIZE = 1,
PARSE_FRIENDLY = ( PARSE_CANONICALIZE + 1 ) ,
PARSE_SECURITY_URL = ( PARSE_FRIENDLY + 1 ) ,
PARSE_ROOTDOCUMENT = ( PARSE_SECURITY_URL + 1 ) ,
PARSE_DOCUMENT = ( PARSE_ROOTDOCUMENT + 1 ) ,
PARSE_ANCHOR = ( PARSE_DOCUMENT + 1 ) ,
PARSE_ENCODE_IS_UNESCAPE = ( PARSE_ANCHOR + 1 ) ,
PARSE_DECODE_IS_ESCAPE = ( PARSE_ENCODE_IS_UNESCAPE + 1 ) ,
PARSE_PATH_FROM_URL = ( PARSE_DECODE_IS_ESCAPE + 1 ) ,
PARSE_URL_FROM_PATH = ( PARSE_PATH_FROM_URL + 1 ) ,
PARSE_MIME = ( PARSE_URL_FROM_PATH + 1 ) ,
PARSE_SERVER = ( PARSE_MIME + 1 ) ,
PARSE_SCHEMA = ( PARSE_SERVER + 1 ) ,
PARSE_SITE = ( PARSE_SCHEMA + 1 ) ,
PARSE_DOMAIN = ( PARSE_SITE + 1 ) ,
PARSE_LOCATION = ( PARSE_DOMAIN + 1 ) ,
PARSE_SECURITY_DOMAIN = ( PARSE_LOCATION + 1 ) ,
PARSE_ESCAPE = ( PARSE_SECURITY_DOMAIN + 1 ) ,
PARSE_UNESCAPE = ( PARSE_ESCAPE + 1 )
} PARSEACTION;
typedef
enum _tagPSUACTION
{
PSU_DEFAULT = 1,
PSU_SECURITY_URL_ONLY = ( PSU_DEFAULT + 1 )
} PSUACTION;
typedef
enum _tagQUERYOPTION
{
QUERY_EXPIRATION_DATE = 1,
QUERY_TIME_OF_LAST_CHANGE = ( QUERY_EXPIRATION_DATE + 1 ) ,
QUERY_CONTENT_ENCODING = ( QUERY_TIME_OF_LAST_CHANGE + 1 ) ,
QUERY_CONTENT_TYPE = ( QUERY_CONTENT_ENCODING + 1 ) ,
QUERY_REFRESH = ( QUERY_CONTENT_TYPE + 1 ) ,
QUERY_RECOMBINE = ( QUERY_REFRESH + 1 ) ,
QUERY_CAN_NAVIGATE = ( QUERY_RECOMBINE + 1 ) ,
QUERY_USES_NETWORK = ( QUERY_CAN_NAVIGATE + 1 ) ,
QUERY_IS_CACHED = ( QUERY_USES_NETWORK + 1 ) ,
QUERY_IS_INSTALLEDENTRY = ( QUERY_IS_CACHED + 1 ) ,
QUERY_IS_CACHED_OR_MAPPED = ( QUERY_IS_INSTALLEDENTRY + 1 ) ,
QUERY_USES_CACHE = ( QUERY_IS_CACHED_OR_MAPPED + 1 ) ,
QUERY_IS_SECURE = ( QUERY_USES_CACHE + 1 ) ,
QUERY_IS_SAFE = ( QUERY_IS_SECURE + 1 ) ,
QUERY_USES_HISTORYFOLDER = ( QUERY_IS_SAFE + 1 ) ,
QUERY_IS_CACHED_AND_USABLE_OFFLINE = ( QUERY_USES_HISTORYFOLDER + 1 )
} QUERYOPTION;
EXTERN_C const IID IID_IInternetProtocolInfo;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9ec-baf9-11ce-8c82-00aa004ba90b")
IInternetProtocolInfo : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE ParseUrl(
/* [annotation][in] */
_In_ LPCWSTR pwzUrl,
/* [annotation][in] */
_In_ PARSEACTION ParseAction,
/* [annotation][in] */
_In_ DWORD dwParseFlags,
/* [annotation][out] */
__RPC__out LPWSTR pwzResult,
/* [annotation][in] */
_In_ DWORD cchResult,
/* [annotation][out] */
_Out_ DWORD *pcchResult,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE CombineUrl(
/* [annotation][in] */
_In_ LPCWSTR pwzBaseUrl,
/* [annotation][in] */
_In_ LPCWSTR pwzRelativeUrl,
/* [annotation][in] */
_In_ DWORD dwCombineFlags,
/* [annotation][out] */
__RPC__in LPWSTR pwzResult,
/* [annotation][in] */
_In_ DWORD cchResult,
/* [annotation][out] */
_Out_ DWORD *pcchResult,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE CompareUrl(
/* [annotation][in] */
_In_ LPCWSTR pwzUrl1,
/* [annotation][in] */
_In_ LPCWSTR pwzUrl2,
/* [annotation][in] */
_In_ DWORD dwCompareFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryInfo(
/* [annotation][in] */
_In_ LPCWSTR pwzUrl,
/* [annotation][in] */
_In_ QUERYOPTION OueryOption,
/* [annotation][in] */
_In_ DWORD dwQueryFlags,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][in] */
_In_ DWORD cbBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetProtocolInfoVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetProtocolInfo * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetProtocolInfo * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetProtocolInfo * This);
DECLSPEC_XFGVIRT(IInternetProtocolInfo, ParseUrl)
HRESULT ( STDMETHODCALLTYPE *ParseUrl )(
IInternetProtocolInfo * This,
/* [annotation][in] */
_In_ LPCWSTR pwzUrl,
/* [annotation][in] */
_In_ PARSEACTION ParseAction,
/* [annotation][in] */
_In_ DWORD dwParseFlags,
/* [annotation][out] */
__RPC__out LPWSTR pwzResult,
/* [annotation][in] */
_In_ DWORD cchResult,
/* [annotation][out] */
_Out_ DWORD *pcchResult,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetProtocolInfo, CombineUrl)
HRESULT ( STDMETHODCALLTYPE *CombineUrl )(
IInternetProtocolInfo * This,
/* [annotation][in] */
_In_ LPCWSTR pwzBaseUrl,
/* [annotation][in] */
_In_ LPCWSTR pwzRelativeUrl,
/* [annotation][in] */
_In_ DWORD dwCombineFlags,
/* [annotation][out] */
__RPC__in LPWSTR pwzResult,
/* [annotation][in] */
_In_ DWORD cchResult,
/* [annotation][out] */
_Out_ DWORD *pcchResult,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetProtocolInfo, CompareUrl)
HRESULT ( STDMETHODCALLTYPE *CompareUrl )(
IInternetProtocolInfo * This,
/* [annotation][in] */
_In_ LPCWSTR pwzUrl1,
/* [annotation][in] */
_In_ LPCWSTR pwzUrl2,
/* [annotation][in] */
_In_ DWORD dwCompareFlags);
DECLSPEC_XFGVIRT(IInternetProtocolInfo, QueryInfo)
HRESULT ( STDMETHODCALLTYPE *QueryInfo )(
IInternetProtocolInfo * This,
/* [annotation][in] */
_In_ LPCWSTR pwzUrl,
/* [annotation][in] */
_In_ QUERYOPTION OueryOption,
/* [annotation][in] */
_In_ DWORD dwQueryFlags,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][in] */
_In_ DWORD cbBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][in] */
_In_ DWORD dwReserved);
END_INTERFACE
} IInternetProtocolInfoVtbl;
interface IInternetProtocolInfo
{
CONST_VTBL struct IInternetProtocolInfoVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetProtocolInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetProtocolInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetProtocolInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetProtocolInfo_ParseUrl(This,pwzUrl,ParseAction,dwParseFlags,pwzResult,cchResult,pcchResult,dwReserved) \
( (This)->lpVtbl -> ParseUrl(This,pwzUrl,ParseAction,dwParseFlags,pwzResult,cchResult,pcchResult,dwReserved) )
#define IInternetProtocolInfo_CombineUrl(This,pwzBaseUrl,pwzRelativeUrl,dwCombineFlags,pwzResult,cchResult,pcchResult,dwReserved) \
( (This)->lpVtbl -> CombineUrl(This,pwzBaseUrl,pwzRelativeUrl,dwCombineFlags,pwzResult,cchResult,pcchResult,dwReserved) )
#define IInternetProtocolInfo_CompareUrl(This,pwzUrl1,pwzUrl2,dwCompareFlags) \
( (This)->lpVtbl -> CompareUrl(This,pwzUrl1,pwzUrl2,dwCompareFlags) )
#define IInternetProtocolInfo_QueryInfo(This,pwzUrl,OueryOption,dwQueryFlags,pBuffer,cbBuffer,pcbBuf,dwReserved) \
( (This)->lpVtbl -> QueryInfo(This,pwzUrl,OueryOption,dwQueryFlags,pBuffer,cbBuffer,pcbBuf,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetProtocolInfo_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0037 */
/* [local] */
#ifndef URLMON_STRICT
// PARSE_ENCODE was misnamed and is deprecated for PARSE_UNESCAPE
#define PARSE_ENCODE PARSE_ENCODE_IS_UNESCAPE
// PARSE_DECODE was misnamed and is deprecated for PARSE_ESCAPE
#define PARSE_DECODE PARSE_DECODE_IS_ESCAPE
#endif //!URLMON_STRICT
#endif
#define IOInet IInternet
#define IOInetBindInfo IInternetBindInfo
#define IOInetBindInfoEx IInternetBindInfoEx
#define IOInetProtocolRoot IInternetProtocolRoot
#define IOInetProtocol IInternetProtocol
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define IOInetProtocolEx IInternetProtocolEx
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define IOInetProtocolSink IInternetProtocolSink
#define IOInetProtocolInfo IInternetProtocolInfo
#define IOInetSession IInternetSession
#define IOInetPriority IInternetPriority
#define IOInetThreadSwitch IInternetThreadSwitch
#define IOInetProtocolSinkStackable IInternetProtocolSinkStackable
#define LPOINET LPIINTERNET
#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO
#define LPOINETBINDINFO LPIINTERNETBINDINFO
#define LPOINETPROTOCOLROOT LPIINTERNETPROTOCOLROOT
#define LPOINETPROTOCOL LPIINTERNETPROTOCOL
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define LPOINETPROTOCOLEX LPIINTERNETPROTOCOLEX
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define LPOINETPROTOCOLSINK LPIINTERNETPROTOCOLSINK
#define LPOINETSESSION LPIINTERNETSESSION
#define LPOINETTHREADSWITCH LPIINTERNETTHREADSWITCH
#define LPOINETPRIORITY LPIINTERNETPRIORITY
#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO
#define LPOINETPROTOCOLSINKSTACKABLE LPIINTERNETPROTOCOLSINKSTACKABLE
#define IID_IOInet IID_IInternet
#define IID_IOInetBindInfo IID_IInternetBindInfo
#define IID_IOInetBindInfoEx IID_IInternetBindInfoEx
#define IID_IOInetProtocolRoot IID_IInternetProtocolRoot
#define IID_IOInetProtocol IID_IInternetProtocol
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define IID_IOInetProtocolEx IID_IInternetProtocolEx
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define IID_IOInetProtocolSink IID_IInternetProtocolSink
#define IID_IOInetProtocolInfo IID_IInternetProtocolInfo
#define IID_IOInetSession IID_IInternetSession
#define IID_IOInetPriority IID_IInternetPriority
#define IID_IOInetThreadSwitch IID_IInternetThreadSwitch
#define IID_IOInetProtocolSinkStackable IID_IInternetProtocolSinkStackable
STDAPI CoInternetParseUrl(
LPCWSTR pwzUrl,
PARSEACTION ParseAction,
DWORD dwFlags,
_Out_writes_to_(cchResult,*pcchResult+1) LPWSTR pszResult,
DWORD cchResult,
_Out_ DWORD *pcchResult,
DWORD dwReserved
);
#if (_WIN32_IE >= _WIN32_IE_IE70)
STDAPI CoInternetParseIUri(
_In_ IUri *pIUri,
PARSEACTION ParseAction,
DWORD dwFlags,
_Out_writes_to_(cchResult,*pcchResult+1) LPWSTR pwzResult,
DWORD cchResult,
_Out_ DWORD *pcchResult,
_Reserved_ DWORD_PTR dwReserved
);
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
STDAPI CoInternetCombineUrl(
LPCWSTR pwzBaseUrl,
LPCWSTR pwzRelativeUrl,
DWORD dwCombineFlags,
_Out_writes_to_(cchResult,*pcchResult+1) LPWSTR pszResult,
DWORD cchResult,
_Out_opt_ DWORD *pcchResult,
_Reserved_ DWORD dwReserved
);
#if (_WIN32_IE >= _WIN32_IE_IE70)
STDAPI CoInternetCombineUrlEx(
_In_opt_ IUri *pBaseUri,
_In_opt_ LPCWSTR pwzRelativeUrl,
DWORD dwCombineFlags,
_Outptr_ IUri **ppCombinedUri,
_In_opt_ DWORD_PTR dwReserved
);
STDAPI CoInternetCombineIUri (
_In_ IUri *pBaseUri,
_In_ IUri *pRelativeUri,
DWORD dwCombineFlags,
_Outptr_ IUri **ppCombinedUri,
_In_opt_ DWORD_PTR dwReserved
);
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
STDAPI CoInternetCompareUrl(
LPCWSTR pwzUrl1,
LPCWSTR pwzUrl2,
DWORD dwFlags
);
STDAPI CoInternetGetProtocolFlags(
LPCWSTR pwzUrl,
_Out_ DWORD *pdwFlags,
DWORD dwReserved
);
STDAPI CoInternetQueryInfo(
LPCWSTR pwzUrl,
QUERYOPTION QueryOptions,
DWORD dwQueryFlags,
_Out_writes_bytes_to_(cbBuffer, *pcbBuffer) LPVOID pvBuffer,
_In_range_(>=, sizeof(DWORD)) DWORD cbBuffer,
_Out_opt_ DWORD *pcbBuffer,
DWORD dwReserved
);
STDAPI CoInternetGetSession(
DWORD dwSessionMode,
_Outptr_ IInternetSession **ppIInternetSession,
DWORD dwReserved
);
STDAPI CoInternetGetSecurityUrl(
LPCWSTR pwszUrl,
_Outptr_ LPWSTR *ppwszSecUrl,
_In_ PSUACTION psuAction,
_Reserved_ DWORD dwReserved
);
STDAPI AsyncInstallDistributionUnit(
_In_ LPCWSTR szDistUnit,
_In_opt_ LPCWSTR szTYPE,
_In_opt_ LPCWSTR szExt,
DWORD dwFileVersionMS,
DWORD dwFileVersionLS,
_In_opt_ LPCWSTR szURL,
_In_ IBindCtx *pbc,
_Reserved_ LPVOID pvReserved,
DWORD flags
);
#if (_WIN32_IE >= _WIN32_IE_IE70)
STDAPI CoInternetGetSecurityUrlEx(
_In_ IUri *pUri,
_Outptr_ IUri **ppSecUri,
PSUACTION psuAction,
_Reserved_ DWORD_PTR dwReserved
);
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#ifndef _INTERNETFEATURELIST_DEFINED
#define _INTERNETFEATURELIST_DEFINED
typedef
enum _tagINTERNETFEATURELIST
{
FEATURE_OBJECT_CACHING = 0,
FEATURE_ZONE_ELEVATION = ( FEATURE_OBJECT_CACHING + 1 ) ,
FEATURE_MIME_HANDLING = ( FEATURE_ZONE_ELEVATION + 1 ) ,
FEATURE_MIME_SNIFFING = ( FEATURE_MIME_HANDLING + 1 ) ,
FEATURE_WINDOW_RESTRICTIONS = ( FEATURE_MIME_SNIFFING + 1 ) ,
FEATURE_WEBOC_POPUPMANAGEMENT = ( FEATURE_WINDOW_RESTRICTIONS + 1 ) ,
FEATURE_BEHAVIORS = ( FEATURE_WEBOC_POPUPMANAGEMENT + 1 ) ,
FEATURE_DISABLE_MK_PROTOCOL = ( FEATURE_BEHAVIORS + 1 ) ,
FEATURE_LOCALMACHINE_LOCKDOWN = ( FEATURE_DISABLE_MK_PROTOCOL + 1 ) ,
FEATURE_SECURITYBAND = ( FEATURE_LOCALMACHINE_LOCKDOWN + 1 ) ,
FEATURE_RESTRICT_ACTIVEXINSTALL = ( FEATURE_SECURITYBAND + 1 ) ,
FEATURE_VALIDATE_NAVIGATE_URL = ( FEATURE_RESTRICT_ACTIVEXINSTALL + 1 ) ,
FEATURE_RESTRICT_FILEDOWNLOAD = ( FEATURE_VALIDATE_NAVIGATE_URL + 1 ) ,
FEATURE_ADDON_MANAGEMENT = ( FEATURE_RESTRICT_FILEDOWNLOAD + 1 ) ,
FEATURE_PROTOCOL_LOCKDOWN = ( FEATURE_ADDON_MANAGEMENT + 1 ) ,
FEATURE_HTTP_USERNAME_PASSWORD_DISABLE = ( FEATURE_PROTOCOL_LOCKDOWN + 1 ) ,
FEATURE_SAFE_BINDTOOBJECT = ( FEATURE_HTTP_USERNAME_PASSWORD_DISABLE + 1 ) ,
FEATURE_UNC_SAVEDFILECHECK = ( FEATURE_SAFE_BINDTOOBJECT + 1 ) ,
FEATURE_GET_URL_DOM_FILEPATH_UNENCODED = ( FEATURE_UNC_SAVEDFILECHECK + 1 ) ,
FEATURE_TABBED_BROWSING = ( FEATURE_GET_URL_DOM_FILEPATH_UNENCODED + 1 ) ,
FEATURE_SSLUX = ( FEATURE_TABBED_BROWSING + 1 ) ,
FEATURE_DISABLE_NAVIGATION_SOUNDS = ( FEATURE_SSLUX + 1 ) ,
FEATURE_DISABLE_LEGACY_COMPRESSION = ( FEATURE_DISABLE_NAVIGATION_SOUNDS + 1 ) ,
FEATURE_FORCE_ADDR_AND_STATUS = ( FEATURE_DISABLE_LEGACY_COMPRESSION + 1 ) ,
FEATURE_XMLHTTP = ( FEATURE_FORCE_ADDR_AND_STATUS + 1 ) ,
FEATURE_DISABLE_TELNET_PROTOCOL = ( FEATURE_XMLHTTP + 1 ) ,
FEATURE_FEEDS = ( FEATURE_DISABLE_TELNET_PROTOCOL + 1 ) ,
FEATURE_BLOCK_INPUT_PROMPTS = ( FEATURE_FEEDS + 1 ) ,
FEATURE_ENTRY_COUNT = ( FEATURE_BLOCK_INPUT_PROMPTS + 1 )
} INTERNETFEATURELIST;
// CoInternetSetFeatureEnabled can be used to set/reset features.
// The following flags control where the feature is set
#define SET_FEATURE_ON_THREAD 0x00000001
#define SET_FEATURE_ON_PROCESS 0x00000002
#define SET_FEATURE_IN_REGISTRY 0x00000004
#define SET_FEATURE_ON_THREAD_LOCALMACHINE 0x00000008
#define SET_FEATURE_ON_THREAD_INTRANET 0x00000010
#define SET_FEATURE_ON_THREAD_TRUSTED 0x00000020
#define SET_FEATURE_ON_THREAD_INTERNET 0x00000040
#define SET_FEATURE_ON_THREAD_RESTRICTED 0x00000080
// CoInternetIsFeatureEnabled can be used to get features.
// The following flags control where the feature is obtained from
// default is from process
#define GET_FEATURE_FROM_THREAD 0x00000001
#define GET_FEATURE_FROM_PROCESS 0x00000002
#define GET_FEATURE_FROM_REGISTRY 0x00000004
#define GET_FEATURE_FROM_THREAD_LOCALMACHINE 0x00000008
#define GET_FEATURE_FROM_THREAD_INTRANET 0x00000010
#define GET_FEATURE_FROM_THREAD_TRUSTED 0x00000020
#define GET_FEATURE_FROM_THREAD_INTERNET 0x00000040
#define GET_FEATURE_FROM_THREAD_RESTRICTED 0x00000080
#endif
STDAPI CoInternetSetFeatureEnabled(
INTERNETFEATURELIST FeatureEntry,
DWORD dwFlags,
BOOL fEnable
);
STDAPI CoInternetIsFeatureEnabled(
INTERNETFEATURELIST FeatureEntry,
DWORD dwFlags
);
STDAPI CoInternetIsFeatureEnabledForUrl(
INTERNETFEATURELIST FeatureEntry,
DWORD dwFlags,
_In_opt_ LPCWSTR szURL,
_In_opt_ IInternetSecurityManager *pSecMgr
);
STDAPI CoInternetIsFeatureEnabledForIUri(
INTERNETFEATURELIST FeatureEntry,
DWORD dwFlags,
_In_opt_ IUri * pIUri,
_In_opt_ IInternetSecurityManagerEx2 *pSecMgr
);
STDAPI CoInternetIsFeatureZoneElevationEnabled(
_In_opt_ LPCWSTR szFromURL,
_In_ LPCWSTR szToURL,
_In_opt_ IInternetSecurityManager *pSecMgr,
DWORD dwFlags
);
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
STDAPI CopyStgMedium(_In_ const STGMEDIUM * pcstgmedSrc,
_Out_ STGMEDIUM * pstgmedDest);
STDAPI CopyBindInfo(_In_ const BINDINFO * pcbiSrc,
_Out_ BINDINFO * pbiDest );
STDAPI_(void) ReleaseBindInfo( _Inout_ BINDINFO * pbindinfo );
#define INET_E_USE_DEFAULT_PROTOCOLHANDLER _HRESULT_TYPEDEF_(0x800C0011L)
#define INET_E_USE_DEFAULT_SETTING _HRESULT_TYPEDEF_(0x800C0012L)
#define INET_E_DEFAULT_ACTION INET_E_USE_DEFAULT_PROTOCOLHANDLER
#define INET_E_QUERYOPTION_UNKNOWN _HRESULT_TYPEDEF_(0x800C0013L)
#define INET_E_REDIRECTING _HRESULT_TYPEDEF_(0x800C0014L)
#define OInetParseUrl CoInternetParseUrl
#define OInetCombineUrl CoInternetCombineUrl
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define OInetCombineUrlEx CoInternetCombineUrlEx
#define OInetCombineIUri CoInternetCombineIUri
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define OInetCompareUrl CoInternetCompareUrl
#define OInetQueryInfo CoInternetQueryInfo
#define OInetGetSession CoInternetGetSession
#endif // !_URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS_
//
// Static Protocol flags
//
#define PROTOCOLFLAG_NO_PICS_CHECK 0x00000001
// Do not take a dependency on the exact value of the private namespace, no guarantee is given that it won't change.
STDAPI_(PWSTR) IEGetUserPrivateNamespaceName(void);
// Creates the security manager object. The first argument is the Service provider
// to allow for delegation
STDAPI CoInternetCreateSecurityManager(_In_opt_ IServiceProvider *pSP, _Outptr_ IInternetSecurityManager **ppSM, DWORD dwReserved);
STDAPI CoInternetCreateZoneManager(_In_opt_ IServiceProvider *pSP, _Outptr_ IInternetZoneManager **ppZM, DWORD dwReserved);
// Security manager CLSID's
EXTERN_C const IID CLSID_InternetSecurityManager;
EXTERN_C const IID CLSID_InternetZoneManager;
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
EXTERN_C const IID CLSID_PersistentZoneIdentifier;
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
// This service is used for delegation support on the Security Manager interface
#define SID_SInternetSecurityManager IID_IInternetSecurityManager
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define SID_SInternetSecurityManagerEx IID_IInternetSecurityManagerEx
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_IE70)
#define SID_SInternetSecurityManagerEx2 IID_IInternetSecurityManagerEx2
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define SID_SInternetHostSecurityManager IID_IInternetHostSecurityManager
#ifndef _LPINTERNETSECURITYMGRSITE_DEFINED
#define _LPINTERNETSECURITYMGRSITE_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0037_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0037_v0_0_s_ifspec;
#ifndef __IInternetSecurityMgrSite_INTERFACE_DEFINED__
#define __IInternetSecurityMgrSite_INTERFACE_DEFINED__
/* interface IInternetSecurityMgrSite */
/* [unique][helpstring][uuid][object][local] */
EXTERN_C const IID IID_IInternetSecurityMgrSite;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9ed-baf9-11ce-8c82-00aa004ba90b")
IInternetSecurityMgrSite : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetWindow(
/* [annotation][out] */
_Out_ HWND *phwnd) = 0;
virtual HRESULT STDMETHODCALLTYPE EnableModeless(
/* [annotation][in] */
_In_ BOOL fEnable) = 0;
};
#else /* C style interface */
typedef struct IInternetSecurityMgrSiteVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetSecurityMgrSite * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetSecurityMgrSite * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetSecurityMgrSite * This);
DECLSPEC_XFGVIRT(IInternetSecurityMgrSite, GetWindow)
HRESULT ( STDMETHODCALLTYPE *GetWindow )(
IInternetSecurityMgrSite * This,
/* [annotation][out] */
_Out_ HWND *phwnd);
DECLSPEC_XFGVIRT(IInternetSecurityMgrSite, EnableModeless)
HRESULT ( STDMETHODCALLTYPE *EnableModeless )(
IInternetSecurityMgrSite * This,
/* [annotation][in] */
_In_ BOOL fEnable);
END_INTERFACE
} IInternetSecurityMgrSiteVtbl;
interface IInternetSecurityMgrSite
{
CONST_VTBL struct IInternetSecurityMgrSiteVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetSecurityMgrSite_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetSecurityMgrSite_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetSecurityMgrSite_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetSecurityMgrSite_GetWindow(This,phwnd) \
( (This)->lpVtbl -> GetWindow(This,phwnd) )
#define IInternetSecurityMgrSite_EnableModeless(This,fEnable) \
( (This)->lpVtbl -> EnableModeless(This,fEnable) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetSecurityMgrSite_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0038 */
/* [local] */
#endif
#ifndef _LPINTERNETSECURITYMANANGER_DEFINED
#define _LPINTERNETSECURITYMANANGER_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0038_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0038_v0_0_s_ifspec;
#ifndef __IInternetSecurityManager_INTERFACE_DEFINED__
#define __IInternetSecurityManager_INTERFACE_DEFINED__
/* interface IInternetSecurityManager */
/* [object][unique][helpstring][uuid] */
#define MUTZ_NOSAVEDFILECHECK 0x00000001 // don't check file: for saved file comment
#define MUTZ_ISFILE 0x00000002 // Assume URL if File, url does not need file://
#define MUTZ_ACCEPT_WILDCARD_SCHEME 0x00000080 // Accept a wildcard scheme
#define MUTZ_ENFORCERESTRICTED 0x00000100 // enforce restricted zone independent of URL
#define MUTZ_RESERVED 0x00000200 // This is same as PUAF_NOSAVEDFILECHECK. However we already have MUTZ_NOSAVEDFILECHECK for this.
#define MUTZ_REQUIRESAVEDFILECHECK 0x00000400 // always check the file for MOTW (overriding FEATURE_UNC_SAVEDFILECHECK)
#define MUTZ_DONT_UNESCAPE 0x00000800 // Do not unescape the url
#define MUTZ_DONT_USE_CACHE 0x00001000 // Do not check the cache
#define MUTZ_FORCE_INTRANET_FLAGS 0x00002000 // Force the intranet flags to be active
#define MUTZ_IGNORE_ZONE_MAPPINGS 0x00004000 // Don't look up the Zone Mappings
// MapUrlToZone returns the zone index given a URL
#define MAX_SIZE_SECURITY_ID 512 // bytes
typedef /* [public] */
enum __MIDL_IInternetSecurityManager_0001
{
PUAF_DEFAULT = 0,
PUAF_NOUI = 0x1,
PUAF_ISFILE = 0x2,
PUAF_WARN_IF_DENIED = 0x4,
PUAF_FORCEUI_FOREGROUND = 0x8,
PUAF_CHECK_TIFS = 0x10,
PUAF_DONTCHECKBOXINDIALOG = 0x20,
PUAF_TRUSTED = 0x40,
PUAF_ACCEPT_WILDCARD_SCHEME = 0x80,
PUAF_ENFORCERESTRICTED = 0x100,
PUAF_NOSAVEDFILECHECK = 0x200,
PUAF_REQUIRESAVEDFILECHECK = 0x400,
PUAF_DONT_USE_CACHE = 0x1000,
PUAF_RESERVED1 = 0x2000,
PUAF_RESERVED2 = 0x4000,
PUAF_LMZ_UNLOCKED = 0x10000,
PUAF_LMZ_LOCKED = 0x20000,
PUAF_DEFAULTZONEPOL = 0x40000,
PUAF_NPL_USE_LOCKED_IF_RESTRICTED = 0x80000,
PUAF_NOUIIFLOCKED = 0x100000,
PUAF_DRAGPROTOCOLCHECK = 0x200000
} PUAF;
typedef /* [public] */
enum __MIDL_IInternetSecurityManager_0002
{
PUAFOUT_DEFAULT = 0,
PUAFOUT_ISLOCKZONEPOLICY = 0x1
} PUAFOUT;
// Note that for the below function, the semantics of the 'pwszUrl',
// 'pContext', and 'cbContext' parameters depend on the specific
// URLACTION_* enum value that is passed for 'dwAction'. For example,
// when 'dwAction' is URLACTION_HTML_MIXED_CONTENT, 'pwszUrl' will be
// the target URL of the resource, 'pContext' will be the containing
// document's IUri* cast to BYTE*, and 'cbContext' will be sizeof(Uri*).
// When 'dwAction' is URLACTION_CROSS_DOMAIN_DATA, 'pwszUrl' will be
// the source URL, 'pContext' will be the target PCWSTR cast to BYTE*,
// and 'cbContext' will be the size of the string including its null
// terminator. Implementers should use the value of 'dwAction' to
// correctly interpret the 'pswzUrl', 'pContext' and 'cbContext' for
// each action type.
// This is the wrapper function that most clients will use.
// It figures out the current Policy for the passed in Action,
// and puts up UI if the current Policy indicates that the user
// should be queried. It returns back the Policy which the caller
// will use to determine if the action should be allowed
// This is the wrapper function to conveniently read a custom policy.
typedef /* [public] */
enum __MIDL_IInternetSecurityManager_0003
{
SZM_CREATE = 0,
SZM_DELETE = 0x1
} SZM_FLAGS;
// SetZoneMapping
// lpszPattern: string denoting a URL pattern
// Examples of valid patterns:
// *://*.msn.com
// http://*.sony.co.jp
// *://et.msn.com
// ftp://157.54.23.41/
// https://localsvr
// file:\localsvr\share
// *://157.54.100-200.*
// Examples of invalid patterns:
// http://*.lcs.mit.edu
// ftp://*
// dwFlags: SZM_FLAGS values
EXTERN_C const IID IID_IInternetSecurityManager;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9ee-baf9-11ce-8c82-00aa004ba90b")
IInternetSecurityManager : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE SetSecuritySite(
/* [annotation][unique][in] */
_In_ IInternetSecurityMgrSite *pSite) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSecuritySite(
/* [annotation][out] */
_Out_ IInternetSecurityMgrSite **ppSite) = 0;
virtual HRESULT STDMETHODCALLTYPE MapUrlToZone(
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][out] */
_Out_ DWORD *pdwZone,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSecurityId(
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][size_is][out] */
_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID)) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE ProcessUrlAction(
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][unique][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryCustomPolicy(
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE SetZoneMapping(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ LPCWSTR lpszPattern,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetZoneMappings(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][out] */
_Out_ IEnumString **ppenumString,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
};
#else /* C style interface */
typedef struct IInternetSecurityManagerVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IInternetSecurityManager * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IInternetSecurityManager * This);
DECLSPEC_XFGVIRT(IInternetSecurityManager, SetSecuritySite)
HRESULT ( STDMETHODCALLTYPE *SetSecuritySite )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][unique][in] */
_In_ IInternetSecurityMgrSite *pSite);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetSecuritySite)
HRESULT ( STDMETHODCALLTYPE *GetSecuritySite )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][out] */
_Out_ IInternetSecurityMgrSite **ppSite);
DECLSPEC_XFGVIRT(IInternetSecurityManager, MapUrlToZone)
HRESULT ( STDMETHODCALLTYPE *MapUrlToZone )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][out] */
_Out_ DWORD *pdwZone,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetSecurityId)
HRESULT ( STDMETHODCALLTYPE *GetSecurityId )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][size_is][out] */
_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID)) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, ProcessUrlAction)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlAction )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][unique][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, QueryCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *QueryCustomPolicy )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, SetZoneMapping)
HRESULT ( STDMETHODCALLTYPE *SetZoneMapping )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ LPCWSTR lpszPattern,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetZoneMappings)
HRESULT ( STDMETHODCALLTYPE *GetZoneMappings )(
__RPC__in IInternetSecurityManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][out] */
_Out_ IEnumString **ppenumString,
/* [annotation][in] */
_In_ DWORD dwFlags);
END_INTERFACE
} IInternetSecurityManagerVtbl;
interface IInternetSecurityManager
{
CONST_VTBL struct IInternetSecurityManagerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetSecurityManager_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetSecurityManager_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetSecurityManager_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetSecurityManager_SetSecuritySite(This,pSite) \
( (This)->lpVtbl -> SetSecuritySite(This,pSite) )
#define IInternetSecurityManager_GetSecuritySite(This,ppSite) \
( (This)->lpVtbl -> GetSecuritySite(This,ppSite) )
#define IInternetSecurityManager_MapUrlToZone(This,pwszUrl,pdwZone,dwFlags) \
( (This)->lpVtbl -> MapUrlToZone(This,pwszUrl,pdwZone,dwFlags) )
#define IInternetSecurityManager_GetSecurityId(This,pwszUrl,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetSecurityId(This,pwszUrl,pbSecurityId,pcbSecurityId,dwReserved) )
#define IInternetSecurityManager_ProcessUrlAction(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) \
( (This)->lpVtbl -> ProcessUrlAction(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) )
#define IInternetSecurityManager_QueryCustomPolicy(This,pwszUrl,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) \
( (This)->lpVtbl -> QueryCustomPolicy(This,pwszUrl,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) )
#define IInternetSecurityManager_SetZoneMapping(This,dwZone,lpszPattern,dwFlags) \
( (This)->lpVtbl -> SetZoneMapping(This,dwZone,lpszPattern,dwFlags) )
#define IInternetSecurityManager_GetZoneMappings(This,dwZone,ppenumString,dwFlags) \
( (This)->lpVtbl -> GetZoneMappings(This,dwZone,ppenumString,dwFlags) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetSecurityManager_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0039 */
/* [local] */
#endif
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#ifndef _LPINTERNETSECURITYMANANGEREX_DEFINED
#define _LPINTERNETSECURITYMANANGEREX_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0039_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0039_v0_0_s_ifspec;
#ifndef __IInternetSecurityManagerEx_INTERFACE_DEFINED__
#define __IInternetSecurityManagerEx_INTERFACE_DEFINED__
/* interface IInternetSecurityManagerEx */
/* [object][unique][helpstring][uuid] */
// Please see notes on IInternetSecurityManager::ProcessUrlAction
// This is the wrapper function that most clients will use.
// It figures out the current Policy for the passed in Action,
// and puts up UI if the current Policy indicates that the user
// should be queried. It returns back the Policy which the caller
// will use to determine if the action should be allowed
EXTERN_C const IID IID_IInternetSecurityManagerEx;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("F164EDF1-CC7C-4f0d-9A94-34222625C393")
IInternetSecurityManagerEx : public IInternetSecurityManager
{
public:
virtual HRESULT STDMETHODCALLTYPE ProcessUrlActionEx(
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ DWORD *pdwOutFlags) = 0;
};
#else /* C style interface */
typedef struct IInternetSecurityManagerExVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IInternetSecurityManagerEx * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IInternetSecurityManagerEx * This);
DECLSPEC_XFGVIRT(IInternetSecurityManager, SetSecuritySite)
HRESULT ( STDMETHODCALLTYPE *SetSecuritySite )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][unique][in] */
_In_ IInternetSecurityMgrSite *pSite);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetSecuritySite)
HRESULT ( STDMETHODCALLTYPE *GetSecuritySite )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][out] */
_Out_ IInternetSecurityMgrSite **ppSite);
DECLSPEC_XFGVIRT(IInternetSecurityManager, MapUrlToZone)
HRESULT ( STDMETHODCALLTYPE *MapUrlToZone )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][out] */
_Out_ DWORD *pdwZone,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetSecurityId)
HRESULT ( STDMETHODCALLTYPE *GetSecurityId )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][size_is][out] */
_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID)) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, ProcessUrlAction)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlAction )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][unique][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, QueryCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *QueryCustomPolicy )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, SetZoneMapping)
HRESULT ( STDMETHODCALLTYPE *SetZoneMapping )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ LPCWSTR lpszPattern,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetZoneMappings)
HRESULT ( STDMETHODCALLTYPE *GetZoneMappings )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][out] */
_Out_ IEnumString **ppenumString,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManagerEx, ProcessUrlActionEx)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlActionEx )(
__RPC__in IInternetSecurityManagerEx * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ DWORD *pdwOutFlags);
END_INTERFACE
} IInternetSecurityManagerExVtbl;
interface IInternetSecurityManagerEx
{
CONST_VTBL struct IInternetSecurityManagerExVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetSecurityManagerEx_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetSecurityManagerEx_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetSecurityManagerEx_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetSecurityManagerEx_SetSecuritySite(This,pSite) \
( (This)->lpVtbl -> SetSecuritySite(This,pSite) )
#define IInternetSecurityManagerEx_GetSecuritySite(This,ppSite) \
( (This)->lpVtbl -> GetSecuritySite(This,ppSite) )
#define IInternetSecurityManagerEx_MapUrlToZone(This,pwszUrl,pdwZone,dwFlags) \
( (This)->lpVtbl -> MapUrlToZone(This,pwszUrl,pdwZone,dwFlags) )
#define IInternetSecurityManagerEx_GetSecurityId(This,pwszUrl,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetSecurityId(This,pwszUrl,pbSecurityId,pcbSecurityId,dwReserved) )
#define IInternetSecurityManagerEx_ProcessUrlAction(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) \
( (This)->lpVtbl -> ProcessUrlAction(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) )
#define IInternetSecurityManagerEx_QueryCustomPolicy(This,pwszUrl,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) \
( (This)->lpVtbl -> QueryCustomPolicy(This,pwszUrl,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) )
#define IInternetSecurityManagerEx_SetZoneMapping(This,dwZone,lpszPattern,dwFlags) \
( (This)->lpVtbl -> SetZoneMapping(This,dwZone,lpszPattern,dwFlags) )
#define IInternetSecurityManagerEx_GetZoneMappings(This,dwZone,ppenumString,dwFlags) \
( (This)->lpVtbl -> GetZoneMappings(This,dwZone,ppenumString,dwFlags) )
#define IInternetSecurityManagerEx_ProcessUrlActionEx(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved,pdwOutFlags) \
( (This)->lpVtbl -> ProcessUrlActionEx(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved,pdwOutFlags) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetSecurityManagerEx_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0040 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_IE70)
#ifndef _LPINTERNETSECURITYMANANGEREx2_DEFINED
#define _LPINTERNETSECURITYMANANGEREx2_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0040_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0040_v0_0_s_ifspec;
#ifndef __IInternetSecurityManagerEx2_INTERFACE_DEFINED__
#define __IInternetSecurityManagerEx2_INTERFACE_DEFINED__
/* interface IInternetSecurityManagerEx2 */
/* [object][unique][helpstring][uuid] */
// Please see notes on IInternetSecurityManager::ProcessUrlAction
EXTERN_C const IID IID_IInternetSecurityManagerEx2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("F1E50292-A795-4117-8E09-2B560A72AC60")
IInternetSecurityManagerEx2 : public IInternetSecurityManagerEx
{
public:
virtual HRESULT STDMETHODCALLTYPE MapUrlToZoneEx2(
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][out] */
_Out_ DWORD *pdwZone,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][out] */
_Outptr_opt_ LPWSTR *ppwszMappedUrl,
/* [annotation][out] */
_Out_opt_ DWORD *pdwOutFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE ProcessUrlActionEx2(
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][unique][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Out_ DWORD *pdwOutFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetSecurityIdEx2(
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][size_is][out] */
_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID)) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryCustomPolicyEx2(
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetSecurityManagerEx2Vtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IInternetSecurityManagerEx2 * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IInternetSecurityManagerEx2 * This);
DECLSPEC_XFGVIRT(IInternetSecurityManager, SetSecuritySite)
HRESULT ( STDMETHODCALLTYPE *SetSecuritySite )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][unique][in] */
_In_ IInternetSecurityMgrSite *pSite);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetSecuritySite)
HRESULT ( STDMETHODCALLTYPE *GetSecuritySite )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][out] */
_Out_ IInternetSecurityMgrSite **ppSite);
DECLSPEC_XFGVIRT(IInternetSecurityManager, MapUrlToZone)
HRESULT ( STDMETHODCALLTYPE *MapUrlToZone )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][out] */
_Out_ DWORD *pdwZone,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetSecurityId)
HRESULT ( STDMETHODCALLTYPE *GetSecurityId )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][size_is][out] */
_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID)) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, ProcessUrlAction)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlAction )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][unique][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, QueryCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *QueryCustomPolicy )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManager, SetZoneMapping)
HRESULT ( STDMETHODCALLTYPE *SetZoneMapping )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ LPCWSTR lpszPattern,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManager, GetZoneMappings)
HRESULT ( STDMETHODCALLTYPE *GetZoneMappings )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][out] */
_Out_ IEnumString **ppenumString,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManagerEx, ProcessUrlActionEx)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlActionEx )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved,
/* [annotation][out] */
_Out_ DWORD *pdwOutFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManagerEx2, MapUrlToZoneEx2)
HRESULT ( STDMETHODCALLTYPE *MapUrlToZoneEx2 )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][out] */
_Out_ DWORD *pdwZone,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][out] */
_Outptr_opt_ LPWSTR *ppwszMappedUrl,
/* [annotation][out] */
_Out_opt_ DWORD *pdwOutFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManagerEx2, ProcessUrlActionEx2)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlActionEx2 )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][unique][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved,
/* [annotation][out] */
_Out_ DWORD *pdwOutFlags);
DECLSPEC_XFGVIRT(IInternetSecurityManagerEx2, GetSecurityIdEx2)
HRESULT ( STDMETHODCALLTYPE *GetSecurityIdEx2 )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][size_is][out] */
_Out_writes_bytes_to_(MAX_SIZE_SECURITY_ID, *pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _At_(*pcbSecurityId, _In_range_(>= , MAX_SIZE_SECURITY_ID) _Out_range_(0, MAX_SIZE_SECURITY_ID)) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetSecurityManagerEx2, QueryCustomPolicyEx2)
HRESULT ( STDMETHODCALLTYPE *QueryCustomPolicyEx2 )(
__RPC__in IInternetSecurityManagerEx2 * This,
/* [annotation][in] */
_In_ IUri *pUri,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Out_writes_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
END_INTERFACE
} IInternetSecurityManagerEx2Vtbl;
interface IInternetSecurityManagerEx2
{
CONST_VTBL struct IInternetSecurityManagerEx2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetSecurityManagerEx2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetSecurityManagerEx2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetSecurityManagerEx2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetSecurityManagerEx2_SetSecuritySite(This,pSite) \
( (This)->lpVtbl -> SetSecuritySite(This,pSite) )
#define IInternetSecurityManagerEx2_GetSecuritySite(This,ppSite) \
( (This)->lpVtbl -> GetSecuritySite(This,ppSite) )
#define IInternetSecurityManagerEx2_MapUrlToZone(This,pwszUrl,pdwZone,dwFlags) \
( (This)->lpVtbl -> MapUrlToZone(This,pwszUrl,pdwZone,dwFlags) )
#define IInternetSecurityManagerEx2_GetSecurityId(This,pwszUrl,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetSecurityId(This,pwszUrl,pbSecurityId,pcbSecurityId,dwReserved) )
#define IInternetSecurityManagerEx2_ProcessUrlAction(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) \
( (This)->lpVtbl -> ProcessUrlAction(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) )
#define IInternetSecurityManagerEx2_QueryCustomPolicy(This,pwszUrl,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) \
( (This)->lpVtbl -> QueryCustomPolicy(This,pwszUrl,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) )
#define IInternetSecurityManagerEx2_SetZoneMapping(This,dwZone,lpszPattern,dwFlags) \
( (This)->lpVtbl -> SetZoneMapping(This,dwZone,lpszPattern,dwFlags) )
#define IInternetSecurityManagerEx2_GetZoneMappings(This,dwZone,ppenumString,dwFlags) \
( (This)->lpVtbl -> GetZoneMappings(This,dwZone,ppenumString,dwFlags) )
#define IInternetSecurityManagerEx2_ProcessUrlActionEx(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved,pdwOutFlags) \
( (This)->lpVtbl -> ProcessUrlActionEx(This,pwszUrl,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved,pdwOutFlags) )
#define IInternetSecurityManagerEx2_MapUrlToZoneEx2(This,pUri,pdwZone,dwFlags,ppwszMappedUrl,pdwOutFlags) \
( (This)->lpVtbl -> MapUrlToZoneEx2(This,pUri,pdwZone,dwFlags,ppwszMappedUrl,pdwOutFlags) )
#define IInternetSecurityManagerEx2_ProcessUrlActionEx2(This,pUri,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved,pdwOutFlags) \
( (This)->lpVtbl -> ProcessUrlActionEx2(This,pUri,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved,pdwOutFlags) )
#define IInternetSecurityManagerEx2_GetSecurityIdEx2(This,pUri,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetSecurityIdEx2(This,pUri,pbSecurityId,pcbSecurityId,dwReserved) )
#define IInternetSecurityManagerEx2_QueryCustomPolicyEx2(This,pUri,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) \
( (This)->lpVtbl -> QueryCustomPolicyEx2(This,pUri,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetSecurityManagerEx2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0041 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0041_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0041_v0_0_s_ifspec;
#ifndef __IZoneIdentifier_INTERFACE_DEFINED__
#define __IZoneIdentifier_INTERFACE_DEFINED__
/* interface IZoneIdentifier */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IZoneIdentifier;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("cd45f185-1b21-48e2-967b-ead743a8914e")
IZoneIdentifier : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetId(
/* [annotation][out] */
_Out_ DWORD *pdwZone) = 0;
virtual HRESULT STDMETHODCALLTYPE SetId(
/* [annotation][in] */
_In_ DWORD dwZone) = 0;
virtual HRESULT STDMETHODCALLTYPE Remove( void) = 0;
};
#else /* C style interface */
typedef struct IZoneIdentifierVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IZoneIdentifier * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IZoneIdentifier * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IZoneIdentifier * This);
DECLSPEC_XFGVIRT(IZoneIdentifier, GetId)
HRESULT ( STDMETHODCALLTYPE *GetId )(
__RPC__in IZoneIdentifier * This,
/* [annotation][out] */
_Out_ DWORD *pdwZone);
DECLSPEC_XFGVIRT(IZoneIdentifier, SetId)
HRESULT ( STDMETHODCALLTYPE *SetId )(
__RPC__in IZoneIdentifier * This,
/* [annotation][in] */
_In_ DWORD dwZone);
DECLSPEC_XFGVIRT(IZoneIdentifier, Remove)
HRESULT ( STDMETHODCALLTYPE *Remove )(
__RPC__in IZoneIdentifier * This);
END_INTERFACE
} IZoneIdentifierVtbl;
interface IZoneIdentifier
{
CONST_VTBL struct IZoneIdentifierVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IZoneIdentifier_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IZoneIdentifier_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IZoneIdentifier_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IZoneIdentifier_GetId(This,pdwZone) \
( (This)->lpVtbl -> GetId(This,pdwZone) )
#define IZoneIdentifier_SetId(This,dwZone) \
( (This)->lpVtbl -> SetId(This,dwZone) )
#define IZoneIdentifier_Remove(This) \
( (This)->lpVtbl -> Remove(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IZoneIdentifier_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0042 */
/* [local] */
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_WIN10)
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0042_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0042_v0_0_s_ifspec;
#ifndef __IZoneIdentifier2_INTERFACE_DEFINED__
#define __IZoneIdentifier2_INTERFACE_DEFINED__
/* interface IZoneIdentifier2 */
/* [unique][uuid][object] */
EXTERN_C const IID IID_IZoneIdentifier2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("EB5E760C-09EF-45C0-B510-70830CE31E6A")
IZoneIdentifier2 : public IZoneIdentifier
{
public:
virtual HRESULT STDMETHODCALLTYPE GetLastWriterPackageFamilyName(
/* [annotation][out] */
_Out_ LPWSTR *packageFamilyName) = 0;
virtual HRESULT STDMETHODCALLTYPE SetLastWriterPackageFamilyName(
/* [annotation][in] */
_In_ LPCWSTR packageFamilyName) = 0;
virtual HRESULT STDMETHODCALLTYPE RemoveLastWriterPackageFamilyName( void) = 0;
virtual HRESULT STDMETHODCALLTYPE GetAppZoneId(
/* [annotation][out] */
_Out_ DWORD *zone) = 0;
virtual HRESULT STDMETHODCALLTYPE SetAppZoneId(
/* [annotation][in] */
_In_ DWORD zone) = 0;
virtual HRESULT STDMETHODCALLTYPE RemoveAppZoneId( void) = 0;
};
#else /* C style interface */
typedef struct IZoneIdentifier2Vtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IZoneIdentifier2 * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IZoneIdentifier2 * This);
DECLSPEC_XFGVIRT(IZoneIdentifier, GetId)
HRESULT ( STDMETHODCALLTYPE *GetId )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][out] */
_Out_ DWORD *pdwZone);
DECLSPEC_XFGVIRT(IZoneIdentifier, SetId)
HRESULT ( STDMETHODCALLTYPE *SetId )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][in] */
_In_ DWORD dwZone);
DECLSPEC_XFGVIRT(IZoneIdentifier, Remove)
HRESULT ( STDMETHODCALLTYPE *Remove )(
__RPC__in IZoneIdentifier2 * This);
DECLSPEC_XFGVIRT(IZoneIdentifier2, GetLastWriterPackageFamilyName)
HRESULT ( STDMETHODCALLTYPE *GetLastWriterPackageFamilyName )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][out] */
_Out_ LPWSTR *packageFamilyName);
DECLSPEC_XFGVIRT(IZoneIdentifier2, SetLastWriterPackageFamilyName)
HRESULT ( STDMETHODCALLTYPE *SetLastWriterPackageFamilyName )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][in] */
_In_ LPCWSTR packageFamilyName);
DECLSPEC_XFGVIRT(IZoneIdentifier2, RemoveLastWriterPackageFamilyName)
HRESULT ( STDMETHODCALLTYPE *RemoveLastWriterPackageFamilyName )(
__RPC__in IZoneIdentifier2 * This);
DECLSPEC_XFGVIRT(IZoneIdentifier2, GetAppZoneId)
HRESULT ( STDMETHODCALLTYPE *GetAppZoneId )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][out] */
_Out_ DWORD *zone);
DECLSPEC_XFGVIRT(IZoneIdentifier2, SetAppZoneId)
HRESULT ( STDMETHODCALLTYPE *SetAppZoneId )(
__RPC__in IZoneIdentifier2 * This,
/* [annotation][in] */
_In_ DWORD zone);
DECLSPEC_XFGVIRT(IZoneIdentifier2, RemoveAppZoneId)
HRESULT ( STDMETHODCALLTYPE *RemoveAppZoneId )(
__RPC__in IZoneIdentifier2 * This);
END_INTERFACE
} IZoneIdentifier2Vtbl;
interface IZoneIdentifier2
{
CONST_VTBL struct IZoneIdentifier2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IZoneIdentifier2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IZoneIdentifier2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IZoneIdentifier2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IZoneIdentifier2_GetId(This,pdwZone) \
( (This)->lpVtbl -> GetId(This,pdwZone) )
#define IZoneIdentifier2_SetId(This,dwZone) \
( (This)->lpVtbl -> SetId(This,dwZone) )
#define IZoneIdentifier2_Remove(This) \
( (This)->lpVtbl -> Remove(This) )
#define IZoneIdentifier2_GetLastWriterPackageFamilyName(This,packageFamilyName) \
( (This)->lpVtbl -> GetLastWriterPackageFamilyName(This,packageFamilyName) )
#define IZoneIdentifier2_SetLastWriterPackageFamilyName(This,packageFamilyName) \
( (This)->lpVtbl -> SetLastWriterPackageFamilyName(This,packageFamilyName) )
#define IZoneIdentifier2_RemoveLastWriterPackageFamilyName(This) \
( (This)->lpVtbl -> RemoveLastWriterPackageFamilyName(This) )
#define IZoneIdentifier2_GetAppZoneId(This,zone) \
( (This)->lpVtbl -> GetAppZoneId(This,zone) )
#define IZoneIdentifier2_SetAppZoneId(This,zone) \
( (This)->lpVtbl -> SetAppZoneId(This,zone) )
#define IZoneIdentifier2_RemoveAppZoneId(This) \
( (This)->lpVtbl -> RemoveAppZoneId(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IZoneIdentifier2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0043 */
/* [local] */
#endif //(_WIN32_IE >= _WIN32_IE_WIN10
#ifndef _LPINTERNETHOSTSECURITYMANANGER_DEFINED
#define _LPINTERNETHOSTSECURITYMANANGER_DEFINED
//This is the interface MSHTML exposes to its clients
//The clients need not pass in a URL to these functions
//since MSHTML maintains the notion of the current URL
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0043_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0043_v0_0_s_ifspec;
#ifndef __IInternetHostSecurityManager_INTERFACE_DEFINED__
#define __IInternetHostSecurityManager_INTERFACE_DEFINED__
/* interface IInternetHostSecurityManager */
/* [unique][helpstring][uuid][object][local] */
// Please see notes on IInternetSecurityManager::ProcessUrlAction
EXTERN_C const IID IID_IInternetHostSecurityManager;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("3af280b6-cb3f-11d0-891e-00c04fb6bfc4")
IInternetHostSecurityManager : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetSecurityId(
/* [annotation][size_is][out] */
_Out_writes_(*pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _Deref_in_range_(MAX_SIZE_SECURITY_ID, UINT_MAX) _Deref_out_range_(0, MAX_SIZE_SECURITY_ID) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE ProcessUrlAction(
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_all_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_reads_opt_(cbContext) BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryCustomPolicy(
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Outptr_result_buffer_all_maybenull_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_reads_(cbContext) BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetHostSecurityManagerVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetHostSecurityManager * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetHostSecurityManager * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetHostSecurityManager * This);
DECLSPEC_XFGVIRT(IInternetHostSecurityManager, GetSecurityId)
HRESULT ( STDMETHODCALLTYPE *GetSecurityId )(
IInternetHostSecurityManager * This,
/* [annotation][size_is][out] */
_Out_writes_(*pcbSecurityId) BYTE *pbSecurityId,
/* [annotation][out][in] */
_Inout_ _Deref_in_range_(MAX_SIZE_SECURITY_ID, UINT_MAX) _Deref_out_range_(0, MAX_SIZE_SECURITY_ID) DWORD *pcbSecurityId,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
DECLSPEC_XFGVIRT(IInternetHostSecurityManager, ProcessUrlAction)
HRESULT ( STDMETHODCALLTYPE *ProcessUrlAction )(
IInternetHostSecurityManager * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_all_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_reads_opt_(cbContext) BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetHostSecurityManager, QueryCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *QueryCustomPolicy )(
IInternetHostSecurityManager * This,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Outptr_result_buffer_all_maybenull_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_reads_(cbContext) BYTE *pContext,
/* [annotation][in] */
_In_ DWORD cbContext,
/* [annotation][in] */
_In_ DWORD dwReserved);
END_INTERFACE
} IInternetHostSecurityManagerVtbl;
interface IInternetHostSecurityManager
{
CONST_VTBL struct IInternetHostSecurityManagerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetHostSecurityManager_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetHostSecurityManager_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetHostSecurityManager_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetHostSecurityManager_GetSecurityId(This,pbSecurityId,pcbSecurityId,dwReserved) \
( (This)->lpVtbl -> GetSecurityId(This,pbSecurityId,pcbSecurityId,dwReserved) )
#define IInternetHostSecurityManager_ProcessUrlAction(This,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) \
( (This)->lpVtbl -> ProcessUrlAction(This,dwAction,pPolicy,cbPolicy,pContext,cbContext,dwFlags,dwReserved) )
#define IInternetHostSecurityManager_QueryCustomPolicy(This,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) \
( (This)->lpVtbl -> QueryCustomPolicy(This,guidKey,ppPolicy,pcbPolicy,pContext,cbContext,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetHostSecurityManager_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0044 */
/* [local] */
#endif
// The zone manager maintains policies for a set of standard actions.
// These actions are identified by integral values (called action indexes)
// specified below.
// Minimum legal value for an action
#define URLACTION_MIN 0x00001000
#define URLACTION_DOWNLOAD_MIN 0x00001000
#define URLACTION_DOWNLOAD_SIGNED_ACTIVEX 0x00001001
#define URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX 0x00001004
#define URLACTION_DOWNLOAD_CURR_MAX 0x00001004
#define URLACTION_DOWNLOAD_MAX 0x000011FF
#define URLACTION_ACTIVEX_MIN 0x00001200
#define URLACTION_ACTIVEX_RUN 0x00001200
#define URLPOLICY_ACTIVEX_CHECK_LIST 0x00010000
#define URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY 0x00001201 // aggregate next four
#define URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY 0x00001202 //
#define URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY 0x00001203 //
#define URLACTION_SCRIPT_OVERRIDE_SAFETY 0x00001401 //
#define URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY 0x00001204 //
#define URLACTION_ACTIVEX_TREATASUNTRUSTED 0x00001205
#define URLACTION_ACTIVEX_NO_WEBOC_SCRIPT 0x00001206
#define URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION 0x00001207
#define URLACTION_ACTIVEX_OVERRIDE_OPTIN 0x00001208
#define URLACTION_ACTIVEX_SCRIPTLET_RUN 0x00001209
#define URLACTION_ACTIVEX_DYNSRC_VIDEO_AND_ANIMATION 0x0000120A //
#define URLACTION_ACTIVEX_OVERRIDE_DOMAINLIST 0x0000120B
#define URLACTION_ACTIVEX_ALLOW_TDC 0x0000120C
#define URLACTION_ACTIVEX_CURR_MAX 0x0000120C
#define URLACTION_ACTIVEX_MAX 0x000013ff
#define URLACTION_SCRIPT_MIN 0x00001400
#define URLACTION_SCRIPT_RUN 0x00001400
#define URLACTION_SCRIPT_JAVA_USE 0x00001402
#define URLACTION_SCRIPT_SAFE_ACTIVEX 0x00001405
#define URLACTION_CROSS_DOMAIN_DATA 0x00001406
#define URLACTION_SCRIPT_PASTE 0x00001407
#define URLACTION_ALLOW_XDOMAIN_SUBFRAME_RESIZE 0x00001408
#define URLACTION_SCRIPT_XSSFILTER 0x00001409
#define URLACTION_SCRIPT_NAVIGATE 0x0000140A
#define URLACTION_PLUGGABLE_PROTOCOL_XHR 0x0000140B
#define URLACTION_ALLOW_VBSCRIPT_IE 0x0000140C
#define URLACTION_ALLOW_JSCRIPT_IE 0x0000140D
#define URLACTION_SCRIPT_CURR_MAX 0x0000140D
#define URLACTION_SCRIPT_MAX 0x000015ff
#define URLACTION_HTML_MIN 0x00001600
#define URLACTION_HTML_SUBMIT_FORMS 0x00001601 // aggregate next two
#define URLACTION_HTML_SUBMIT_FORMS_FROM 0x00001602 //
#define URLACTION_HTML_SUBMIT_FORMS_TO 0x00001603 //
#define URLACTION_HTML_FONT_DOWNLOAD 0x00001604
#define URLACTION_HTML_JAVA_RUN 0x00001605 // derive from Java custom policy
#define URLACTION_HTML_USERDATA_SAVE 0x00001606
#define URLACTION_HTML_SUBFRAME_NAVIGATE 0x00001607
#define URLACTION_HTML_META_REFRESH 0x00001608
#define URLACTION_HTML_MIXED_CONTENT 0x00001609
#define URLACTION_HTML_INCLUDE_FILE_PATH 0x0000160A
#define URLACTION_HTML_ALLOW_INJECTED_DYNAMIC_HTML 0x0000160B
#define URLACTION_HTML_REQUIRE_UTF8_DOCUMENT_CODEPAGE 0x0000160C
#define URLACTION_HTML_ALLOW_CROSS_DOMAIN_CANVAS 0x0000160D
#define URLACTION_HTML_ALLOW_WINDOW_CLOSE 0x0000160E
#define URLACTION_HTML_ALLOW_CROSS_DOMAIN_WEBWORKER 0x0000160F
#define URLACTION_HTML_ALLOW_CROSS_DOMAIN_TEXTTRACK 0x00001610
#define URLACTION_HTML_ALLOW_INDEXEDDB 0x00001611
#define URLACTION_HTML_MAX 0x000017ff
#define URLACTION_SHELL_MIN 0x00001800
#define URLACTION_SHELL_INSTALL_DTITEMS 0x00001800
#define URLACTION_SHELL_MOVE_OR_COPY 0x00001802
#define URLACTION_SHELL_FILE_DOWNLOAD 0x00001803
#define URLACTION_SHELL_VERB 0x00001804
#define URLACTION_SHELL_WEBVIEW_VERB 0x00001805
#define URLACTION_SHELL_SHELLEXECUTE 0x00001806
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define URLACTION_SHELL_EXECUTE_HIGHRISK 0x00001806
#define URLACTION_SHELL_EXECUTE_MODRISK 0x00001807
#define URLACTION_SHELL_EXECUTE_LOWRISK 0x00001808
#define URLACTION_SHELL_POPUPMGR 0x00001809
#define URLACTION_SHELL_RTF_OBJECTS_LOAD 0x0000180A
#define URLACTION_SHELL_ENHANCED_DRAGDROP_SECURITY 0x0000180B
#define URLACTION_SHELL_EXTENSIONSECURITY 0x0000180C
#define URLACTION_SHELL_SECURE_DRAGSOURCE 0x0000180D
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_WIN7)
#define URLACTION_SHELL_REMOTEQUERY 0x0000180E
#define URLACTION_SHELL_PREVIEW 0x0000180F
#define URLACTION_SHELL_SHARE 0x00001810
#define URLACTION_SHELL_ALLOW_CROSS_SITE_SHARE 0x00001811
#endif //(_WIN32_IE >= _WIN32_IE_WIN7)
#define URLACTION_SHELL_TOCTOU_RISK 0x00001812
#define URLACTION_SHELL_CURR_MAX 0x00001812
#define URLACTION_SHELL_MAX 0x000019ff
#define URLACTION_NETWORK_MIN 0x00001A00
#define URLACTION_CREDENTIALS_USE 0x00001A00
#define URLPOLICY_CREDENTIALS_SILENT_LOGON_OK 0x00000000
#define URLPOLICY_CREDENTIALS_MUST_PROMPT_USER 0x00010000
#define URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT 0x00020000
#define URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY 0x00030000
#define URLACTION_AUTHENTICATE_CLIENT 0x00001A01
#define URLPOLICY_AUTHENTICATE_CLEARTEXT_OK 0x00000000
#define URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE 0x00010000
#define URLPOLICY_AUTHENTICATE_MUTUAL_ONLY 0x00030000
#define URLACTION_COOKIES 0x00001A02
#define URLACTION_COOKIES_SESSION 0x00001A03
#define URLACTION_CLIENT_CERT_PROMPT 0x00001A04
#define URLACTION_COOKIES_THIRD_PARTY 0x00001A05
#define URLACTION_COOKIES_SESSION_THIRD_PARTY 0x00001A06
#define URLACTION_COOKIES_ENABLED 0x00001A10
#define URLACTION_NETWORK_CURR_MAX 0x00001A10
#define URLACTION_NETWORK_MAX 0x00001Bff
#define URLACTION_JAVA_MIN 0x00001C00
#define URLACTION_JAVA_PERMISSIONS 0x00001C00
#define URLPOLICY_JAVA_PROHIBIT 0x00000000
#define URLPOLICY_JAVA_HIGH 0x00010000
#define URLPOLICY_JAVA_MEDIUM 0x00020000
#define URLPOLICY_JAVA_LOW 0x00030000
#define URLPOLICY_JAVA_CUSTOM 0x00800000
#define URLACTION_JAVA_CURR_MAX 0x00001C00
#define URLACTION_JAVA_MAX 0x00001Cff
// The following Infodelivery actions should have no default policies
// in the registry. They assume that no default policy means fall
// back to the global restriction. If an admin sets a policy per
// zone, then it overrides the global restriction.
#define URLACTION_INFODELIVERY_MIN 0x00001D00
#define URLACTION_INFODELIVERY_NO_ADDING_CHANNELS 0x00001D00
#define URLACTION_INFODELIVERY_NO_EDITING_CHANNELS 0x00001D01
#define URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS 0x00001D02
#define URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS 0x00001D03
#define URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS 0x00001D04
#define URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS 0x00001D05
#define URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING 0x00001D06
#define URLACTION_INFODELIVERY_CURR_MAX 0x00001D06
#define URLACTION_INFODELIVERY_MAX 0x00001Dff
#define URLACTION_CHANNEL_SOFTDIST_MIN 0x00001E00
#define URLACTION_CHANNEL_SOFTDIST_PERMISSIONS 0x00001E05
#define URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT 0x00010000
#define URLPOLICY_CHANNEL_SOFTDIST_PRECACHE 0x00020000
#define URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL 0x00030000
#define URLACTION_CHANNEL_SOFTDIST_MAX 0x00001Eff
#if (_WIN32_IE >= _WIN32_IE_IE80)
#define URLACTION_DOTNET_USERCONTROLS 0x00002005
#endif //(_WIN32_IE >= _WIN32_IE_IE80)
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#define URLACTION_BEHAVIOR_MIN 0x00002000
#define URLACTION_BEHAVIOR_RUN 0x00002000
#define URLPOLICY_BEHAVIOR_CHECK_LIST 0x00010000
// The following actions correspond to the Feature options above.
// However, they are NOT in the same order.
#define URLACTION_FEATURE_MIN 0x00002100
#define URLACTION_FEATURE_MIME_SNIFFING 0x00002100
#define URLACTION_FEATURE_ZONE_ELEVATION 0x00002101
#define URLACTION_FEATURE_WINDOW_RESTRICTIONS 0x00002102
#define URLACTION_FEATURE_SCRIPT_STATUS_BAR 0x00002103
#define URLACTION_FEATURE_FORCE_ADDR_AND_STATUS 0x00002104
#define URLACTION_FEATURE_BLOCK_INPUT_PROMPTS 0x00002105
#define URLACTION_FEATURE_DATA_BINDING 0x00002106
#define URLACTION_FEATURE_CROSSDOMAIN_FOCUS_CHANGE 0x00002107
#define URLACTION_AUTOMATIC_DOWNLOAD_UI_MIN 0x00002200
#define URLACTION_AUTOMATIC_DOWNLOAD_UI 0x00002200
#define URLACTION_AUTOMATIC_ACTIVEX_UI 0x00002201
#define URLACTION_ALLOW_RESTRICTEDPROTOCOLS 0x00002300
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_IE70)
// Whether to do the Anti-Phishing check.
#define URLACTION_ALLOW_APEVALUATION 0x00002301
#define URLACTION_ALLOW_XHR_EVALUATION 0x00002302
// The following ExpressAPP and XPS actions are trumped by registry in
// case of Internet Explorer upgrade from IE 6.0 which honors registry.
#define URLACTION_WINDOWS_BROWSER_APPLICATIONS 0x00002400
#define URLACTION_XPS_DOCUMENTS 0x00002401
#define URLACTION_LOOSE_XAML 0x00002402
#define URLACTION_LOWRIGHTS 0x00002500
// The following action belong to WinFX Bootstrapper
#define URLACTION_WINFX_SETUP 0x00002600
#define URLACTION_INPRIVATE_BLOCKING 0x00002700
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
#define URLACTION_ALLOW_AUDIO_VIDEO 0x00002701
#define URLACTION_ALLOW_ACTIVEX_FILTERING 0x00002702
#define URLACTION_ALLOW_STRUCTURED_STORAGE_SNIFFING 0x00002703
#define URLACTION_ALLOW_AUDIO_VIDEO_PLUGINS 0x00002704
// The following two URLACTIONs each have as their context parameter a string that is the destination URI.
#define URLACTION_ALLOW_ZONE_ELEVATION_VIA_OPT_OUT 0x00002705
#define URLACTION_ALLOW_ZONE_ELEVATION_OPT_OUT_ADDITION 0x00002706
#define URLACTION_ALLOW_CROSSDOMAIN_DROP_WITHIN_WINDOW 0x00002708
#define URLACTION_ALLOW_CROSSDOMAIN_DROP_ACROSS_WINDOWS 0x00002709
#define URLACTION_ALLOW_CROSSDOMAIN_APPCACHE_MANIFEST 0x0000270A
#define URLACTION_ALLOW_RENDER_LEGACY_DXTFILTERS 0x0000270B
#define URLACTION_ALLOW_ANTIMALWARE_SCANNING_OF_ACTIVEX 0x0000270C
#define URLACTION_ALLOW_CSS_EXPRESSIONS 0x0000270D
// For each action specified above the system maintains
// a set of policies for the action.
// The only policies supported currently are permissions (i.e. is something allowed)
// and logging status.
// IMPORTANT: If you are defining your own policies don't overload the meaning of the
// loword of the policy. You can use the hiword to store any policy bits which are only
// meaningful to your action.
// For an example of how to do this look at the URLPOLICY_JAVA above
// Permissions
#define URLPOLICY_ALLOW 0x00
#define URLPOLICY_QUERY 0x01
#define URLPOLICY_DISALLOW 0x03
// Notifications are not done when user already queried.
#define URLPOLICY_NOTIFY_ON_ALLOW 0x10
#define URLPOLICY_NOTIFY_ON_DISALLOW 0x20
// Logging is done regardless of whether user was queried.
#define URLPOLICY_LOG_ON_ALLOW 0x40
#define URLPOLICY_LOG_ON_DISALLOW 0x80
#define URLPOLICY_MASK_PERMISSIONS 0x0f
#define GetUrlPolicyPermissions(dw) (dw & URLPOLICY_MASK_PERMISSIONS)
#define SetUrlPolicyPermissions(dw,dw2) ((dw) = ((dw) & ~(URLPOLICY_MASK_PERMISSIONS)) | (dw2))
#define URLPOLICY_DONTCHECKDLGBOX 0x100
// The ordinal #'s that define the predefined zones internet explorer knows about.
// When we support user-defined zones their zone numbers should be between
// URLZONE_USER_MIN and URLZONE_USER_MAX
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
// Custom policy to query whether the local machine zone
// has been unlocked for current document.
EXTERN_C const GUID GUID_CUSTOM_LOCALMACHINEZONEUNLOCKED;
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#ifndef _LPINTERNETZONEMANAGER_DEFINED
#define _LPINTERNETZONEMANAGER_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0044_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0044_v0_0_s_ifspec;
#ifndef __IInternetZoneManager_INTERFACE_DEFINED__
#define __IInternetZoneManager_INTERFACE_DEFINED__
/* interface IInternetZoneManager */
/* [unique][helpstring][uuid][object][local] */
typedef /* [unique] */ IInternetZoneManager *LPURLZONEMANAGER;
typedef
enum tagURLZONE
{
URLZONE_INVALID = -1,
URLZONE_PREDEFINED_MIN = 0,
URLZONE_LOCAL_MACHINE = 0,
URLZONE_INTRANET = ( URLZONE_LOCAL_MACHINE + 1 ) ,
URLZONE_TRUSTED = ( URLZONE_INTRANET + 1 ) ,
URLZONE_INTERNET = ( URLZONE_TRUSTED + 1 ) ,
URLZONE_UNTRUSTED = ( URLZONE_INTERNET + 1 ) ,
URLZONE_PREDEFINED_MAX = 999,
URLZONE_USER_MIN = 1000,
URLZONE_USER_MAX = 10000
} URLZONE;
// Enhanced Security Configuration zone mapping flag for IInternetSecurityManager::SetZoneMapping
#define URLZONE_ESC_FLAG 0x100
typedef
enum tagURLTEMPLATE
{
URLTEMPLATE_CUSTOM = 0,
URLTEMPLATE_PREDEFINED_MIN = 0x10000,
URLTEMPLATE_LOW = 0x10000,
URLTEMPLATE_MEDLOW = 0x10500,
URLTEMPLATE_MEDIUM = 0x11000,
URLTEMPLATE_MEDHIGH = 0x11500,
URLTEMPLATE_HIGH = 0x12000,
URLTEMPLATE_PREDEFINED_MAX = 0x20000
} URLTEMPLATE;
enum __MIDL_IInternetZoneManager_0001
{
MAX_ZONE_PATH = 260,
MAX_ZONE_DESCRIPTION = 200
} ;
typedef /* [public] */
enum __MIDL_IInternetZoneManager_0002
{
ZAFLAGS_CUSTOM_EDIT = 0x1,
ZAFLAGS_ADD_SITES = 0x2,
ZAFLAGS_REQUIRE_VERIFICATION = 0x4,
ZAFLAGS_INCLUDE_PROXY_OVERRIDE = 0x8,
ZAFLAGS_INCLUDE_INTRANET_SITES = 0x10,
ZAFLAGS_NO_UI = 0x20,
ZAFLAGS_SUPPORTS_VERIFICATION = 0x40,
ZAFLAGS_UNC_AS_INTRANET = 0x80,
ZAFLAGS_DETECT_INTRANET = 0x100,
ZAFLAGS_USE_LOCKED_ZONES = 0x10000,
ZAFLAGS_VERIFY_TEMPLATE_SETTINGS = 0x20000,
ZAFLAGS_NO_CACHE = 0x40000
} ZAFLAGS;
typedef struct _ZONEATTRIBUTES
{
ULONG cbSize;
WCHAR szDisplayName[ 260 ];
WCHAR szDescription[ 200 ];
WCHAR szIconPath[ 260 ];
DWORD dwTemplateMinLevel;
DWORD dwTemplateRecommended;
DWORD dwTemplateCurrentLevel;
DWORD dwFlags;
} ZONEATTRIBUTES;
typedef struct _ZONEATTRIBUTES *LPZONEATTRIBUTES;
// Gets the zone attributes (information in registry other than actual security
// policies associated with the zone). Zone attributes are fixed as:
// Sets the zone attributes (information in registry other than actual security
// policies associated with the zone). Zone attributes as above.
// Returns S_OK or ??? if failed to write the zone attributes.
/* Registry Flags
When reading, default behavior is:
If HKLM allows override and HKCU value exists
Then use HKCU value
Else use HKLM value
When writing, default behavior is same as HKCU
If HKLM allows override
Then Write to HKCU
Else Fail
*/
typedef
enum _URLZONEREG
{
URLZONEREG_DEFAULT = 0,
URLZONEREG_HKLM = ( URLZONEREG_DEFAULT + 1 ) ,
URLZONEREG_HKCU = ( URLZONEREG_HKLM + 1 )
} URLZONEREG;
// Gets a named custom policy associated with a zone;
// e.g. the Java VM settings can be defined with a unique key such as 'Java'.
// Custom policy support is intended to allow extensibility from the predefined
// set of policies that IE4 has built in.
//
// pwszKey is the string name designating the custom policy. Components are
// responsible for having unique names.
// ppPolicy is the callee allocated buffer for the policy byte blob; caller is
// responsible for freeing this buffer eventually.
// pcbPolicy is the size of the byte blob returned.
// dwRegFlags determines how registry is accessed (see above).
// Returns S_OK if key is found and buffer allocated; ??? if key is not found (no buffer alloced).
// Sets a named custom policy associated with a zone;
// e.g. the Java VM settings can be defined with a unique key such as 'Java'.
// Custom policy support is intended to allow extensibility from the predefined
// set of policies that IE4 has built in.
//
// pwszKey is the string name designating the custom policy. Components are
// responsible for having unique names.
// ppPolicy is the caller allocated buffer for the policy byte blob.
// pcbPolicy is the size of the byte blob to be set.
// dwRegFlags determines if HTCU or HKLM is set.
// Returns S_OK or ??? if failed to write the zone custom policy.
// Gets action policy associated with a zone, the builtin, fixed-length policies info.
// dwAction is the action code for the action as defined above.
// pPolicy is the caller allocated buffer for the policy data.
// cbPolicy is the size of the caller allocated buffer.
// dwRegFlags determines how registry is accessed (see above).
// Returns S_OK if action is valid; ??? if action is not valid.
EXTERN_C const IID IID_IInternetZoneManager;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("79eac9ef-baf9-11ce-8c82-00aa004ba90b")
IInternetZoneManager : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetZoneAttributes(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][unique][out][in] */
_Inout_ ZONEATTRIBUTES *pZoneAttributes) = 0;
virtual HRESULT STDMETHODCALLTYPE SetZoneAttributes(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ ZONEATTRIBUTES *pZoneAttributes) = 0;
virtual HRESULT STDMETHODCALLTYPE GetZoneCustomPolicy(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Outptr_result_buffer_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg) = 0;
virtual HRESULT STDMETHODCALLTYPE SetZoneCustomPolicy(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg) = 0;
virtual HRESULT STDMETHODCALLTYPE GetZoneActionPolicy(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg) = 0;
virtual HRESULT STDMETHODCALLTYPE SetZoneActionPolicy(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg) = 0;
virtual HRESULT STDMETHODCALLTYPE PromptAction(
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ HWND hwndParent,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwPromptFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE LogAction(
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwLogFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE CreateZoneEnumerator(
/* [annotation][out] */
_Out_ DWORD *pdwEnum,
/* [annotation][out] */
_Out_ DWORD *pdwCount,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetZoneAt(
/* [annotation][in] */
_In_ DWORD dwEnum,
/* [annotation][in] */
_In_ DWORD dwIndex,
/* [annotation][out] */
_Out_ DWORD *pdwZone) = 0;
virtual HRESULT STDMETHODCALLTYPE DestroyZoneEnumerator(
/* [annotation][in] */
_In_ DWORD dwEnum) = 0;
virtual HRESULT STDMETHODCALLTYPE CopyTemplatePoliciesToZone(
/* [annotation][in] */
_In_ DWORD dwTemplate,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
};
#else /* C style interface */
typedef struct IInternetZoneManagerVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetZoneManager * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetZoneManager * This);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneAttributes)
HRESULT ( STDMETHODCALLTYPE *GetZoneAttributes )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][unique][out][in] */
_Inout_ ZONEATTRIBUTES *pZoneAttributes);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneAttributes)
HRESULT ( STDMETHODCALLTYPE *SetZoneAttributes )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ ZONEATTRIBUTES *pZoneAttributes);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *GetZoneCustomPolicy )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Outptr_result_buffer_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *SetZoneCustomPolicy )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneActionPolicy)
HRESULT ( STDMETHODCALLTYPE *GetZoneActionPolicy )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneActionPolicy)
HRESULT ( STDMETHODCALLTYPE *SetZoneActionPolicy )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, PromptAction)
HRESULT ( STDMETHODCALLTYPE *PromptAction )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ HWND hwndParent,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwPromptFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, LogAction)
HRESULT ( STDMETHODCALLTYPE *LogAction )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwLogFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, CreateZoneEnumerator)
HRESULT ( STDMETHODCALLTYPE *CreateZoneEnumerator )(
IInternetZoneManager * This,
/* [annotation][out] */
_Out_ DWORD *pdwEnum,
/* [annotation][out] */
_Out_ DWORD *pdwCount,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneAt)
HRESULT ( STDMETHODCALLTYPE *GetZoneAt )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwEnum,
/* [annotation][in] */
_In_ DWORD dwIndex,
/* [annotation][out] */
_Out_ DWORD *pdwZone);
DECLSPEC_XFGVIRT(IInternetZoneManager, DestroyZoneEnumerator)
HRESULT ( STDMETHODCALLTYPE *DestroyZoneEnumerator )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwEnum);
DECLSPEC_XFGVIRT(IInternetZoneManager, CopyTemplatePoliciesToZone)
HRESULT ( STDMETHODCALLTYPE *CopyTemplatePoliciesToZone )(
IInternetZoneManager * This,
/* [annotation][in] */
_In_ DWORD dwTemplate,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwReserved);
END_INTERFACE
} IInternetZoneManagerVtbl;
interface IInternetZoneManager
{
CONST_VTBL struct IInternetZoneManagerVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetZoneManager_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetZoneManager_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetZoneManager_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetZoneManager_GetZoneAttributes(This,dwZone,pZoneAttributes) \
( (This)->lpVtbl -> GetZoneAttributes(This,dwZone,pZoneAttributes) )
#define IInternetZoneManager_SetZoneAttributes(This,dwZone,pZoneAttributes) \
( (This)->lpVtbl -> SetZoneAttributes(This,dwZone,pZoneAttributes) )
#define IInternetZoneManager_GetZoneCustomPolicy(This,dwZone,guidKey,ppPolicy,pcbPolicy,urlZoneReg) \
( (This)->lpVtbl -> GetZoneCustomPolicy(This,dwZone,guidKey,ppPolicy,pcbPolicy,urlZoneReg) )
#define IInternetZoneManager_SetZoneCustomPolicy(This,dwZone,guidKey,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> SetZoneCustomPolicy(This,dwZone,guidKey,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManager_GetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> GetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManager_SetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> SetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManager_PromptAction(This,dwAction,hwndParent,pwszUrl,pwszText,dwPromptFlags) \
( (This)->lpVtbl -> PromptAction(This,dwAction,hwndParent,pwszUrl,pwszText,dwPromptFlags) )
#define IInternetZoneManager_LogAction(This,dwAction,pwszUrl,pwszText,dwLogFlags) \
( (This)->lpVtbl -> LogAction(This,dwAction,pwszUrl,pwszText,dwLogFlags) )
#define IInternetZoneManager_CreateZoneEnumerator(This,pdwEnum,pdwCount,dwFlags) \
( (This)->lpVtbl -> CreateZoneEnumerator(This,pdwEnum,pdwCount,dwFlags) )
#define IInternetZoneManager_GetZoneAt(This,dwEnum,dwIndex,pdwZone) \
( (This)->lpVtbl -> GetZoneAt(This,dwEnum,dwIndex,pdwZone) )
#define IInternetZoneManager_DestroyZoneEnumerator(This,dwEnum) \
( (This)->lpVtbl -> DestroyZoneEnumerator(This,dwEnum) )
#define IInternetZoneManager_CopyTemplatePoliciesToZone(This,dwTemplate,dwZone,dwReserved) \
( (This)->lpVtbl -> CopyTemplatePoliciesToZone(This,dwTemplate,dwZone,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetZoneManager_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0045 */
/* [local] */
#endif
#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
#ifndef _LPINTERNETZONEMANAGEREX_DEFINED
#define _LPINTERNETZONEMANAGEREX_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0045_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0045_v0_0_s_ifspec;
#ifndef __IInternetZoneManagerEx_INTERFACE_DEFINED__
#define __IInternetZoneManagerEx_INTERFACE_DEFINED__
/* interface IInternetZoneManagerEx */
/* [unique][helpstring][uuid][object][local] */
// Gets action policy associated with a zone, the builtin, fixed-length policies info.
// dwAction is the action code for the action as defined above.
// pPolicy is the caller allocated buffer for the policy data.
// cbPolicy is the size of the caller allocated buffer.
// dwRegFlags determines how registry is accessed (see above).
// dwFlags determine which registry policies are accessed (see above).
// Returns S_OK if action is valid; ??? if action is not valid.
EXTERN_C const IID IID_IInternetZoneManagerEx;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("A4C23339-8E06-431e-9BF4-7E711C085648")
IInternetZoneManagerEx : public IInternetZoneManager
{
public:
virtual HRESULT STDMETHODCALLTYPE GetZoneActionPolicyEx(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE SetZoneActionPolicyEx(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
};
#else /* C style interface */
typedef struct IInternetZoneManagerExVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetZoneManagerEx * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetZoneManagerEx * This);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneAttributes)
HRESULT ( STDMETHODCALLTYPE *GetZoneAttributes )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][unique][out][in] */
_Inout_ ZONEATTRIBUTES *pZoneAttributes);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneAttributes)
HRESULT ( STDMETHODCALLTYPE *SetZoneAttributes )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ ZONEATTRIBUTES *pZoneAttributes);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *GetZoneCustomPolicy )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Outptr_result_buffer_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *SetZoneCustomPolicy )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneActionPolicy)
HRESULT ( STDMETHODCALLTYPE *GetZoneActionPolicy )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneActionPolicy)
HRESULT ( STDMETHODCALLTYPE *SetZoneActionPolicy )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, PromptAction)
HRESULT ( STDMETHODCALLTYPE *PromptAction )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ HWND hwndParent,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwPromptFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, LogAction)
HRESULT ( STDMETHODCALLTYPE *LogAction )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwLogFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, CreateZoneEnumerator)
HRESULT ( STDMETHODCALLTYPE *CreateZoneEnumerator )(
IInternetZoneManagerEx * This,
/* [annotation][out] */
_Out_ DWORD *pdwEnum,
/* [annotation][out] */
_Out_ DWORD *pdwCount,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneAt)
HRESULT ( STDMETHODCALLTYPE *GetZoneAt )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwEnum,
/* [annotation][in] */
_In_ DWORD dwIndex,
/* [annotation][out] */
_Out_ DWORD *pdwZone);
DECLSPEC_XFGVIRT(IInternetZoneManager, DestroyZoneEnumerator)
HRESULT ( STDMETHODCALLTYPE *DestroyZoneEnumerator )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwEnum);
DECLSPEC_XFGVIRT(IInternetZoneManager, CopyTemplatePoliciesToZone)
HRESULT ( STDMETHODCALLTYPE *CopyTemplatePoliciesToZone )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwTemplate,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx, GetZoneActionPolicyEx)
HRESULT ( STDMETHODCALLTYPE *GetZoneActionPolicyEx )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx, SetZoneActionPolicyEx)
HRESULT ( STDMETHODCALLTYPE *SetZoneActionPolicyEx )(
IInternetZoneManagerEx * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg,
/* [annotation][in] */
_In_ DWORD dwFlags);
END_INTERFACE
} IInternetZoneManagerExVtbl;
interface IInternetZoneManagerEx
{
CONST_VTBL struct IInternetZoneManagerExVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetZoneManagerEx_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetZoneManagerEx_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetZoneManagerEx_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetZoneManagerEx_GetZoneAttributes(This,dwZone,pZoneAttributes) \
( (This)->lpVtbl -> GetZoneAttributes(This,dwZone,pZoneAttributes) )
#define IInternetZoneManagerEx_SetZoneAttributes(This,dwZone,pZoneAttributes) \
( (This)->lpVtbl -> SetZoneAttributes(This,dwZone,pZoneAttributes) )
#define IInternetZoneManagerEx_GetZoneCustomPolicy(This,dwZone,guidKey,ppPolicy,pcbPolicy,urlZoneReg) \
( (This)->lpVtbl -> GetZoneCustomPolicy(This,dwZone,guidKey,ppPolicy,pcbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx_SetZoneCustomPolicy(This,dwZone,guidKey,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> SetZoneCustomPolicy(This,dwZone,guidKey,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx_GetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> GetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx_SetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> SetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx_PromptAction(This,dwAction,hwndParent,pwszUrl,pwszText,dwPromptFlags) \
( (This)->lpVtbl -> PromptAction(This,dwAction,hwndParent,pwszUrl,pwszText,dwPromptFlags) )
#define IInternetZoneManagerEx_LogAction(This,dwAction,pwszUrl,pwszText,dwLogFlags) \
( (This)->lpVtbl -> LogAction(This,dwAction,pwszUrl,pwszText,dwLogFlags) )
#define IInternetZoneManagerEx_CreateZoneEnumerator(This,pdwEnum,pdwCount,dwFlags) \
( (This)->lpVtbl -> CreateZoneEnumerator(This,pdwEnum,pdwCount,dwFlags) )
#define IInternetZoneManagerEx_GetZoneAt(This,dwEnum,dwIndex,pdwZone) \
( (This)->lpVtbl -> GetZoneAt(This,dwEnum,dwIndex,pdwZone) )
#define IInternetZoneManagerEx_DestroyZoneEnumerator(This,dwEnum) \
( (This)->lpVtbl -> DestroyZoneEnumerator(This,dwEnum) )
#define IInternetZoneManagerEx_CopyTemplatePoliciesToZone(This,dwTemplate,dwZone,dwReserved) \
( (This)->lpVtbl -> CopyTemplatePoliciesToZone(This,dwTemplate,dwZone,dwReserved) )
#define IInternetZoneManagerEx_GetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) \
( (This)->lpVtbl -> GetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) )
#define IInternetZoneManagerEx_SetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) \
( (This)->lpVtbl -> SetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetZoneManagerEx_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0046 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
#if (_WIN32_IE >= _WIN32_IE_IE70)
#ifndef _LPINTERNETZONEMANAGEREX2_DEFINED
#define _LPINTERNETZONEMANAGEREX2_DEFINED
#define SECURITY_IE_STATE_GREEN 0x00000000
#define SECURITY_IE_STATE_RED 0x00000001
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0046_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0046_v0_0_s_ifspec;
#ifndef __IInternetZoneManagerEx2_INTERFACE_DEFINED__
#define __IInternetZoneManagerEx2_INTERFACE_DEFINED__
/* interface IInternetZoneManagerEx2 */
/* [unique][helpstring][uuid][object][local] */
// Gets the zone attributes (information in registry other than actual security
// policies associated with the zone). Zone attributes are fixed as:
// Can also verify template settings by matching current settings with security template
EXTERN_C const IID IID_IInternetZoneManagerEx2;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("EDC17559-DD5D-4846-8EEF-8BECBA5A4ABF")
IInternetZoneManagerEx2 : public IInternetZoneManagerEx
{
public:
virtual HRESULT STDMETHODCALLTYPE GetZoneAttributesEx(
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][unique][out][in] */
_Inout_ ZONEATTRIBUTES *pZoneAttributes,
/* [annotation][in] */
_In_ DWORD dwFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetZoneSecurityState(
/* [annotation][in] */
_In_ DWORD dwZoneIndex,
/* [annotation][in] */
_In_ BOOL fRespectPolicy,
/* [annotation][out][in] */
_Inout_ LPDWORD pdwState,
/* [annotation][out][in] */
_Inout_ BOOL *pfPolicyEncountered) = 0;
virtual HRESULT STDMETHODCALLTYPE GetIESecurityState(
/* [annotation][in] */
_In_ BOOL fRespectPolicy,
/* [annotation][out][in] */
_Inout_ LPDWORD pdwState,
/* [annotation][out][in] */
_Inout_ BOOL *pfPolicyEncountered,
/* [annotation][in] */
_In_ BOOL fNoCache) = 0;
virtual HRESULT STDMETHODCALLTYPE FixUnsecureSettings( void) = 0;
};
#else /* C style interface */
typedef struct IInternetZoneManagerEx2Vtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IInternetZoneManagerEx2 * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IInternetZoneManagerEx2 * This);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneAttributes)
HRESULT ( STDMETHODCALLTYPE *GetZoneAttributes )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][unique][out][in] */
_Inout_ ZONEATTRIBUTES *pZoneAttributes);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneAttributes)
HRESULT ( STDMETHODCALLTYPE *SetZoneAttributes )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ ZONEATTRIBUTES *pZoneAttributes);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *GetZoneCustomPolicy )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][size_is][out] */
_Outptr_result_buffer_(*pcbPolicy) BYTE **ppPolicy,
/* [annotation][out] */
_Out_ DWORD *pcbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneCustomPolicy)
HRESULT ( STDMETHODCALLTYPE *SetZoneCustomPolicy )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ REFGUID guidKey,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneActionPolicy)
HRESULT ( STDMETHODCALLTYPE *GetZoneActionPolicy )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, SetZoneActionPolicy)
HRESULT ( STDMETHODCALLTYPE *SetZoneActionPolicy )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg);
DECLSPEC_XFGVIRT(IInternetZoneManager, PromptAction)
HRESULT ( STDMETHODCALLTYPE *PromptAction )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ HWND hwndParent,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwPromptFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, LogAction)
HRESULT ( STDMETHODCALLTYPE *LogAction )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][in] */
_In_ LPCWSTR pwszUrl,
/* [annotation][in] */
_In_ LPCWSTR pwszText,
/* [annotation][in] */
_In_ DWORD dwLogFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, CreateZoneEnumerator)
HRESULT ( STDMETHODCALLTYPE *CreateZoneEnumerator )(
IInternetZoneManagerEx2 * This,
/* [annotation][out] */
_Out_ DWORD *pdwEnum,
/* [annotation][out] */
_Out_ DWORD *pdwCount,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManager, GetZoneAt)
HRESULT ( STDMETHODCALLTYPE *GetZoneAt )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwEnum,
/* [annotation][in] */
_In_ DWORD dwIndex,
/* [annotation][out] */
_Out_ DWORD *pdwZone);
DECLSPEC_XFGVIRT(IInternetZoneManager, DestroyZoneEnumerator)
HRESULT ( STDMETHODCALLTYPE *DestroyZoneEnumerator )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwEnum);
DECLSPEC_XFGVIRT(IInternetZoneManager, CopyTemplatePoliciesToZone)
HRESULT ( STDMETHODCALLTYPE *CopyTemplatePoliciesToZone )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwTemplate,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx, GetZoneActionPolicyEx)
HRESULT ( STDMETHODCALLTYPE *GetZoneActionPolicyEx )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][out] */
_Out_writes_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx, SetZoneActionPolicyEx)
HRESULT ( STDMETHODCALLTYPE *SetZoneActionPolicyEx )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][in] */
_In_ DWORD dwAction,
/* [annotation][size_is][in] */
_In_reads_(cbPolicy) BYTE *pPolicy,
/* [annotation][in] */
_In_ DWORD cbPolicy,
/* [annotation][in] */
_In_ URLZONEREG urlZoneReg,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx2, GetZoneAttributesEx)
HRESULT ( STDMETHODCALLTYPE *GetZoneAttributesEx )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZone,
/* [annotation][unique][out][in] */
_Inout_ ZONEATTRIBUTES *pZoneAttributes,
/* [annotation][in] */
_In_ DWORD dwFlags);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx2, GetZoneSecurityState)
HRESULT ( STDMETHODCALLTYPE *GetZoneSecurityState )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ DWORD dwZoneIndex,
/* [annotation][in] */
_In_ BOOL fRespectPolicy,
/* [annotation][out][in] */
_Inout_ LPDWORD pdwState,
/* [annotation][out][in] */
_Inout_ BOOL *pfPolicyEncountered);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx2, GetIESecurityState)
HRESULT ( STDMETHODCALLTYPE *GetIESecurityState )(
IInternetZoneManagerEx2 * This,
/* [annotation][in] */
_In_ BOOL fRespectPolicy,
/* [annotation][out][in] */
_Inout_ LPDWORD pdwState,
/* [annotation][out][in] */
_Inout_ BOOL *pfPolicyEncountered,
/* [annotation][in] */
_In_ BOOL fNoCache);
DECLSPEC_XFGVIRT(IInternetZoneManagerEx2, FixUnsecureSettings)
HRESULT ( STDMETHODCALLTYPE *FixUnsecureSettings )(
IInternetZoneManagerEx2 * This);
END_INTERFACE
} IInternetZoneManagerEx2Vtbl;
interface IInternetZoneManagerEx2
{
CONST_VTBL struct IInternetZoneManagerEx2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IInternetZoneManagerEx2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IInternetZoneManagerEx2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IInternetZoneManagerEx2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IInternetZoneManagerEx2_GetZoneAttributes(This,dwZone,pZoneAttributes) \
( (This)->lpVtbl -> GetZoneAttributes(This,dwZone,pZoneAttributes) )
#define IInternetZoneManagerEx2_SetZoneAttributes(This,dwZone,pZoneAttributes) \
( (This)->lpVtbl -> SetZoneAttributes(This,dwZone,pZoneAttributes) )
#define IInternetZoneManagerEx2_GetZoneCustomPolicy(This,dwZone,guidKey,ppPolicy,pcbPolicy,urlZoneReg) \
( (This)->lpVtbl -> GetZoneCustomPolicy(This,dwZone,guidKey,ppPolicy,pcbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx2_SetZoneCustomPolicy(This,dwZone,guidKey,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> SetZoneCustomPolicy(This,dwZone,guidKey,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx2_GetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> GetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx2_SetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) \
( (This)->lpVtbl -> SetZoneActionPolicy(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg) )
#define IInternetZoneManagerEx2_PromptAction(This,dwAction,hwndParent,pwszUrl,pwszText,dwPromptFlags) \
( (This)->lpVtbl -> PromptAction(This,dwAction,hwndParent,pwszUrl,pwszText,dwPromptFlags) )
#define IInternetZoneManagerEx2_LogAction(This,dwAction,pwszUrl,pwszText,dwLogFlags) \
( (This)->lpVtbl -> LogAction(This,dwAction,pwszUrl,pwszText,dwLogFlags) )
#define IInternetZoneManagerEx2_CreateZoneEnumerator(This,pdwEnum,pdwCount,dwFlags) \
( (This)->lpVtbl -> CreateZoneEnumerator(This,pdwEnum,pdwCount,dwFlags) )
#define IInternetZoneManagerEx2_GetZoneAt(This,dwEnum,dwIndex,pdwZone) \
( (This)->lpVtbl -> GetZoneAt(This,dwEnum,dwIndex,pdwZone) )
#define IInternetZoneManagerEx2_DestroyZoneEnumerator(This,dwEnum) \
( (This)->lpVtbl -> DestroyZoneEnumerator(This,dwEnum) )
#define IInternetZoneManagerEx2_CopyTemplatePoliciesToZone(This,dwTemplate,dwZone,dwReserved) \
( (This)->lpVtbl -> CopyTemplatePoliciesToZone(This,dwTemplate,dwZone,dwReserved) )
#define IInternetZoneManagerEx2_GetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) \
( (This)->lpVtbl -> GetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) )
#define IInternetZoneManagerEx2_SetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) \
( (This)->lpVtbl -> SetZoneActionPolicyEx(This,dwZone,dwAction,pPolicy,cbPolicy,urlZoneReg,dwFlags) )
#define IInternetZoneManagerEx2_GetZoneAttributesEx(This,dwZone,pZoneAttributes,dwFlags) \
( (This)->lpVtbl -> GetZoneAttributesEx(This,dwZone,pZoneAttributes,dwFlags) )
#define IInternetZoneManagerEx2_GetZoneSecurityState(This,dwZoneIndex,fRespectPolicy,pdwState,pfPolicyEncountered) \
( (This)->lpVtbl -> GetZoneSecurityState(This,dwZoneIndex,fRespectPolicy,pdwState,pfPolicyEncountered) )
#define IInternetZoneManagerEx2_GetIESecurityState(This,fRespectPolicy,pdwState,pfPolicyEncountered,fNoCache) \
( (This)->lpVtbl -> GetIESecurityState(This,fRespectPolicy,pdwState,pfPolicyEncountered,fNoCache) )
#define IInternetZoneManagerEx2_FixUnsecureSettings(This) \
( (This)->lpVtbl -> FixUnsecureSettings(This) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IInternetZoneManagerEx2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0047 */
/* [local] */
#endif
#endif //(_WIN32_IE >= _WIN32_IE_IE70)
EXTERN_C const IID CLSID_SoftDistExt;
#ifndef _LPSOFTDISTEXT_DEFINED
#define _LPSOFTDISTEXT_DEFINED
#define SOFTDIST_FLAG_USAGE_EMAIL 0x00000001
#define SOFTDIST_FLAG_USAGE_PRECACHE 0x00000002
#define SOFTDIST_FLAG_USAGE_AUTOINSTALL 0x00000004
#define SOFTDIST_FLAG_DELETE_SUBSCRIPTION 0x00000008
#define SOFTDIST_ADSTATE_NONE 0x00000000
#define SOFTDIST_ADSTATE_AVAILABLE 0x00000001
#define SOFTDIST_ADSTATE_DOWNLOADED 0x00000002
#define SOFTDIST_ADSTATE_INSTALLED 0x00000003
typedef struct _tagCODEBASEHOLD
{
ULONG cbSize;
LPWSTR szDistUnit;
LPWSTR szCodeBase;
DWORD dwVersionMS;
DWORD dwVersionLS;
DWORD dwStyle;
} CODEBASEHOLD;
typedef struct _tagCODEBASEHOLD *LPCODEBASEHOLD;
typedef struct _tagSOFTDISTINFO
{
ULONG cbSize;
DWORD dwFlags;
DWORD dwAdState;
LPWSTR szTitle;
LPWSTR szAbstract;
LPWSTR szHREF;
DWORD dwInstalledVersionMS;
DWORD dwInstalledVersionLS;
DWORD dwUpdateVersionMS;
DWORD dwUpdateVersionLS;
DWORD dwAdvertisedVersionMS;
DWORD dwAdvertisedVersionLS;
DWORD dwReserved;
} SOFTDISTINFO;
typedef struct _tagSOFTDISTINFO *LPSOFTDISTINFO;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0047_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0047_v0_0_s_ifspec;
#ifndef __ISoftDistExt_INTERFACE_DEFINED__
#define __ISoftDistExt_INTERFACE_DEFINED__
/* interface ISoftDistExt */
/* [unique][helpstring][uuid][object][local] */
EXTERN_C const IID IID_ISoftDistExt;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("B15B8DC1-C7E1-11d0-8680-00AA00BDCB71")
ISoftDistExt : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE ProcessSoftDist(
/* [annotation][in] */
_In_ LPCWSTR szCDFURL,
/* [annotation][in] */
_In_ IXMLElement *pSoftDistElement,
/* [annotation][out][in] */
_Inout_ LPSOFTDISTINFO lpsdi) = 0;
virtual HRESULT STDMETHODCALLTYPE GetFirstCodeBase(
/* [annotation][in] */
__RPC__in LPWSTR *szCodeBase,
/* [annotation][in] */
_In_ LPDWORD dwMaxSize) = 0;
virtual HRESULT STDMETHODCALLTYPE GetNextCodeBase(
/* [annotation][in] */
__RPC__in LPWSTR *szCodeBase,
/* [annotation][in] */
_In_ LPDWORD dwMaxSize) = 0;
virtual HRESULT STDMETHODCALLTYPE AsyncInstallDistributionUnit(
/* [annotation][in] */
_In_ IBindCtx *pbc,
/* [annotation][in] */
_In_ LPVOID pvReserved,
/* [annotation][in] */
_In_ DWORD flags,
/* [annotation][in] */
_In_ LPCODEBASEHOLD lpcbh) = 0;
};
#else /* C style interface */
typedef struct ISoftDistExtVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ISoftDistExt * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ISoftDistExt * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ISoftDistExt * This);
DECLSPEC_XFGVIRT(ISoftDistExt, ProcessSoftDist)
HRESULT ( STDMETHODCALLTYPE *ProcessSoftDist )(
ISoftDistExt * This,
/* [annotation][in] */
_In_ LPCWSTR szCDFURL,
/* [annotation][in] */
_In_ IXMLElement *pSoftDistElement,
/* [annotation][out][in] */
_Inout_ LPSOFTDISTINFO lpsdi);
DECLSPEC_XFGVIRT(ISoftDistExt, GetFirstCodeBase)
HRESULT ( STDMETHODCALLTYPE *GetFirstCodeBase )(
ISoftDistExt * This,
/* [annotation][in] */
__RPC__in LPWSTR *szCodeBase,
/* [annotation][in] */
_In_ LPDWORD dwMaxSize);
DECLSPEC_XFGVIRT(ISoftDistExt, GetNextCodeBase)
HRESULT ( STDMETHODCALLTYPE *GetNextCodeBase )(
ISoftDistExt * This,
/* [annotation][in] */
__RPC__in LPWSTR *szCodeBase,
/* [annotation][in] */
_In_ LPDWORD dwMaxSize);
DECLSPEC_XFGVIRT(ISoftDistExt, AsyncInstallDistributionUnit)
HRESULT ( STDMETHODCALLTYPE *AsyncInstallDistributionUnit )(
ISoftDistExt * This,
/* [annotation][in] */
_In_ IBindCtx *pbc,
/* [annotation][in] */
_In_ LPVOID pvReserved,
/* [annotation][in] */
_In_ DWORD flags,
/* [annotation][in] */
_In_ LPCODEBASEHOLD lpcbh);
END_INTERFACE
} ISoftDistExtVtbl;
interface ISoftDistExt
{
CONST_VTBL struct ISoftDistExtVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ISoftDistExt_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ISoftDistExt_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ISoftDistExt_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ISoftDistExt_ProcessSoftDist(This,szCDFURL,pSoftDistElement,lpsdi) \
( (This)->lpVtbl -> ProcessSoftDist(This,szCDFURL,pSoftDistElement,lpsdi) )
#define ISoftDistExt_GetFirstCodeBase(This,szCodeBase,dwMaxSize) \
( (This)->lpVtbl -> GetFirstCodeBase(This,szCodeBase,dwMaxSize) )
#define ISoftDistExt_GetNextCodeBase(This,szCodeBase,dwMaxSize) \
( (This)->lpVtbl -> GetNextCodeBase(This,szCodeBase,dwMaxSize) )
#define ISoftDistExt_AsyncInstallDistributionUnit(This,pbc,pvReserved,flags,lpcbh) \
( (This)->lpVtbl -> AsyncInstallDistributionUnit(This,pbc,pvReserved,flags,lpcbh) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ISoftDistExt_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0048 */
/* [local] */
STDAPI GetSoftwareUpdateInfo( LPCWSTR szDistUnit, _Out_ LPSOFTDISTINFO psdi );
STDAPI SetSoftwareUpdateAdvertisementState( LPCWSTR szDistUnit, DWORD dwAdState, DWORD dwAdvertisedVersionMS, DWORD dwAdvertisedVersionLS );
#endif
#ifndef _LPCATALOGFILEINFO_DEFINED
#define _LPCATALOGFILEINFO_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0048_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0048_v0_0_s_ifspec;
#ifndef __ICatalogFileInfo_INTERFACE_DEFINED__
#define __ICatalogFileInfo_INTERFACE_DEFINED__
/* interface ICatalogFileInfo */
/* [unique][uuid][object][local] */
typedef /* [unique] */ ICatalogFileInfo *LPCATALOGFILEINFO;
EXTERN_C const IID IID_ICatalogFileInfo;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("711C7600-6B48-11d1-B403-00AA00B92AF1")
ICatalogFileInfo : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetCatalogFile(
/* [annotation][out] */
__RPC__out LPSTR *ppszCatalogFile) = 0;
virtual HRESULT STDMETHODCALLTYPE GetJavaTrust(
/* [annotation][out] */
_Out_ void **ppJavaTrust) = 0;
};
#else /* C style interface */
typedef struct ICatalogFileInfoVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICatalogFileInfo * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICatalogFileInfo * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICatalogFileInfo * This);
DECLSPEC_XFGVIRT(ICatalogFileInfo, GetCatalogFile)
HRESULT ( STDMETHODCALLTYPE *GetCatalogFile )(
ICatalogFileInfo * This,
/* [annotation][out] */
__RPC__out LPSTR *ppszCatalogFile);
DECLSPEC_XFGVIRT(ICatalogFileInfo, GetJavaTrust)
HRESULT ( STDMETHODCALLTYPE *GetJavaTrust )(
ICatalogFileInfo * This,
/* [annotation][out] */
_Out_ void **ppJavaTrust);
END_INTERFACE
} ICatalogFileInfoVtbl;
interface ICatalogFileInfo
{
CONST_VTBL struct ICatalogFileInfoVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define ICatalogFileInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define ICatalogFileInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define ICatalogFileInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define ICatalogFileInfo_GetCatalogFile(This,ppszCatalogFile) \
( (This)->lpVtbl -> GetCatalogFile(This,ppszCatalogFile) )
#define ICatalogFileInfo_GetJavaTrust(This,ppJavaTrust) \
( (This)->lpVtbl -> GetJavaTrust(This,ppJavaTrust) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __ICatalogFileInfo_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0049 */
/* [local] */
#endif
#ifndef _LPDATAFILTER_DEFINED
#define _LPDATAFILTER_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0049_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0049_v0_0_s_ifspec;
#ifndef __IDataFilter_INTERFACE_DEFINED__
#define __IDataFilter_INTERFACE_DEFINED__
/* interface IDataFilter */
/* [unique][uuid][object] */
typedef /* [unique] */ __RPC_unique_pointer IDataFilter *LPDATAFILTER;
EXTERN_C const IID IID_IDataFilter;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("69d14c80-c18e-11d0-a9ce-006097942311")
IDataFilter : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE DoEncode(
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ LONG lInBufferSize,
/* [annotation][size_is][in] */
_In_reads_(lInBufferSize) BYTE *pbInBuffer,
/* [annotation][in] */
_In_ LONG lOutBufferSize,
/* [annotation][size_is][out] */
_Out_writes_(lOutBufferSize) BYTE *pbOutBuffer,
/* [annotation][in] */
_In_ LONG lInBytesAvailable,
/* [annotation][out] */
_Out_ LONG *plInBytesRead,
/* [annotation][out] */
_Out_ LONG *plOutBytesWritten,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE DoDecode(
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ LONG lInBufferSize,
/* [annotation][size_is][in] */
_In_reads_(lInBufferSize) BYTE *pbInBuffer,
/* [annotation][in] */
_In_ LONG lOutBufferSize,
/* [annotation][size_is][out] */
_Out_writes_(lOutBufferSize) BYTE *pbOutBuffer,
/* [annotation][in] */
_In_ LONG lInBytesAvailable,
/* [annotation][out] */
_Out_ LONG *plInBytesRead,
/* [annotation][out] */
_Out_ LONG *plOutBytesWritten,
/* [annotation][in] */
_In_ DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE SetEncodingLevel(
/* [annotation][in] */
_In_ DWORD dwEncLevel) = 0;
};
#else /* C style interface */
typedef struct IDataFilterVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IDataFilter * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IDataFilter * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IDataFilter * This);
DECLSPEC_XFGVIRT(IDataFilter, DoEncode)
HRESULT ( STDMETHODCALLTYPE *DoEncode )(
__RPC__in IDataFilter * This,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ LONG lInBufferSize,
/* [annotation][size_is][in] */
_In_reads_(lInBufferSize) BYTE *pbInBuffer,
/* [annotation][in] */
_In_ LONG lOutBufferSize,
/* [annotation][size_is][out] */
_Out_writes_(lOutBufferSize) BYTE *pbOutBuffer,
/* [annotation][in] */
_In_ LONG lInBytesAvailable,
/* [annotation][out] */
_Out_ LONG *plInBytesRead,
/* [annotation][out] */
_Out_ LONG *plOutBytesWritten,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IDataFilter, DoDecode)
HRESULT ( STDMETHODCALLTYPE *DoDecode )(
__RPC__in IDataFilter * This,
/* [annotation][in] */
_In_ DWORD dwFlags,
/* [annotation][in] */
_In_ LONG lInBufferSize,
/* [annotation][size_is][in] */
_In_reads_(lInBufferSize) BYTE *pbInBuffer,
/* [annotation][in] */
_In_ LONG lOutBufferSize,
/* [annotation][size_is][out] */
_Out_writes_(lOutBufferSize) BYTE *pbOutBuffer,
/* [annotation][in] */
_In_ LONG lInBytesAvailable,
/* [annotation][out] */
_Out_ LONG *plInBytesRead,
/* [annotation][out] */
_Out_ LONG *plOutBytesWritten,
/* [annotation][in] */
_In_ DWORD dwReserved);
DECLSPEC_XFGVIRT(IDataFilter, SetEncodingLevel)
HRESULT ( STDMETHODCALLTYPE *SetEncodingLevel )(
__RPC__in IDataFilter * This,
/* [annotation][in] */
_In_ DWORD dwEncLevel);
END_INTERFACE
} IDataFilterVtbl;
interface IDataFilter
{
CONST_VTBL struct IDataFilterVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IDataFilter_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IDataFilter_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IDataFilter_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IDataFilter_DoEncode(This,dwFlags,lInBufferSize,pbInBuffer,lOutBufferSize,pbOutBuffer,lInBytesAvailable,plInBytesRead,plOutBytesWritten,dwReserved) \
( (This)->lpVtbl -> DoEncode(This,dwFlags,lInBufferSize,pbInBuffer,lOutBufferSize,pbOutBuffer,lInBytesAvailable,plInBytesRead,plOutBytesWritten,dwReserved) )
#define IDataFilter_DoDecode(This,dwFlags,lInBufferSize,pbInBuffer,lOutBufferSize,pbOutBuffer,lInBytesAvailable,plInBytesRead,plOutBytesWritten,dwReserved) \
( (This)->lpVtbl -> DoDecode(This,dwFlags,lInBufferSize,pbInBuffer,lOutBufferSize,pbOutBuffer,lInBytesAvailable,plInBytesRead,plOutBytesWritten,dwReserved) )
#define IDataFilter_SetEncodingLevel(This,dwEncLevel) \
( (This)->lpVtbl -> SetEncodingLevel(This,dwEncLevel) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IDataFilter_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0050 */
/* [local] */
#endif
#ifndef _LPENCODINGFILTERFACTORY_DEFINED
#define _LPENCODINGFILTERFACTORY_DEFINED
typedef struct _tagPROTOCOLFILTERDATA
{
DWORD cbSize;
IInternetProtocolSink *pProtocolSink;
IInternetProtocol *pProtocol;
IUnknown *pUnk;
DWORD dwFilterFlags;
} PROTOCOLFILTERDATA;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0050_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0050_v0_0_s_ifspec;
#ifndef __IEncodingFilterFactory_INTERFACE_DEFINED__
#define __IEncodingFilterFactory_INTERFACE_DEFINED__
/* interface IEncodingFilterFactory */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IEncodingFilterFactory *LPENCODINGFILTERFACTORY;
typedef struct _tagDATAINFO
{
ULONG ulTotalSize;
ULONG ulavrPacketSize;
ULONG ulConnectSpeed;
ULONG ulProcessorSpeed;
} DATAINFO;
EXTERN_C const IID IID_IEncodingFilterFactory;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("70bdde00-c18e-11d0-a9ce-006097942311")
IEncodingFilterFactory : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE FindBestFilter(
/* [annotation][in] */
_In_ LPCWSTR pwzCodeIn,
/* [annotation][in] */
_In_ LPCWSTR pwzCodeOut,
/* [annotation][in] */
_In_ DATAINFO info,
/* [annotation][out] */
_Out_ IDataFilter **ppDF) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDefaultFilter(
/* [annotation][in] */
_In_ LPCWSTR pwzCodeIn,
/* [annotation][in] */
_In_ LPCWSTR pwzCodeOut,
/* [annotation][out] */
_Out_ IDataFilter **ppDF) = 0;
};
#else /* C style interface */
typedef struct IEncodingFilterFactoryVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IEncodingFilterFactory * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IEncodingFilterFactory * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IEncodingFilterFactory * This);
DECLSPEC_XFGVIRT(IEncodingFilterFactory, FindBestFilter)
HRESULT ( STDMETHODCALLTYPE *FindBestFilter )(
IEncodingFilterFactory * This,
/* [annotation][in] */
_In_ LPCWSTR pwzCodeIn,
/* [annotation][in] */
_In_ LPCWSTR pwzCodeOut,
/* [annotation][in] */
_In_ DATAINFO info,
/* [annotation][out] */
_Out_ IDataFilter **ppDF);
DECLSPEC_XFGVIRT(IEncodingFilterFactory, GetDefaultFilter)
HRESULT ( STDMETHODCALLTYPE *GetDefaultFilter )(
IEncodingFilterFactory * This,
/* [annotation][in] */
_In_ LPCWSTR pwzCodeIn,
/* [annotation][in] */
_In_ LPCWSTR pwzCodeOut,
/* [annotation][out] */
_Out_ IDataFilter **ppDF);
END_INTERFACE
} IEncodingFilterFactoryVtbl;
interface IEncodingFilterFactory
{
CONST_VTBL struct IEncodingFilterFactoryVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEncodingFilterFactory_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IEncodingFilterFactory_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IEncodingFilterFactory_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IEncodingFilterFactory_FindBestFilter(This,pwzCodeIn,pwzCodeOut,info,ppDF) \
( (This)->lpVtbl -> FindBestFilter(This,pwzCodeIn,pwzCodeOut,info,ppDF) )
#define IEncodingFilterFactory_GetDefaultFilter(This,pwzCodeIn,pwzCodeOut,ppDF) \
( (This)->lpVtbl -> GetDefaultFilter(This,pwzCodeIn,pwzCodeOut,ppDF) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IEncodingFilterFactory_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0051 */
/* [local] */
#endif
#ifndef _HITLOGGING_DEFINED
#define _HITLOGGING_DEFINED
// Logging-specific apis
BOOL WINAPI IsLoggingEnabledA(_In_ LPCSTR pszUrl);
BOOL WINAPI IsLoggingEnabledW(_In_ LPCWSTR pwszUrl);
#ifdef UNICODE
#define IsLoggingEnabled IsLoggingEnabledW
#else
#define IsLoggingEnabled IsLoggingEnabledA
#endif // !UNICODE
typedef struct _tagHIT_LOGGING_INFO
{
DWORD dwStructSize;
LPSTR lpszLoggedUrlName;
SYSTEMTIME StartTime;
SYSTEMTIME EndTime;
LPSTR lpszExtendedInfo;
} HIT_LOGGING_INFO;
typedef struct _tagHIT_LOGGING_INFO *LPHIT_LOGGING_INFO;
BOOL WINAPI WriteHitLogging(_In_ LPHIT_LOGGING_INFO lpLogginginfo);
#define CONFIRMSAFETYACTION_LOADOBJECT 0x00000001
struct CONFIRMSAFETY
{
CLSID clsid;
IUnknown *pUnk;
DWORD dwFlags;
} ;
EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY;
#endif
#ifndef _LPIWRAPPEDPROTOCOL_DEFINED
#define _LPIWRAPPEDPROTOCOL_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0051_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0051_v0_0_s_ifspec;
#ifndef __IWrappedProtocol_INTERFACE_DEFINED__
#define __IWrappedProtocol_INTERFACE_DEFINED__
/* interface IWrappedProtocol */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IWrappedProtocol *LPIWRAPPEDPROTOCOL;
EXTERN_C const IID IID_IWrappedProtocol;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("53c84785-8425-4dc5-971b-e58d9c19f9b6")
IWrappedProtocol : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetWrapperCode(
/* [annotation][out] */
_Out_ LONG *pnCode,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved) = 0;
};
#else /* C style interface */
typedef struct IWrappedProtocolVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IWrappedProtocol * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IWrappedProtocol * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IWrappedProtocol * This);
DECLSPEC_XFGVIRT(IWrappedProtocol, GetWrapperCode)
HRESULT ( STDMETHODCALLTYPE *GetWrapperCode )(
IWrappedProtocol * This,
/* [annotation][out] */
_Out_ LONG *pnCode,
/* [annotation][in] */
_In_ DWORD_PTR dwReserved);
END_INTERFACE
} IWrappedProtocolVtbl;
interface IWrappedProtocol
{
CONST_VTBL struct IWrappedProtocolVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IWrappedProtocol_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IWrappedProtocol_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IWrappedProtocol_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IWrappedProtocol_GetWrapperCode(This,pnCode,dwReserved) \
( (This)->lpVtbl -> GetWrapperCode(This,pnCode,dwReserved) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IWrappedProtocol_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0052 */
/* [local] */
#endif
#ifndef _LPGETBINDHANDLE_DEFINED
#define _LPGETBINDHANDLE_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0052_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0052_v0_0_s_ifspec;
#ifndef __IGetBindHandle_INTERFACE_DEFINED__
#define __IGetBindHandle_INTERFACE_DEFINED__
/* interface IGetBindHandle */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IGetBindHandle *LPGETBINDHANDLE;
typedef /* [public][public] */
enum __MIDL_IGetBindHandle_0001
{
BINDHANDLETYPES_APPCACHE = 0,
BINDHANDLETYPES_DEPENDENCY = 0x1,
BINDHANDLETYPES_COUNT = ( BINDHANDLETYPES_DEPENDENCY + 1 )
} BINDHANDLETYPES;
EXTERN_C const IID IID_IGetBindHandle;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("AF0FF408-129D-4b20-91F0-02BD23D88352")
IGetBindHandle : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetBindHandle(
/* [annotation][in] */
_In_ BINDHANDLETYPES enumRequestedHandle,
/* [annotation][out] */
_Out_ HANDLE *pRetHandle) = 0;
};
#else /* C style interface */
typedef struct IGetBindHandleVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IGetBindHandle * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IGetBindHandle * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IGetBindHandle * This);
DECLSPEC_XFGVIRT(IGetBindHandle, GetBindHandle)
HRESULT ( STDMETHODCALLTYPE *GetBindHandle )(
IGetBindHandle * This,
/* [annotation][in] */
_In_ BINDHANDLETYPES enumRequestedHandle,
/* [annotation][out] */
_Out_ HANDLE *pRetHandle);
END_INTERFACE
} IGetBindHandleVtbl;
interface IGetBindHandle
{
CONST_VTBL struct IGetBindHandleVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IGetBindHandle_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IGetBindHandle_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IGetBindHandle_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IGetBindHandle_GetBindHandle(This,enumRequestedHandle,pRetHandle) \
( (This)->lpVtbl -> GetBindHandle(This,enumRequestedHandle,pRetHandle) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IGetBindHandle_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0053 */
/* [local] */
#endif
#ifndef _XHRPLUGGABLEPROTOCOL_DEFINED
#define _XHRPLUGGABLEPROTOCOL_DEFINED
typedef struct _tagPROTOCOL_ARGUMENT
{
LPCWSTR szMethod;
LPCWSTR szTargetUrl;
} PROTOCOL_ARGUMENT;
typedef struct _tagPROTOCOL_ARGUMENT *LPPROTOCOL_ARGUMENT;
#endif
#ifndef _LPBINDCALLBACKREDIRECT_DEFINED
#define _LPBINDCALLBACKREDIRECT_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0053_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0053_v0_0_s_ifspec;
#ifndef __IBindCallbackRedirect_INTERFACE_DEFINED__
#define __IBindCallbackRedirect_INTERFACE_DEFINED__
/* interface IBindCallbackRedirect */
/* [unique][uuid][object][local] */
typedef /* [unique] */ IBindCallbackRedirect *LPBINDCALLBACKREDIRECT;
EXTERN_C const IID IID_IBindCallbackRedirect;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("11C81BC2-121E-4ed5-B9C4-B430BD54F2C0")
IBindCallbackRedirect : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE Redirect(
/* [annotation][in] */
_In_ LPCWSTR lpcUrl,
/* [annotation][out] */
_Out_ VARIANT_BOOL *vbCancel) = 0;
};
#else /* C style interface */
typedef struct IBindCallbackRedirectVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IBindCallbackRedirect * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IBindCallbackRedirect * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IBindCallbackRedirect * This);
DECLSPEC_XFGVIRT(IBindCallbackRedirect, Redirect)
HRESULT ( STDMETHODCALLTYPE *Redirect )(
IBindCallbackRedirect * This,
/* [annotation][in] */
_In_ LPCWSTR lpcUrl,
/* [annotation][out] */
_Out_ VARIANT_BOOL *vbCancel);
END_INTERFACE
} IBindCallbackRedirectVtbl;
interface IBindCallbackRedirect
{
CONST_VTBL struct IBindCallbackRedirectVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBindCallbackRedirect_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBindCallbackRedirect_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBindCallbackRedirect_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBindCallbackRedirect_Redirect(This,lpcUrl,vbCancel) \
( (This)->lpVtbl -> Redirect(This,lpcUrl,vbCancel) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBindCallbackRedirect_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0054 */
/* [local] */
#endif
#ifndef _LPIBINDHTTPSECURITY_DEFINED
#define _LPIBINDHTTPSECURITY_DEFINED
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0054_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0054_v0_0_s_ifspec;
#ifndef __IBindHttpSecurity_INTERFACE_DEFINED__
#define __IBindHttpSecurity_INTERFACE_DEFINED__
/* interface IBindHttpSecurity */
/* [helpstring][uuid][object] */
EXTERN_C const IID IID_IBindHttpSecurity;
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a9eda967-f50e-4a33-b358-206f6ef3086d")
IBindHttpSecurity : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE GetIgnoreCertMask(
/* [ref][out] */ __RPC__out DWORD *pdwIgnoreCertMask) = 0;
};
#else /* C style interface */
typedef struct IBindHttpSecurityVtbl
{
BEGIN_INTERFACE
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
__RPC__in IBindHttpSecurity * This,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
__RPC__in IBindHttpSecurity * This);
DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
__RPC__in IBindHttpSecurity * This);
DECLSPEC_XFGVIRT(IBindHttpSecurity, GetIgnoreCertMask)
HRESULT ( STDMETHODCALLTYPE *GetIgnoreCertMask )(
__RPC__in IBindHttpSecurity * This,
/* [ref][out] */ __RPC__out DWORD *pdwIgnoreCertMask);
END_INTERFACE
} IBindHttpSecurityVtbl;
interface IBindHttpSecurity
{
CONST_VTBL struct IBindHttpSecurityVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IBindHttpSecurity_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
#define IBindHttpSecurity_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
#define IBindHttpSecurity_Release(This) \
( (This)->lpVtbl -> Release(This) )
#define IBindHttpSecurity_GetIgnoreCertMask(This,pdwIgnoreCertMask) \
( (This)->lpVtbl -> GetIgnoreCertMask(This,pdwIgnoreCertMask) )
#endif /* COBJMACROS */
#endif /* C style interface */
#endif /* __IBindHttpSecurity_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_urlmon_0000_0055 */
/* [local] */
#endif
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0055_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_urlmon_0000_0055_v0_0_s_ifspec;
/* Additional Prototypes for ALL interfaces */
unsigned long __RPC_USER BSTR_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER HWND_UserSize( __RPC__in unsigned long *, unsigned long , __RPC__in HWND * );
unsigned char * __RPC_USER HWND_UserMarshal( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in HWND * );
unsigned char * __RPC_USER HWND_UserUnmarshal(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out HWND * );
void __RPC_USER HWND_UserFree( __RPC__in unsigned long *, __RPC__in HWND * );
unsigned long __RPC_USER BSTR_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in BSTR * );
unsigned char * __RPC_USER BSTR_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out BSTR * );
void __RPC_USER BSTR_UserFree64( __RPC__in unsigned long *, __RPC__in BSTR * );
unsigned long __RPC_USER HWND_UserSize64( __RPC__in unsigned long *, unsigned long , __RPC__in HWND * );
unsigned char * __RPC_USER HWND_UserMarshal64( __RPC__in unsigned long *, __RPC__inout_xcount(0) unsigned char *, __RPC__in HWND * );
unsigned char * __RPC_USER HWND_UserUnmarshal64(__RPC__in unsigned long *, __RPC__in_xcount(0) unsigned char *, __RPC__out HWND * );
void __RPC_USER HWND_UserFree64( __RPC__in unsigned long *, __RPC__in HWND * );
/* [local] */ HRESULT STDMETHODCALLTYPE IBinding_GetBindResult_Proxy(
IBinding * This,
/* [annotation][out] */
_Out_ CLSID *pclsidProtocol,
/* [annotation][out] */
_Out_ DWORD *pdwResult,
/* [annotation][out] */
__RPC__out LPOLESTR *pszResult,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBinding_GetBindResult_Stub(
__RPC__in IBinding * This,
/* [annotation][out] */
_Out_ CLSID *pclsidProtocol,
/* [annotation][out] */
_Out_ DWORD *pdwResult,
/* [annotation][out] */
_Out_ LPOLESTR *pszResult,
/* [annotation][in] */
_In_ DWORD dwReserved);
/* [local] */ HRESULT STDMETHODCALLTYPE IBindStatusCallback_GetBindInfo_Proxy(
IBindStatusCallback * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindStatusCallback_GetBindInfo_Stub(
__RPC__in IBindStatusCallback * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ RemBINDINFO *pbindinfo,
/* [annotation][unique][out][in] */
_Inout_ RemSTGMEDIUM *pstgmed);
/* [local] */ HRESULT STDMETHODCALLTYPE IBindStatusCallback_OnDataAvailable_Proxy(
IBindStatusCallback * This,
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ DWORD dwSize,
/* [annotation][in] */
_In_ FORMATETC *pformatetc,
/* [annotation][in] */
_In_ STGMEDIUM *pstgmed);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindStatusCallback_OnDataAvailable_Stub(
__RPC__in IBindStatusCallback * This,
/* [annotation][in] */
_In_ DWORD grfBSCF,
/* [annotation][in] */
_In_ DWORD dwSize,
/* [annotation][in] */
_In_ RemFORMATETC *pformatetc,
/* [annotation][in] */
_In_ RemSTGMEDIUM *pstgmed);
/* [local] */ HRESULT STDMETHODCALLTYPE IBindStatusCallbackEx_GetBindInfoEx_Proxy(
IBindStatusCallbackEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ BINDINFO *pbindinfo,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindStatusCallbackEx_GetBindInfoEx_Stub(
__RPC__in IBindStatusCallbackEx * This,
/* [annotation][out] */
_Out_ DWORD *grfBINDF,
/* [annotation][unique][out][in] */
_Inout_ RemBINDINFO *pbindinfo,
/* [annotation][unique][out][in] */
_Inout_ RemSTGMEDIUM *pstgmed,
/* [annotation][out] */
_Out_ DWORD *grfBINDF2,
/* [annotation][out] */
_Out_ DWORD *pdwReserved);
/* [local] */ HRESULT STDMETHODCALLTYPE IWinInetInfo_QueryOption_Proxy(
IWinInetInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IWinInetInfo_QueryOption_Stub(
__RPC__in IWinInetInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) BYTE *pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf);
/* [local] */ HRESULT STDMETHODCALLTYPE IWinInetHttpInfo_QueryInfo_Proxy(
IWinInetHttpInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) LPVOID pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][out][in] */
_Inout_ DWORD *pdwFlags,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IWinInetHttpInfo_QueryInfo_Stub(
__RPC__in IWinInetHttpInfo * This,
/* [annotation][in] */
_In_ DWORD dwOption,
/* [annotation][size_is][out][in] */
_Inout_updates_(*pcbBuf) BYTE *pBuffer,
/* [annotation][out][in] */
_Inout_ DWORD *pcbBuf,
/* [annotation][out][in] */
_Inout_ DWORD *pdwFlags,
/* [annotation][out][in] */
_Inout_ DWORD *pdwReserved);
/* [local] */ HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToStorage_Proxy(
IBindHost * This,
/* [annotation][in] */
_In_ IMoniker *pMk,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][out] */
_Out_ void **ppvObj);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToStorage_Stub(
__RPC__in IBindHost * This,
/* [annotation][unique][in] */
_In_ IMoniker *pMk,
/* [annotation][unique][in] */
_In_ IBindCtx *pBC,
/* [annotation][unique][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ IUnknown **ppvObj);
/* [local] */ HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToObject_Proxy(
IBindHost * This,
/* [annotation][in] */
_In_ IMoniker *pMk,
/* [annotation][in] */
_In_ IBindCtx *pBC,
/* [annotation][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][out] */
_Out_ void **ppvObj);
/* [call_as] */ HRESULT STDMETHODCALLTYPE IBindHost_MonikerBindToObject_Stub(
__RPC__in IBindHost * This,
/* [annotation][unique][in] */
_In_ IMoniker *pMk,
/* [annotation][unique][in] */
_In_ IBindCtx *pBC,
/* [annotation][unique][in] */
_In_ IBindStatusCallback *pBSC,
/* [annotation][in] */
_In_ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ IUnknown **ppvObj);
/* end of Additional Prototypes */
#ifdef __cplusplus
}
#endif
#endif
|
e54383fe273284fd183987c8e31b23586f32157d
|
7a04823ffd4d902dd37138972b59f52c8be52c81
|
/DirectX/VisualStudio/Quantum/Library/Materials/SpotLightMaterial.cpp
|
8cc5a9c36bb7d326b3665efa7f2ad773c835aec7
|
[] |
no_license
|
DarriusWright/Capstone_WrightD
|
d5f8b3651f52ec773b8442905177e0f72b66147e
|
a15741a120c8bd1567a09c4225555ef809e18562
|
refs/heads/master
| 2020-05-01T08:21:07.415036
| 2014-10-07T20:14:21
| 2014-10-07T20:14:21
| 24,615,888
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,764
|
cpp
|
SpotLightMaterial.cpp
|
#include "SpotLightMaterial.h"
#include <Effects\Effect.h>
#include <3DObjects\Mesh.h>
#include <3DObjects\Model.h>
#include <Exceptions\GameException.h>
namespace Library
{
RTTI_DEFINITIONS(SpotLightMaterial);
SpotLightMaterial::SpotLightMaterial() : Material("main11"),
MATERIAL_VARIABLE_INITIALIZATION(AmbientColor),
MATERIAL_VARIABLE_INITIALIZATION(LightColor),
MATERIAL_VARIABLE_INITIALIZATION(LightPosition),
MATERIAL_VARIABLE_INITIALIZATION(LightLookAt),
MATERIAL_VARIABLE_INITIALIZATION(LightRadius),
MATERIAL_VARIABLE_INITIALIZATION(SpotLightInnerAngle),
MATERIAL_VARIABLE_INITIALIZATION(SpotLightOuterAngle),
MATERIAL_VARIABLE_INITIALIZATION(CameraPosition),
MATERIAL_VARIABLE_INITIALIZATION(WorldViewProjection),
MATERIAL_VARIABLE_INITIALIZATION(World),
MATERIAL_VARIABLE_INITIALIZATION(SpecularColor),
MATERIAL_VARIABLE_INITIALIZATION(SpecularPower),
MATERIAL_VARIABLE_INITIALIZATION(ColorTexture)
{
}
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, AmbientColor);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, LightColor);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, LightPosition);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, LightLookAt);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, LightRadius);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, SpotLightInnerAngle);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, SpotLightOuterAngle);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, CameraPosition);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, WorldViewProjection);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, World);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, SpecularColor);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, SpecularPower);
MATERIAL_VARIABLE_DEFINITION(SpotLightMaterial, ColorTexture);
SpotLightMaterial::~SpotLightMaterial()
{
}
void SpotLightMaterial::initialize(Effect * effect)
{
Material::initialize(effect);
MATERIAL_VARIABLE_RETRIEVE(AmbientColor);
MATERIAL_VARIABLE_RETRIEVE(LightColor);
MATERIAL_VARIABLE_RETRIEVE(LightPosition);
MATERIAL_VARIABLE_RETRIEVE(LightRadius);
MATERIAL_VARIABLE_RETRIEVE(SpotLightInnerAngle);
MATERIAL_VARIABLE_RETRIEVE(SpotLightOuterAngle);
MATERIAL_VARIABLE_RETRIEVE(CameraPosition);
MATERIAL_VARIABLE_RETRIEVE(WorldViewProjection);
MATERIAL_VARIABLE_RETRIEVE(World);
MATERIAL_VARIABLE_RETRIEVE(SpecularColor);
MATERIAL_VARIABLE_RETRIEVE(SpecularPower);
MATERIAL_VARIABLE_RETRIEVE(LightLookAt);
MATERIAL_VARIABLE_RETRIEVE(ColorTexture);
D3D11_INPUT_ELEMENT_DESC inputElementDescrptions[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }
};
createInputLayout("main11", "p0", inputElementDescrptions, ARRAYSIZE(inputElementDescrptions));
}
void SpotLightMaterial::createVertexBuffer(ID3D11Device * device, const Mesh & mesh, ID3D11Buffer ** vertexBuffer)const
{
const std::vector<XMFLOAT3> & sourceVerts = mesh.vertices();
const std::vector<XMFLOAT3> * sourceUvs = mesh.textureCoords().at(0);
assert(sourceVerts.size() == mesh.textureCoords().at(0)->size());
const std::vector<XMFLOAT3> & sourceNormals = mesh.normals();
assert(sourceVerts.size() == mesh.normals().size());
std::vector<SpotLightingMaterialVertex> vertices;
vertices.reserve(sourceVerts.size());
for (UINT i = 0; i < sourceVerts.size(); i++)
{
XMFLOAT3 position = sourceVerts.at(i);
XMFLOAT3 uv = sourceUvs->at(i);
XMFLOAT3 normal = sourceUvs->at(i);
vertices.push_back(SpotLightingMaterialVertex(XMFLOAT4(position.x, position.y, position.z, 1.0f), XMFLOAT2(uv.x, uv.y), normal));
}
createVertexBuffer(device, &vertices[0], vertices.size(), vertexBuffer);
}
void SpotLightMaterial::createVertexBuffer(ID3D11Device * device, SpotLightingMaterialVertex * vertices, UINT vertexCount, ID3D11Buffer ** vertexBuffer)const
{
D3D11_BUFFER_DESC vertexBufferDesc;
ZeroMemory(&vertexBufferDesc, sizeof(vertexBufferDesc));
vertexBufferDesc.ByteWidth = vertexCount * vertexSize();
vertexBufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
vertexBufferDesc.Usage = D3D11_USAGE_IMMUTABLE;
D3D11_SUBRESOURCE_DATA vertexSubResource;
ZeroMemory(&vertexSubResource, sizeof(vertexSubResource));
vertexSubResource.pSysMem = vertices;
if (FAILED(device->CreateBuffer(&vertexBufferDesc, &vertexSubResource, vertexBuffer)))
{
throw GameException(L"CreateBuffer Failed ");
}
}
UINT SpotLightMaterial::vertexSize() const
{
return sizeof(SpotLightingMaterialVertex);
}
}
|
3be241538995fd74ccba932118957fe72cf106d8
|
fc8b47153a85e5d42db981b348658d0be9fe0385
|
/csqlbot/csqlbot/timehand.h
|
78c84e230780a5b564c83cafdb4c7c0c1af106d3
|
[] |
no_license
|
BackupTheBerlios/sqlbot
|
e2d004478e0c358779a4ee4abd56f5125bfa3d1d
|
3acb474f4cb2915eccb676ecdaed03a8642b6c36
|
refs/heads/master
| 2016-09-06T15:51:45.300668
| 2004-10-07T18:59:45
| 2004-10-07T18:59:45
| 40,073,145
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,633
|
h
|
timehand.h
|
/***************************************************************************
timehand.h - description
-------------------
begin : Sun Oct 19 2003
copyright : (C) 2003 by Steve Gray
email :
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef TIMEHAND_H
#define TIMEHAND_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <dclib/core/cstring.h>
#include <ctime>
class TimeHand {
public:
TimeHand();
~TimeHand();
// A date CString formatted for use in Log file
CString getLogDate();
// A Time CString formatted for use in Log file
CString getLogTime();
// A date CString formatted for use in php/sql DB
CString getDate();
// A Time CString formatted for use in php/sql DB
CString getTime();
// This function gives a time in the future advanced by seconds
CString addTime(int seconds);
};
#endif
|
12f0769866fc7e75535a88915722b8b2897212dc
|
0986e712ba08d59898271b493eab2cb80ba1af2d
|
/src/main/include/Robot.h
|
a9da04cc49f09264968c81322aba0e50f5cc9380
|
[] |
no_license
|
FRC830/2020Robot
|
e571e540f88dc23bda1faa5e43530c464ea5678e
|
9843826d0d6483fee060aae4c88e04905d27c6d7
|
refs/heads/master
| 2021-11-11T19:28:28.730948
| 2021-10-26T22:25:22
| 2021-10-26T22:25:22
| 231,770,021
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 6,792
|
h
|
Robot.h
|
#pragma once
#include <string>
#include "LEDController.h"
#include "utility.h"
#include "SwerveDrive.h"
#include <ctre/Phoenix.h>
#include <ctre/phoenix/motorcontrol/can/TalonFX.h>
#include <frc/AnalogInput.h>
#include <frc/DigitalInput.h>
#include <frc/drive/DifferentialDrive.h>
#include <frc/DriverStation.h>
#include <frc/GenericHID.h>
#include <frc/Preferences.h>
#include <frc/shuffleboard/Shuffleboard.h>
#include <frc/shuffleboard/ShuffleboardTab.h>
#include <frc/smartdashboard/SendableChooser.h>
#include <frc/smartdashboard/SmartDashboard.h>
#include <frc/Solenoid.h>
#include <frc/SpeedControllerGroup.h>
#include <frc/TimedRobot.h>
#include <frc/XboxController.h>
#include <iostream>
#include <networktables/NetworkTable.h>
#include <networktables/NetworkTableInstance.h>
#include <rev/CANSparkMax.h>
#include <rev/ColorMatch.h>
#include <rev/ColorSensorV3.h>
#include <Toggle.h>
#include <frc/controller/RamseteController.h>
#include <frc/ADXRS450_Gyro.h>
#include <frc/Encoder.h>
#include <frc/PWMVictorSPX.h>
#include <frc/SpeedControllerGroup.h>
#include <frc/drive/DifferentialDrive.h>
#include <frc/geometry/Pose2d.h>
#include <frc/kinematics/DifferentialDriveOdometry.h>
#include <frc/trajectory/Trajectory.h>
//#include <frc2/command/SubsystemBase.h>
#include <units/units.h>
#include <frc/Filesystem.h>
#include <frc/trajectory/TrajectoryUtil.h>
#include <wpi/Path.h>
#include <wpi/SmallString.h>
#include <AHRS.h> // navx
// #include <frc/cs/CameraServer.h>
class Robot : public frc::TimedRobot {
public:
void RobotInit() override;
void RobotPeriodic() override;
void DisabledInit() override;
void AutonomousInit() override;
void AutonomousPeriodic() override;
void TeleopInit() override;
void TeleopPeriodic() override;
void TestPeriodic() override;
void HandleColorWheel();
void HandleDrivetrain();
void HandleLEDStrip();
void HandleVision();
void HandleShooter();
void HandleIntake();
void AutonIntakeAndShoot(std::string trenchPath, std::string shootPath);
void HandleElevator();
/*=============
Pins & IDs
=============*/
const int FRWheelID = 12;
const int FLWheelID = 13;
const int BRWheelID = 14;
const int BLWheelID = 15;
const int FRTurnID = 19;
const int FLTurnID = 20;
const int BRTurnID = 21;
const int BLTurnID = 22;
const int FRCANCoderID = 23;
const int FLCANCoderID = 21;
const int BRCANCoderID = 20;
const int BLCANCoderID = 22;
const int ColorWheelID = 16;
const int FlyWheelID = 10;
const int FollowFlywheelID = 11;
const int ElevatorID = 18;
const int solenoidID = 0;
const int colorwheelPistonID = 1;
const int intakeMotorID = 5;
const int beltID = 7;
static constexpr auto i2cPort = frc::I2C::Port::kOnboard;
static constexpr auto MXPPort = frc::SPI::Port::kMXP;
/*=============
Driverstation
=============*/
nt::NetworkTableInstance networkTableInstance = nt::NetworkTableInstance::GetDefault();
frc::Preferences& prefs = *frc::Preferences::GetInstance();
std::shared_ptr<nt::NetworkTable> debugTab = networkTableInstance.GetTable("Shuffleboard")->GetSubTable("debug");
frc::SendableChooser<std::string> autonChooser;
std::string noneAuton = "Nothing";
std::string simpleAuton = "Simple";
std::string basicAuton = "Basic";
std::string middlePathAuton = "Middle Path Auton";
std::string straightPathAuton = "Straight Path Auton";
std::string specialAuton = "Special Path Auton";
std::shared_ptr<nt::NetworkTable> visionTab = networkTableInstance.GetTable("Shuffleboard")->GetSubTable("vision");
/*=============
Color Sensor
=============*/
rev::ColorSensorV3 colorSensor{i2cPort};
TalonSRX colorwheelMotor{ColorWheelID};
char currentColorTarget = 'N';
frc::Solenoid colorwheelPiston{colorwheelPistonID};
/*=============
Drivetrain
=============*/
std::tuple<int, int, int> fl_id{FLWheelID, FLTurnID, FLCANCoderID};
std::tuple<int, int, int> fr_id{FRWheelID, FRTurnID, FRCANCoderID};
std::tuple<int, int, int> br_id{BRWheelID, BRTurnID, BRCANCoderID};
std::tuple<int, int, int> bl_id{BLWheelID, BLTurnID, BLCANCoderID};
const double robot_width_in = 20.0;
const double robot_length_in = 20.0;
SwerveDrive swerve_drive{fl_id, fr_id, bl_id, br_id, robot_width_in, robot_length_in};
/*=============
Controls
=============*/
static const frc::GenericHID::JoystickHand LEFT = frc::GenericHID::kLeftHand;
static const frc::GenericHID::JoystickHand RIGHT = frc::GenericHID::kRightHand;
frc::XboxController pilot{0};
frc::XboxController copilot{1};
/*=============
flywheel, intake, belts
=============*/
static constexpr double kTalonRPMConversionFactor = 10.0 / 2048.0 * 60.0; // 100ms, 2048 ticks
static const int beltFeedTicks = 5000;
int beltFireTicks = 9000;
double flywheelRPM = 4000;
static constexpr double flywheelReverseRPM = 900;
static constexpr double flywheelStoppedRPM = 10;
static constexpr double intakeRollerSpeed = 0.6;
static constexpr double reverseBeltSpeed = 0.85;
static constexpr double forwardBeltSpeed = 0.7;
static constexpr double colorSpinnerSpeed = 0.5;
TalonFX flywheelMotor{FlyWheelID};
TalonFX flywheelMotorFollow{FollowFlywheelID};
frc::Solenoid intakePiston{solenoidID};
TalonSRX intakeMotor{intakeMotorID};
TalonSRX belt{beltID}; // vertical + bottom
frc::DigitalInput lineBreak1{0};
frc::DigitalInput lineBreak2{1};
frc::DigitalInput lineBreak3{2};
bool isUpToSpeed = false;
/*=============
autonomous
=============*/
frc::Timer SimpleTimeFromStart;
static constexpr auto kMaxSpeed = 1_mps;
static constexpr auto kMaxAcceleration = 1_mps_sq;
// Reasonable baseline values for a RAMSETE follower in units of meters and seconds
static constexpr double kRamseteB = 2;
static constexpr double kRamseteZeta = 0.7;
// https://docs.wpilib.org/en/latest/docs/software/examples-tutorials/trajectory-tutorial/creating-drive-subsystem.html
AHRS gyro = AHRS{MXPPort};
int stage = 0;
bool timerStarted = false;
frc::Timer BasicTimer;
static constexpr double centerCamera = 80.0;
/*=============
vision
=============*/
bool frontCamera = true;
bool isAutoAligning = false;
/*=============
LED Strip
=============*/
LEDController ledStrip{36, 9};
int ledMode = 0;
Toggle ledUp;
Toggle ledDown;
/*=============
Elevator
=============*/
int elevatorBreaksPoint = 600000;
int maxElevatorUp = 300000;
int minElevatorDown = 250000;
double elevatorSpeedUp = 0.75;
double elevatorSpeedDown = 0.6;
TalonFX elevatorMotor{ElevatorID};
double inputScale = 1.0;
/*===========
Counting balls
*/
Toggle LinebreakIn{false};
Toggle LinebreakOut{false};
bool ignoreCountingOut = true;
bool ignoreCountingIn = true;
int count = 0;
};
|
5637809098e2ee25360d409864e5553cd8a3a2c8
|
38dc8e8f899c49fd4014f4fa8ecd1d61d2a18e07
|
/Wallet/wallet-tx.cpp
|
ce529096b41818f4f6e59b2be320048236b29c0d
|
[
"MIT"
] |
permissive
|
AztecChain/ATCBlockchain
|
c24ab5d62495cea2da83ef229bd9a3892fd8e709
|
fc217c36af35de47ceb21f7d7ef4933eff9660d0
|
refs/heads/master
| 2022-11-24T03:39:09.605851
| 2020-07-18T04:45:32
| 2020-07-18T04:45:32
| 280,577,398
| 0
| 0
|
MIT
| 2020-07-18T04:27:06
| 2020-07-18T03:57:33
|
C++
|
UTF-8
|
C++
| false
| false
| 5,387
|
cpp
|
wallet-tx.cpp
|
#include "wallet/wallet.h"
#include "base58.h"
#include "checkpoints.h"
#include "chain.h"
#include "coincontrol.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "net.h"
#include "policy/policy.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/sign.h"
#include "timedata.h"
#include "txmempool.h"
#include "util.h"
#include "utilmoneystr.h"
#include "darksend.h"
#include "governance.h"
#include "instantx.h"
#include "keepass.h"
#include "spork.h"
#include <assert.h>
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/thread.hpp>
using namespace std;
/** Transaction fee set by the user */
CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE;
bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
/**
* Fees smaller than this (in duffs) are considered zero fee (for transaction creation)
* Override with -mintxfee
*/
CFeeRate CWallet::minTxFee = CFeeRate(DEFAULT_TRANSACTION_MINFEE);
/**
* If fee estimation does not have enough data to provide estimates, use this fee instead.
* Has no effect if not using fee estimation
* Override with -fallbackfee
*/
CFeeRate CWallet::fallbackFee = CFeeRate(DEFAULT_FALLBACK_FEE);
const uint256 CMerkleTx::ABANDON_HASH(uint256S("0000000000000000000000000000000000000000000000000000000000000001"));
/** @defgroup mapWallet
*
* @{
*/
struct CompareValueOnly
{
bool operator()(const pair<CAmount, pair<const CWalletTx*, unsigned int> >& t1,
const pair<CAmount, pair<const CWalletTx*, unsigned int> >& t2) const
{
return t1.first < t2.first;
}
};
std::string COutput::ToString() const
{
return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue));
}
int COutput::Priority() const
{
BOOST_FOREACH(CAmount d, vecPrivateSendDenominations)
if(tx->vout[i].nValue == d) return 10000;
if(tx->vout[i].nValue < 1*COIN) return 20000;
//nondenom return largest first
return -(tx->vout[i].nValue/COIN);
}
const CWalletTx* CWallet::GetWalletTx(const uint256& hash) const
{
LOCK(cs_wallet);
std::map<uint256, CWalletTx>::const_iterator it = mapWallet.find(hash);
if (it == mapWallet.end())
return NULL;
return &(it->second);
}
CPubKey CWallet::GenerateNewKey()
{
AssertLockHeld(cs_wallet); // mapKeyMetadata
bool fCompressed = CanSupportFeature(FEATURE_COMPRPUBKEY); // default to compressed public keys if we want 0.6.0 wallets
CKey secret;
secret.MakeNewKey(fCompressed);
// Compressed public keys were introduced in version 0.6.0
if (fCompressed)
SetMinVersion(FEATURE_COMPRPUBKEY);
CPubKey pubkey = secret.GetPubKey();
assert(secret.VerifyPubKey(pubkey));
// Create new metadata
int64_t nCreationTime = GetTime();
mapKeyMetadata[pubkey.GetID()] = CKeyMetadata(nCreationTime);
if (!nTimeFirstKey || nCreationTime < nTimeFirstKey)
nTimeFirstKey = nCreationTime;
if (!AddKeyPubKey(secret, pubkey))
throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed");
return pubkey;
}
bool CWallet::AddKeyPubKey(const CKey& secret, const CPubKey &pubkey)
{
AssertLockHeld(cs_wallet); // mapKeyMetadata
if (!CCryptoKeyStore::AddKeyPubKey(secret, pubkey))
return false;
// check if we need to remove from watch-only
CScript script;
script = GetScriptForDestination(pubkey.GetID());
if (HaveWatchOnly(script))
RemoveWatchOnly(script);
script = GetScriptForRawPubKey(pubkey);
if (HaveWatchOnly(script))
RemoveWatchOnly(script);
if (!fFileBacked)
return true;
if (!IsCrypted()) {
return CWalletDB(strWalletFile).WriteKey(pubkey,
secret.GetPrivKey(),
mapKeyMetadata[pubkey.GetID()]);
}
return true;
}
bool CWallet::AddCryptedKey(const CPubKey &vchPubKey,
const vector<unsigned char> &vchCryptedSecret)
{
if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret))
return false;
if (!fFileBacked)
return true;
{
LOCK(cs_wallet);
if (pwalletdbEncryption)
return pwalletdbEncryption->WriteCryptedKey(vchPubKey,
vchCryptedSecret,
mapKeyMetadata[vchPubKey.GetID()]);
else
return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey,
vchCryptedSecret,
mapKeyMetadata[vchPubKey.GetID()]);
}
return false;
}
bool CWallet::LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &meta)
{
AssertLockHeld(cs_wallet); // mapKeyMetadata
if (meta.nCreateTime && (!nTimeFirstKey || meta.nCreateTime < nTimeFirstKey))
nTimeFirstKey = meta.nCreateTime;
mapKeyMetadata[pubkey.GetID()] = meta;
return true;
}
|
d501bf204b5088dcaabfd1de3888b7a87b785d85
|
01142bc0f8d59390ee1dd037c694329d6ae05cfa
|
/Particles/AlphaInitializer.h
|
a53ad8b59be3297562a67149dcd67d4631be9be7
|
[] |
no_license
|
RDAppel/KatanaEngine
|
3c7276c97bec5e9309a42d1c2d93b982d499d4dd
|
079d7b4a1b7d10d4905641e2c3ce33886382693b
|
refs/heads/master
| 2022-02-05T02:38:29.213747
| 2022-02-02T00:48:49
| 2022-02-02T00:48:49
| 74,855,309
| 0
| 1
| null | 2019-01-23T12:47:31
| 2016-11-26T23:02:39
|
C++
|
UTF-8
|
C++
| false
| false
| 2,064
|
h
|
AlphaInitializer.h
|
/* --------------------------------------------------------------- /
██╗ ██╗ █████╗ ████████╗ █████╗ ███╗ ██╗ █████╗
██║ ██╔╝ ██╔══██╗ ╚══██╔══╝ ██╔══██╗ ████╗ ██║ ██╔══██╗
█████╔╝ ███████║ ██║ ███████║ ██╔██╗ ██║ ███████║
██╔═██╗ ██╔══██║ ██║ ██╔══██║ ██║╚██╗██║ ██╔══██║
██║ ██╗ ██║ ██║ ██║ ██║ ██║ ██║ ╚████║ ██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═╝/\ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
/vvvvvvvvvvvvvvvvvvv \====================== Game Engine ======,
`^^^^^^^^^^^^^^^^^^^ /----------------- © 2012 - Ryan Appel -"
\/
/ --------------------------------------------------------------- */
#pragma once
namespace KatanaEngine
{
namespace Particles
{
/** @brief Initializes particle alpha values. */
class AlphaInitializer : public IInitializer
{
public:
/** @brief Creates a alpha initializer.
@param alpha The alpha to render the particle. */
AlphaInitializer(const float alpha = 1.0f) { m_alpha = alpha; }
virtual ~AlphaInitializer() { }
/** @brief Sets the alpha.
@param alpha The alpha value to render the particle. */
virtual void SetAlpha(const float alpha) { m_alpha = alpha; }
/** @brief Initializes the alpha of the specified particle.
@param pParticle The particle to initialize.
@param position The position of the emitter when the particle was activated. */
virtual void Initialize(Particle *pParticle, Vector2 position)
{
pParticle->StartAlpha = m_alpha;
pParticle->CurrentAlpha = m_alpha;
}
private:
float m_alpha = 1;
};
}
}
|
33303d014787791e2a3414fc12c17640c0ce3f54
|
91bd03bc4a32a8f378f0cce68818f178884e4cfb
|
/Project_TrueSTUDIO_901/Project_GPIO_TouchGFX_TrueSTUDIO/TouchGFX/generated/texts/src/LanguageGb.cpp
|
74dcf67c5be029bd3f3b5db8345916301b41f104
|
[] |
no_license
|
secupia/stm32
|
a9069a1f130f82d39f9b27bd1b0f048670d1be2f
|
3358caf8ed1ff76f6ca075e17f7c67d6fcbaa4fd
|
refs/heads/master
| 2023-02-04T06:16:05.322820
| 2023-01-29T07:44:12
| 2023-01-29T07:44:12
| 198,838,031
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 798
|
cpp
|
LanguageGb.cpp
|
#include <stdint.h>
#include <touchgfx/Unicode.hpp>
#ifndef NO_USING_NAMESPACE_TOUCHGFX
using namespace touchgfx;
#endif
// Language Gb: No substitution
TEXT_LOCATION_FLASH_PRAGMA
KEEP const touchgfx::Unicode::UnicodeChar T_SingleUseId3_Gb[9] TEXT_LOCATION_FLASH_ATTRIBUTE = { 0x4e, 0x65, 0x77, 0x20, 0x54, 0x65, 0x78, 0x74, 0x0 };
TEXT_LOCATION_FLASH_PRAGMA
KEEP const touchgfx::Unicode::UnicodeChar T_SingleUseId6_Gb[11] TEXT_LOCATION_FLASH_ATTRIBUTE = { 0x54, 0x72, 0x75, 0x65, 0x53, 0x54, 0x55, 0x44, 0x49, 0x4f, 0x0 };
TEXT_LOCATION_FLASH_PRAGMA
KEEP extern const touchgfx::Unicode::UnicodeChar* const textsGb[6] TEXT_LOCATION_FLASH_ATTRIBUTE =
{
T_SingleUseId3_Gb,
T_SingleUseId3_Gb,
T_SingleUseId3_Gb,
T_SingleUseId6_Gb,
T_SingleUseId6_Gb,
T_SingleUseId6_Gb
};
|
5616aebc76e3e6ac7f8794f79c35ef3d61989a4d
|
b469a2968a2d596af7d811eb14bd3742d37bd15f
|
/HomeWork/10_ArtFiller/canvas.h
|
d827c18893bd05a4e4da5d4f8077049031b59932
|
[] |
no_license
|
JamesKalebby/CSCI-2380
|
139b88c39f6a0b7bc392e5d0468dd91615928c8f
|
a06ee6be561ea3b2a126e13f2ebd459f7fd9a912
|
refs/heads/master
| 2020-03-15T21:32:01.620433
| 2018-05-06T19:57:43
| 2018-05-06T19:57:43
| 132,356,827
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 927
|
h
|
canvas.h
|
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
char ** setCanvas(int row, int col)
{
char ** tempCanvas = new char * [row];
for (int i = 0; i < row; i++)
{
tempCanvas[i] = new char[col];
}
return tempCanvas;
}
void fill(char ** canvas, int row, int col, int i, int j, char x)
{
if (canvas[i][j] != ' ')
{
}
else
{
if (i <= row && j <= col && i >= 0 && j >= 0)
{
//fill spot
canvas[i][j] = x;
//recursively fill img
fill(canvas, row, col, i + 1, j, x);
fill(canvas, row, col, i - 1, j, x);
fill(canvas, row, col, i, j + 1, x);
fill(canvas, row, col, i, j - 1, x);
}
}
}
void display(char ** board, int row, int col)
{
system("cls");
cout << "Current Artwork: " << endl << endl;
//loop through array, display contents
for (int i = 0; i < row; i++)
{
for (int j = 0; j < col; j++)
{
cout << board[i][j];
}
}
cout << endl << endl;
}
|
f63aedf74fa271d4031046b0fac4b0356149b927
|
b22588340d7925b614a735bbbde1b351ad657ffc
|
/athena/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/DerivationFrameworkInDet/TrackStateOnSurfaceDecorator.h
|
052b221e41685fdbf6c189a3d27249f8ea9ccf0a
|
[] |
no_license
|
rushioda/PIXELVALID_athena
|
90befe12042c1249cbb3655dde1428bb9b9a42ce
|
22df23187ef85e9c3120122c8375ea0e7d8ea440
|
refs/heads/master
| 2020-12-14T22:01:15.365949
| 2020-01-19T03:59:35
| 2020-01-19T03:59:35
| 234,836,993
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,187
|
h
|
TrackStateOnSurfaceDecorator.h
|
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// TrackToVertexWrapper.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef DERIVATIONFRAMEWORK_TRACKSTATEONSURFACEDECORATOR_H
#define DERIVATIONFRAMEWORK_TRACKSTATEONSURFACEDECORATOR_H
#include <string>
#include <vector>
#include "AthenaBaseComps/AthAlgTool.h"
#include "DerivationFrameworkInterfaces/IAugmentationTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
#include "AthLinks/ElementLink.h"
#include "xAODTracking/TrackMeasurementValidationContainer.h"
class AtlasDetectorID;
class PixelID;
class SCT_ID;
class TRT_ID;
class ITRT_CalDbSvc;
class ITRT_ToT_dEdx;
namespace Trk {
class IUpdator;
class IResidualPullCalculator;
class ITrackHoleSearchTool;
class PrepRawData;
class IExtrapolator;
class IPRD_AssociationTool;
}
namespace DerivationFramework {
class TrackStateOnSurfaceDecorator : public AthAlgTool, public IAugmentationTool {
public:
TrackStateOnSurfaceDecorator(const std::string& t, const std::string& n, const IInterface* p);
StatusCode initialize();
StatusCode finalize();
virtual StatusCode addBranches() const;
private:
ElementLink< xAOD::TrackMeasurementValidationContainer > buildElementLink( const Trk::PrepRawData*,
const std::vector<unsigned int>*,
const xAOD::TrackMeasurementValidationContainer* ) const;
// --- Steering and configuration flags
bool m_isSimulation;
bool m_storeHoles;
bool m_storeOutliers;
bool m_storeTRT;
bool m_storeSCT;
bool m_storePixel;
bool m_addPulls;
bool m_addSurfaceInfo;
bool m_addPRD;
bool m_addExtraEventInfo;
// --- Configuration keys
std::string m_sgName;
std::string m_containerName;
std::string m_pixelMapName;
std::string m_sctMapName;
std::string m_trtMapName;
std::string m_pixelClustersName;
std::string m_sctClustersName;
std::string m_trtDCName;
std::string m_pixelMsosName;
std::string m_sctMsosName;
std::string m_trtMsosName;
// --- Services and tools
const AtlasDetectorID* m_idHelper;
const PixelID* m_pixId;
const SCT_ID* m_sctId;
const TRT_ID* m_trtId;
ToolHandle<Trk::IUpdator> m_updator;
ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator;
ToolHandle<Trk::ITrackHoleSearchTool> m_holeSearchTool;
ToolHandle<Trk::IExtrapolator> m_extrapolator;
ServiceHandle<ITRT_CalDbSvc> m_trtcaldbSvc;
ToolHandle<ITRT_ToT_dEdx> m_TRTdEdxTool;
ToolHandle< Trk::IPRD_AssociationTool > m_assoTool;
// --- Private other members
};
}
#endif // DERIVATIONFRAMEWORK_TRACKSTATEONSURFACEDECORATOR_H
|
0011addd2a405880970754718c621498d27c2004
|
4026ba92023caafcaf1560b9875e00274004f91a
|
/main.cpp
|
60cfcc1e4fc1f90f5324b3e0a2c331ba0f07c584
|
[] |
no_license
|
bjader/qhe
|
459e500a37cdd05245f32bfe2ad5e93add841c68
|
c7444fa66c0de0ec519326371180fa29444ec98d
|
refs/heads/master
| 2021-10-25T09:05:57.714717
| 2019-04-03T09:18:34
| 2019-04-03T09:18:34
| 107,024,159
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,212
|
cpp
|
main.cpp
|
//
// main.cpp
// Section3
//
// Created by Benjamin Jaderberg on 17/01/2017.
// Copyright © 2017 BenJad. All rights reserved.
//
#include <iostream>
#include "Point.hpp"
#include "methods.hpp"
#include <cmath>
#include <complex>
#include <random>
#include <algorithm>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
double L = 20;
//Global objects
random_device rd;
//Mersenne Twister algorithm, default seed
mt19937 gen(rd());
uniform_real_distribution<> dis(0,1); // Define our distribution as between 0 and 1
//Method to initialise a system with N particles randomly distributed within 3-sigma radius
vector<Point> initialiseSystem (int N) {
vector<Point> R;
for (int i=0; i<N; i++) {
//Populate R1 with particles randomly placed within radius of 3sqrt(N)-sigma from origin
double sigma = sqrt(N);
double phi1 = (2*M_PI) * dis(gen); //Random angle in polar coordinates
double radius1 = (dis(gen) * sigma); //Random radius between 0 -> 3-sigma
double x1 = radius1 * cos(phi1);
double y1 = radius1 * sin(phi1);
R.push_back(Point(x1,y1));
}
return R;
}
//Method to "burn in" a random system to more accurately represent the true distribution
//Runs same Metropolis algorithm as runMetropolis but without any calculations or swaps
void runBurnIn (vector<Point> &R1, vector<Point> &R2, double dr, int num_iterations, int m) {
for (int i = 0; i<num_iterations; i++) {
//Calculate probability of current system
double logPsi1 = calcReducedPsi(R1,m)[0];
double logPsi2 = calcReducedPsi(R2,m)[0];
//Create empty test system
vector<Point> R3;
vector<Point> R4;
//Populate new system R3 with original particles from R1, plus a random displacement of length dr
for (Point p1 : R1) {
double phi = (2*M_PI) * dis(gen);
double x = p1.x() + (dr * cos(phi));
double y = p1.y() + (dr * sin(phi));
//If a particle moves outside the box, instead make it reappear out the opposite side
if (x > (L/2)) { x = x - L;}
if (x < (-L/2)) {x = x + L;}
if (y > (L/2)) { y = y - L;}
if (y < (-L/2)) { y = y + L;}
R3.push_back(Point(x,y));
}
//Repeat for R4/R2
for (Point p2 : R2) {
double phi = (2*M_PI) * dis(gen);
double x = p2.x() + (dr * cos(phi));
double y = p2.y() + (dr * sin(phi));
if (x > (L/2)) { x = x - L;}
if (x < (-L/2)) {x = x + L;}
if (y > (L/2)) { y = y - L;}
if (y < (-L/2)) { y = y + L;}
R4.push_back(Point(x,y));
}
//Calculate probability of new system
vector<double> psi3 = calcReducedPsi(R3,m);
vector<double> psi4 = calcReducedPsi(R4,m);
double logPsi3 = psi3[0];
double logPsi4 = psi4[0];
double p_ratio = exp((2*(logPsi3 + logPsi4 - logPsi1 - logPsi2)));
//Accept in accordance to Hastings-Metropolis method
double lambda = min(p_ratio,1.0);
double alpha = dis(gen);
//If accept the new configuration
if (alpha < lambda) {
R1 = R3;
R2 = R4;
}
}
}
//Method to find the density profile of N-particles
vector<Point> densityProfile (vector<Point> R1, double dr, int num_iterations, double width, int m) {
vector<double> numParticles;
int accepted = 0;
int accepted_1k = 0;
int rejected_1k = 0;
for (int i=0; i<=(L/width); i++) {
numParticles.push_back(0);
}
for (int i = 0; i<num_iterations; i++) {
//Self correcting acceptance rate to keep within 30-70%. Adjusts by factor of dr/10, checking each 100000 iterations
if (i % 10 == 0 && i!= 0) {
double acceptance_rate = (double(accepted_1k)/(accepted_1k + rejected_1k))*100;
//If too low e.g. for 20%, adjusts by - (2*dr)/5
if (acceptance_rate < 30) {
dr = dr - ((dr/10)*(((30-acceptance_rate)/10)+1));
}
//Reset dr if we get into a local minima stuck position
if (acceptance_rate < 2) {
// dr = 0.1;
}
else if (acceptance_rate > 70) {
dr = dr + ((dr/10)*(((acceptance_rate-70)/10)+1));
}
//cout << endl << "Acceptance rate: " << acceptance_rate;
//cout << endl << "dr: " << dr;
accepted_1k = 0;
rejected_1k = 0;
}
//Create empty test system
vector<Point> R3;
//Populate new system R3 with original particles from R1, plus a random displacement of length dr
for (Point p1 : R1) {
double phi = (2*M_PI) * dis(gen);
double x = p1.x() + (dr * cos(phi));
double y = p1.y() + (dr * sin(phi));
//If a particle moves outside the box, instead make it reappear out the opposite side
if (x > (L/2)) { x = x - L;}
if (x < (-L/2)) {x = x + L;}
if (y > (L/2)) { y = y - L;}
if (y < (-L/2)) { y = y + L;}
R3.push_back(Point(x,y));
}
//Calculate probability of systems
double logPsi1 = calcReducedPsi(R1,m)[0];
double logPsi3 = calcReducedPsi(R3,m)[0];
double p_ratio = exp(2*(logPsi3 - logPsi1));
//Accept in accordance to Hastings-Metropolis method
double lambda = min(p_ratio,1.0);
double alpha = dis(gen);
//If accept the new configuration
if (alpha < lambda) {
accepted += 1;
accepted_1k += 1;
R1 = R3;
for (Point p1 : R1) {
int elementID = floor((p1.length()/width));
numParticles[elementID] += 1;
}
}
else {
rejected_1k +=1;
}
}
vector<Point> normNumParticles;
for (double i=0; i<numParticles.size(); i++) {
double area = M_PI * (pow(width*(i+1),2) - pow(width*i,2));
//double radius = width;
double norm_factor = accepted*area;
double normNum = numParticles[i]/(norm_factor);
Point slice = Point(normNum,width*i);
normNumParticles.push_back(slice);
}
cout << accepted << endl;
return normNumParticles;
}
//Method using a Metropolis algorithm to iterate the two systems over random moves
vector<double> runMetropolis (vector<Point> rPoints1, vector<Point> rPoints2, double dr, int num_iterations, int m) {
//Define some counters
int accepted = 0;
int accepted_1k = 0;
int rejected = 0;
int rejected_1k = 0;
int swapped = 0;
EIGEN_DEPRECATED
//Set up array to keep track of integral summations for a set number of Z values
complex<double> sum_gx = complex<double>(0,0);
complex<double> sum_g2x = complex<double>(0,0);
//Define current system
vector<Point> R1(rPoints1);
vector<Point> R2(rPoints2);
for (int i = 0; i<num_iterations; i++) {
//Self correcting acceptance rate to keep within 30-70%. Adjusts by factor of dr/10, checking each 1000 iterations
if (i % 1000 == 0 && i!= 0) {
double acceptance_rate = (double(accepted_1k)/(accepted_1k + rejected_1k))*100;
//If too low e.g. for 20%, adjusts by - (2*dr)/5
if (acceptance_rate < 30) {
dr = dr - ((dr/10)*(((30-acceptance_rate)/10)+1));
}
else if (acceptance_rate > 70) {
dr = dr + ((dr/10)*(((acceptance_rate-70)/10)+1));
}
accepted_1k = 0;
rejected_1k = 0;
}
//Output progress in increments of 10%
if (i % (num_iterations/10) == 0 && i!= 0) {
cout << double((i*100.0/num_iterations)) << "% " << flush;
}
//Calculate probability of current system
double logPsi1 = calcReducedPsi(R1,m)[0];
double logPsi2 = calcReducedPsi(R2,m)[0];
//Create empty test system
vector<Point> R3;
vector<Point> R4;
//Populate new system R3 with original particles from R1, plus a random displacement of length dr
for (Point p1 : R1) {
double phi = (2*M_PI) * dis(gen);
double x = p1.x() + (dr * cos(phi));
double y = p1.y() + (dr * sin(phi));
//If a particle moves outside the box, instead make it reappear out the opposite side
if (x > (L/2)) { x = x - L;}
if (x < (-L/2)) {x = x + L;}
if (y > (L/2)) { y = y - L;}
if (y < (-L/2)) { y = y + L;}
R3.push_back(Point(x,y));
}
//Repeat for R4/R2
for (Point p2 : R2) {
double phi = (2*M_PI) * dis(gen);
double x = p2.x() + (dr * cos(phi));
double y = p2.y() + (dr * sin(phi));
if (x > (L/2)) { x = x - L;}
if (x < (-L/2)) {x = x + L;}
if (y > (L/2)) { y = y - L;}
if (y < (-L/2)) { y = y + L;}
R4.push_back(Point(x,y));
}
//Calculate probability of new system
vector<double> psi3 = calcReducedPsi(R3,m);
vector<double> psi4 = calcReducedPsi(R4,m);
double logPsi3 = psi3[0];
double logPsi4 = psi4[0];
double p_ratio = exp(2*(logPsi3 + logPsi4 - logPsi1 - logPsi2));
//Accept in accordance to Hastings-Metropolis method
double lambda = min(p_ratio,1.0);
double alpha = dis(gen);
//If accept the new configuration
if (alpha < lambda) {
accepted += 1;
accepted_1k += 1;
complex<double> g;
vector<int> iListR3;
vector<int> iListR4;
//The new moved system becomes our current system
R1 = R3;
vector<double> psi1 = psi3;
R2 = R4;
vector<double> psi2 = psi4;
//We will keep using R3 and R4 as the system for our swap calculation
//Find the ID of particles within subsystem A (ie. particles left of the y axis)
for (int j=0; j<R3.size(); j++) {
if (R3[j].x() < 0) {
iListR3.push_back(j);
}
if (R4[j].x() < 0) {
iListR4.push_back(j);
}
}
//If the number of particles in R3_A = R4_A we can perform the swap
if (iListR3.size() == iListR4.size()) {
swapped += 1;
for (int d=0; d<iListR3.size(); d++) {
//Find the index integer of the particles we are swapping
int id_1 = iListR3[d];
int id_2 = iListR4[d];
//Swap the particles by copying each others coordinates
//At this point R2 is still an exact copy of R4. So in fact we copy R2_A into R3_A to avoid creating temporary copy variables
//And we do the same copying R1_A into R4_A
R3[id_1].copy(R2[id_2]);
R4[id_2].copy(R1[id_1]);
}
//Recalculate the partial wavefunctions of R3,R4 (after the swap)
psi3 = calcReducedPsi(R3,m); //As a reminder psi is a vector<double> containing (ln|psi|,Phi)
psi4 = calcReducedPsi(R4,m);
g = exp((psi3[0]) + (psi4[0]) - (psi1[0]) - (psi2[0])) * cos(psi3[1] + psi4[1] - psi1[1] - psi2[1]);
//cout << g << endl;
}
//If we didnt perform the swap, dont add to the integral (dirac delta factor)
else {
g = 0;
}
sum_gx += g;
sum_g2x += pow(g,2);
iListR3.clear();
iListR4.clear();
}
//Else reject the new configuration
else {
rejected +=1;
rejected_1k += 1;
}
}
//Calculate the error of each S2 point
complex<double> normComplexIntegral = sum_gx / double(accepted);
double normIntegral = normComplexIntegral.real();
double normSquaredIntegral = sum_g2x.real() / accepted;
double stdevS2 =(pow(normSquaredIntegral - pow(normIntegral,2),0.5))/(pow(accepted,0.5)*normIntegral);
double s2 = -log(normIntegral);
//Print properties of run
cout << endl << "Number of accepted moves: " << accepted;
cout << endl << "Number of rejected moves: " << rejected;
cout << endl << "Acceptance rate: " << (double(accepted)/(accepted + rejected))*100 << "%";
cout << endl << "Final dr:" << dr;
cout << endl << "Number of swaps: " << swapped;
//Print normalised integral and calculate S2 for each one
cout << endl << "Normalised complex integral: ";
cout << normComplexIntegral;
//Print S2 with the standard deviation
cout << endl << "S2 value: ";
cout << s2 << "+/-" << stdevS2 << endl;
//Write results to file for plotting
vector<double> s2Point;
s2Point = {s2, stdevS2, double(R1.size())};
return s2Point;
}
vector<vector<double>> iterateDensityProfile(int n, int n_max, int m) {
vector<vector<double>> r0List;
for (int j=n; j<n_max+1; j++) {
cout << j << endl;
double num_iterations = 10000000;
vector<Point> R1 = initialiseSystem(j);
vector<Point> R2 = initialiseSystem(j);
runBurnIn(R1, R2, 0.1, 1000000, m);
vector<Point> density = densityProfile(R1, 0.1, num_iterations, 0.1, m);
//If plotting total density profile
string file_name = "density_n" + to_string(j) + "_width" + to_string(density[1].y()) + "_L" + to_string(L) + "_" + to_string(num_iterations/1000000) + "m_m3.txt";
writeToFile(density, file_name);
//If plotting rho_0 or r_0
/*Point r0 = Point(0,0); //initialise
Point rho_max = Point(0,0);
double rho_target = density[0].x();
//Find maximum point
for (Point p : density) {
if (p.x() > rho_max.x()) {
rho_max = p;
}
}
for (Point p : density) {
if (abs(p.x()-rho_target) < abs(r0.x()-rho_target) && p.y() > rho_max.y()) {
r0 = p;
}
}
vector<double> r0Point = {double(j),r0.x(),r0.y()};
r0List.push_back(r0Point);*/
}
return r0List;
}
//Method to iterate runMetropolis over multiple N values and write it to file
void iterateOverN (int min_n, int max_n, double dr, int num_iterations, int m) {
vector<vector<double>> s2Points;
for (int n=min_n; n<max_n+1; n++) {
vector<Point> R1 = initialiseSystem(n);
vector<Point> R2 = initialiseSystem(n);
runBurnIn(R1, R2, 0.1, 1000000, m);
cout << endl << n << endl;
vector<double> s2Point = runMetropolis(R1, R2, dr, num_iterations, m);
s2Points.push_back(s2Point);
}
string name = "MC_m" + to_string(m) + "_" + to_string(num_iterations/1000000) + "m_L" + to_string(int(L)) + "_n" + to_string(max_n) + ".txt";
writeMCToFile(s2Points, name);
}
int main(int argc, const char * argv[]) {
int min_n = 2;
int max_n = 30;
double dr = 1.0;
int iterations = 10000000;
iterateOverN(min_n, max_n, dr, iterations, 3);
iterateOverN(min_n, max_n, dr, iterations, 5);
}
|
869a797ff34fc2c66d780ca3eed92df8551cb1d8
|
ff151e502f60840d4a10773ce96c757c51e7d33c
|
/src/YGEResourceManager.h
|
7b7774060d9c69052b38230d19e1dcd4bf263ad4
|
[
"MIT"
] |
permissive
|
fortmeier/yge-game-engine
|
31937337225da1f2a577a8135705d8823ecc6439
|
c88cab6d0fa4220ab88adf562853b4db22536df8
|
refs/heads/master
| 2021-01-22T04:57:02.023689
| 2014-02-17T04:59:59
| 2014-02-17T04:59:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,889
|
h
|
YGEResourceManager.h
|
/** @file
* @author Dirk Fortmeier
* @date 3.11.2009
*/
#ifndef _YGE_RESSOURCEMANAGER_H_
#define _YGE_RESSOURCEMANAGER_H_
#include <SDL.h>
#include <SDL_opengl.h>
#include <string>
#include <map>
#include "YGETexture.h"
#include "YGESound.h"
namespace YGECore {
/**
* singleton class for loading and unloading of resources
*/
class YGEResourceManager {
private:
YGEResourceManager();
/**
* pointer to the singleton
*/
static YGEResourceManager* singleton;
/**
* path to the location of resources
* by default, this is set to '../media/'
* @see setResourceLocation
*/
std::string resourceLocation;
/**
* map containing textures associated with their filenames
*/
std::map<std::string, YGETexture*> textures;
/**
* map containing sounds associated with their filenames
*/
std::map<std::string, YGEAudio::YGESound*> sounds;
/**
* load a sound from a file and stores it
* in the map of sounds;
* @throws YGEExceptionFileNotFound
*/
void loadSound(const char* filename);
public:
/**
* @return singlton instance
*/
static YGEResourceManager* getInstance(){
if(singleton == 0){
singleton = new YGEResourceManager();
}
return singleton;
}
/**
* helper function which loads an image from a file
* at this time the following formats are supported:
* - .bmp
* @return SDL_Surface pointer containing image data
*
* @todo implement support for .png, .jpg via SDL_Image
*
* @throws YGEExceptionMethodNotImplementedYet
* @throws YGEExceptionFileNotFound
* @deprecated use the method provided by YGETexture
*/
SDL_Surface* getSurface(const char *filename);
/**
* crawls the resource directory/directories
* for resources and stores the location of resources
* @note not working atm
*/
void crawlResources();
/**
* @return the path of a file with appended resource location
*/
std::string absoluteFilename(const char* filename);
/**
* set the resource location
* @see resourceLocation
*/
void setResourceLocation(const char* path);
/**
* looks for already loaded textures in the map of textures
* or loads the texture from file
* currently supported formats:
* - .tex loads a texture as descriped in a .tex file
* - .bmp loads a simple texture from a .bmp file
* @todo other formats: .png, .jpg
*
* @throws YGEExceptionMethodNotImplementedYet
* @throws YGEExceptionFileNotFound
* @return pointer to YGETexture
*
*/
YGETexture* getTexture(const char* filename);
/**
* looks for already loaded sounds in the map of sounds
* or loads the sounds from file
* currently supported formats:
* @todo implement this
*
* @throws YGEExceptionMethodNotImplementedYet
* @throws YGEExceptionFileNotFound
* @return pointer to YGESound
*
*/
YGEAudio::YGESound* getSound(const char* filename);
};
}
#endif
|
db592ad1507b403928e7f9b5de413dc457ddfd3e
|
f3860109ad4cae8595a8dace7cf2669c2d16d3cd
|
/openmp/circle/circle0.cpp
|
166fbe953d1b9c5700e906dd6e22f32116045efe
|
[
"MIT"
] |
permissive
|
StarlAllen/HPC
|
993f908f0cd9c9c9c2861b6fcd1cb8f1e4effd8c
|
e555be8f76de0f7305f6df2844e5025c05c30eb1
|
refs/heads/main
| 2023-06-01T01:50:45.012185
| 2021-07-01T08:49:00
| 2021-07-01T08:49:00
| 381,936,210
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,495
|
cpp
|
circle0.cpp
|
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <vector>
#include <algorithm>
using namespace std;
// add your codes begin
#include <cmath>
#include <cstring>
#define max_threads_nums 128
/*
void scan_link(vector<int> &data,vector<int> &prev,vector<int> &next){
vector<int> data_old(data);
vector<int> pre_old(prev);
for(int j=0;j<ceil(log2(SIZE));j++){
#pragma omp parallel
{
#pragma omp for
for(int i=0;i<SIZE;i++){
if(prev[i]!=-1){
data_old[i] += data[prev[i]];
pre_old[i] = prev[prev[i]];
}
}
prev.assign(pre_old.begin(),pre_old.end());
data.assign(data_old.begin(),data_old.end());
}
}
}
*/
void scan(vector<int>& data, vector<int> ptr) {
vector<int> tmpdata(data);
vector<int> tmpptr(ptr);
bool done = false;
while (!done) {
done = true;
#pragma omp parallel for reduction(and:done)
for (int i = 0; i < SIZE; i++) {
if (ptr[i] >=0) {
tmpdata[i] = data[i] + data[ptr[i]];
tmpptr[i] = ptr[ptr[i]];
done = false;
}
}
#pragma omp parallel for
for (int i = 0; i < SIZE; i++) {
data[i] = tmpdata[i];
ptr[i] = tmpptr[i];
}
}
}
void inclusive_scan(vector<int> &data){
int tid,i,j,seq_num=0,num_threads=0;
//step 1
#pragma omp parallel private(tid,j) shared (data)
{
tid = omp_get_thread_num();
num_threads = omp_get_num_threads();
seq_num = SIZE/num_threads;
for(j = 0;j<seq_num -1;j++){
data[tid*seq_num+j+1] += data[tid*seq_num+j];
}
}
// step 2
for(i=2;i<num_threads+1;i++){
data[i*seq_num-1] += data[(i-1)*seq_num-1];
}
//step 3
#pragma omp parallel private(tid,j) shared(data)
{
tid = omp_get_thread_num();
if(tid!=0){
for(j=0;j<seq_num-1;j++){
data[tid*seq_num+j] += data[tid*seq_num-1];
}
}
}
//step 4
if(SIZE%num_threads){
for(i=num_threads*seq_num;i<SIZE;i++)
data[i] += data[i-1];
}
}
void scan_circle_link(vector<int> &data,vector<int> &prev,vector<int> &next){
vector<int> data_old(data);
vector<int> tmpprev(prev);
vector<int> prev_old(prev);
vector<int> flag(SIZE,0);
vector<int> flag_old(SIZE,0);
vector<int> flag1(SIZE,0);
vector<int> max_idx(SIZE,-1);// 作为分组依据
vector<int> max_idx1(SIZE,-1);
//fragment flag
double time = omp_get_wtime();
#pragma omp parallel for
for(int i=0;i<SIZE;i++){
if(data[i] != -1 )//&& i < next[i])
//flag[i] = 1;
//flag_old[i] = 1;
//flag1[i] = 1;
max_idx[i] = i;
max_idx1[i] = i;
}
time = omp_get_wtime()-time;
printf("%lf\n",time);
//nlogn maxscan
time = omp_get_wtime();
//max-scan on index
bool flg0 = false;
while(!flg0){
flg0 = true;
#pragma omp parallel for reduction(and:flg0)
for(int j=0;j<SIZE;j++){
if(data[j] != -1){
if(max_idx[j] < max_idx[prev[j]]){
flg0 = false;
max_idx1[j] = max_idx[prev[j]];
//data_old[j] += data_old[prev[j]];
prev_old[j] = prev[prev[j]];
}
}
}
#pragma omp parallel for
for(int i=0;i<SIZE;i++){
max_idx[i] = max_idx1[i];
prev[i] = prev_old[i];
//data[i] = data_old[i];
}
}
printf("max_scan:%lf\n",omp_get_wtime()-time);
time = omp_get_wtime();
int cnt = 0;
//#pragma omp parallel for reduction(+:cnt)
for(int i=0;i<SIZE;i++){
if(data[i]!= -1 && max_idx[i] == i){
tmpprev[next[i]] = -1; //转化成单链表的scan问题
flag[i] = cnt;
cnt++;
/*
int j = i;
int nums = 1;
while(next[j] != i){
nums++;
j = next[j];
}
data_old[i] = nums;
*/
}
}
printf("cnt:%lf\n",omp_get_wtime()-time);
//time = omp_get_wtime();
//scan(data_old,tmpprev);
//printf("addscan:%lf\n",omp_get_wtime()-time);
int res[max_threads_nums][cnt];
memset(res,0,sizeof(res));
//data.resize(cnt,0);
//printf("data:\n");
time = omp_get_wtime();
#pragma omp parallel for
for(int i=0;i<SIZE;i++){
int tid = omp_get_thread_num();
if(data_old[i] != -1 ){
//printf("%d ",data[i]);
res[tid][flag[max_idx[i]]] += data_old[i];
}
}
data.clear();
data.resize(cnt);
for(int j=0;j<cnt;j++){
data[j] = 0;
for(int i=0;i<max_threads_nums;i++){
data[j] += res[i][j];
}
}
printf("write to data:%lf\n",omp_get_wtime()-time);
// data.clear();
// for(int i=0;i<SIZE;i++){
// if(data_old[i]>=0 && max_idx[i]== i){
// data.push_back(data_old[i]);
// }
//}
/*
flg0 = false;
while(!flg0){
flg0 = true;
#pragma omp parallel for
for(int i=0;i<SIZE;i++){
if(prev[i] != -1 && flag[i] == 0){
{
flg0 = false;
data_old[i] += data[prev[i]];
prev_old[i] = prev[prev[i]];
flag_old[i] = flag[prev[i]];
}
}
}
#pragma omp parallel for
for (int i = 0; i < SIZE; i++) {
data[i] = data_old[i];
prev[i] = prev_old[i];
flag[i] = flag_old[i];
}
}
printf("fragscan finished!\n");
#pragma omp parallel for
for(int i=0;i<SIZE;i++){
if(max_idx[i] == i)
flag[i] = 1;
else
flag[i] = 0;
if(data_old[i]>0 && (flag1[i] == 0 ||(flag1[i] && flag1[next[i]]))){
if(max_idx[i] != i)
data_old[max_idx[i]] += data_old[i];
data_old[i] = -1;
}
}
//add-scan on flag
inclusive_scan(flag);
//(flag[i]==1 && flag[next[i]]==1)
data.clear();
//#pragma omp parallel for
for(int i=0;i<SIZE;i++){
if(data_old[i] > 0){
data.push_back(data_old[i]);
}
}
*/
//assert(prev.size() == prev_old.size());
//for (int i = 0; i < prev.size(); i++) assert(prev[i] == prev_old[i]);
}
// add your codes end
int main() {
vector<int> data(SIZE, -1);
vector<int> prev(SIZE, -1);
vector<int> next(SIZE, -1);
vector<int> test;
srand(20200218);
{ int empty = SIZE / 10;
int head, tail, tmp;
while (empty > 0) {
int size = rand() % empty + 1;
for (int i = 0; i < size; i++) {
int idx = rand() % SIZE;
while (data[idx] >= 0) idx = (idx + 1) % SIZE;
data[idx] = 1;
if (i == 0) {
head = idx;
tail = idx;
} else if (i == size-1) {
prev[idx] = tmp; next[tmp] = idx;
tail = idx;
} else {
prev[idx] = tmp; next[tmp] = idx;
}
tmp = idx;
}
prev[head] = tail; next[tail] = head;
test.push_back(size);
empty -= size;
}
sort(test.begin(), test.end());
}
double t = omp_get_wtime();
// add your codes begin
/*vector<int> flag(SIZE,0);
for(int i=0;i<SIZE;i++){
if(!flag[i]){
//prev[i] = -1;
int fa = i;
int j = i;
while(next[j] != fa){
flag[j] = 1;//visited
int t = next[j];
next[j] = fa;
j = t;
}
flag[j] = 1;
}
}*/
scan_circle_link(data,prev,next);
printf("\n test:");
for (int i = 0; i < test.size(); i++) printf(" %d", test[i]);
printf("\nsize %d\n", int(test.size()));
// add your codes end
t = omp_get_wtime() - t;
printf("time %f %d\n", t, SIZE);
sort(data.begin(), data.end());
printf("circle");
for (int i = 0; i < data.size(); i++) printf(" %d", data[i]);
printf("\nsize %d\n", int(data.size()));
assert(data.size() == test.size());
for (int i = 0; i < test.size(); i++) assert(data[i] == test[i]);
}
|
b0de38b9722a8d8497ff17a0395578160e3ea2f4
|
cc53d048a2f8645e4713d686a4eced12bdb14f0a
|
/include/gatbl/utils/type_erasure.hpp
|
dc83997627cab9da6330df0121e5c06365a47e09
|
[] |
no_license
|
Piezoid/gatb-lite
|
4e214902cf6123305a8a5fbc562c3bb5d3ff4373
|
b9ba223f3e10e6182ae3405c8174683781edb04d
|
refs/heads/master
| 2021-06-27T07:02:00.558643
| 2020-09-25T10:59:08
| 2020-09-25T11:00:23
| 137,741,910
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,329
|
hpp
|
type_erasure.hpp
|
#ifndef GATBL_TYPE_ERASURE
#define GATBL_TYPE_ERASURE
#include <memory>
#include <type_traits>
#include "concepts.hpp"
#include "../common.hpp"
namespace gatbl {
/// Pimpl idiom wrapper, taken from Herb Sutter.
/// This class can be instantiated while T is an incomplete type.
/// You need to include gatbl/utils/pimpl.tpp in your .cpp and instantiate in the footer:
/// template class gatbl::pimpl<MyClassImpl>;
template<typename T> class pimpl
{
std::unique_ptr<T> _m;
T& _get() const
{
T* p = _m.get();
assume(p != nullptr, "pimpl: null pointer");
return *p;
}
public:
template<typename... Args> pimpl(Args&&...);
pimpl(T*);
~pimpl();
pimpl(pimpl&&) = default;
pimpl& operator=(pimpl&&) = default;
// FIXME: support copy, maybe ?
T* operator->() { return &_get(); }
const T* operator->() const { return &_get(); }
T& operator*() { return _get(); }
const T& operator*() const { return _get(); }
};
/// Type erased closure reference
/// Allows to define ABI that accept anonymous closures/functor callbacks
/// Beware: no lifetime nor RAII management is done, the closure must remain allocated untill the invocation is made
template<typename Sign> class erased_closure_ref;
// FIXME: constness progpagation: variant for reference to const closures
template<typename Ret, typename... Args> class erased_closure_ref<Ret(Args...)>
{
Ret (*_fun_ptr)(void*, Args...);
void* _closure_ptr;
public:
erased_closure_ref() = delete;
erased_closure_ref(const erased_closure_ref&) = default;
erased_closure_ref(erased_closure_ref&) = default;
erased_closure_ref& operator=(const erased_closure_ref&) = default;
erased_closure_ref& operator=(erased_closure_ref&&) = default;
template<typename F, typename = decltype(concepts::value_require<Ret>(std::declval<F>()(std::declval<Args>()...)))>
erased_closure_ref(F& f)
: _fun_ptr([](void* closure_ptr, Args... args) {
F& closure = *reinterpret_cast<F*>(closure_ptr);
return closure(std::forward<Args>(args)...);
})
, _closure_ptr(reinterpret_cast<void*>(&f))
{}
Ret operator()(Args... args) const { return _fun_ptr(_closure_ptr, std::forward<Args>(args)...); }
};
// void(Args) specialization
template<typename... Args> class erased_closure_ref<void(Args...)>
{
void (*_fun_ptr)(void*, Args...);
void* _closure_ptr;
public:
erased_closure_ref() = delete;
erased_closure_ref(const erased_closure_ref&) = default;
erased_closure_ref(erased_closure_ref&) = default;
erased_closure_ref& operator=(const erased_closure_ref&) = default;
erased_closure_ref& operator=(erased_closure_ref&&) = default;
template<typename F, typename = decltype(std::declval<F>()(std::declval<Args>()...))>
erased_closure_ref(F& f)
: _fun_ptr([](void* closure_ptr, Args... args) {
F& closure = *reinterpret_cast<F*>(closure_ptr);
closure(std::forward<Args>(args)...);
})
, _closure_ptr(reinterpret_cast<void*>(&f))
{}
void operator()(Args... args) const { _fun_ptr(_closure_ptr, std::forward<Args>(args)...); }
};
} // namespace gatbl
#endif // GATBL_TYPE_ERASURE
|
79f1e521823ae829a79b76eff7e169bcc975e145
|
0e13c83dd8c30382f726c0510bc70c6e8fc0e474
|
/liboslayer/MessageQueue.hpp
|
5946f0316c89ad52d40c6f14d57c16bdb22061c9
|
[
"FSFAP",
"GPL-3.0-only"
] |
permissive
|
bjtj/oslayer
|
77900fa829e3d784eb42c0149c9a9dea292a2545
|
92cc41288a4bae8e63a680fe714806e89421df16
|
refs/heads/master
| 2021-01-23T12:15:50.391837
| 2019-02-09T08:00:41
| 2019-02-09T08:00:41
| 39,714,088
| 1
| 0
|
MIT
| 2018-03-05T01:44:14
| 2015-07-26T04:59:00
|
C++
|
UTF-8
|
C++
| false
| false
| 1,341
|
hpp
|
MessageQueue.hpp
|
#ifndef __MESSAGE_QUEUE_HPP__
#define __MESSAGE_QUEUE_HPP__
#include "AutoRef.hpp"
#include "Object.hpp"
#include <deque>
namespace osl {
/**
* message
*/
template <typename T>
class Message {
private:
int _what;
int _arg1;
int _arg2;
T _obj;
public:
Message() : _what(0), _arg1(0), _arg2(0) {}
Message(int what) : _what(what), _arg1(0), _arg2(0) {}
Message(int what, int arg1, int arg2) : _what(what), _arg1(arg1), _arg2(arg2) {}
Message(int what, int arg1, int arg2, T obj) : _what(what), _arg1(arg1), _arg2(arg2), _obj(obj) {}
Message(int what, T obj) : _what(what), _arg1(0), _arg2(0), _obj(obj) {}
virtual ~Message() {}
int & what() {return _what;}
int & arg1() {return _arg1;}
int & arg2() {return _arg2;}
T & obj() {return _obj;}
};
/**
* message queue
*/
template <typename T>
class MessageQueue {
private:
std::deque<Message<T> > messages;
public:
MessageQueue() {}
virtual ~MessageQueue() {}
bool empty() {
return messages.empty();
}
void enqueue(const Message<T> & msg) {
messages.push_back(msg);
}
Message<T> dequeue() {
Message<T> msg = messages.front();
messages.pop_front();
return msg;
}
Message<T> front() {
return messages.front();
}
size_t size() {
return messages.size();
}
};
}
#endif
|
1f2af1bdb1f06223cf081809d0a29865e18ec86a
|
7877d17c76b4ea6248ab52ffdf7f2b3c3a745353
|
/library/BaseLib/transmitterConnector/include/senseConnectorTypes.h
|
8842bc8f98ae42d375adae95f09181979d984ba0
|
[] |
no_license
|
andrij-felenko/tsmok
|
c8bb3bebe01eeac72cbfab935021e0fa4ac7bc85
|
a137c86caee877f8123464492945fa3850431afa
|
refs/heads/master
| 2023-03-29T15:55:35.587776
| 2021-03-25T14:45:35
| 2021-03-25T14:45:35
| 355,472,448
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,273
|
h
|
senseConnectorTypes.h
|
#ifndef SENSE_CONNECTOR_TYPES
#define SENSE_CONNECTOR_TYPES
namespace Tsmok::Sensory {
class SenseConnectorTypes
{
public:
SenseConnectorTypes() = default;
enum class FiveBase {
Visual = 0xA0, // sight
Auditory, // hearing
Gustatory, // taste
Olfactory, // smell
Tactile, // touch
};
enum class HumanCeption {
EquilibrioCeption = 0xB0, // Balance or Vestibular
ThermoCeption,
ProprioCeption, // kinesthetic sense, movement and relative positions of the parts of the body
NociCeption, // Physiological pain sense
MagnetoCeption,
SexualStimulus,
};
enum class Internal {
Hunger = 0xC0,
PulmonaryStretch,
ChemoReceptors, // sugar, drugs, hormones
CutaneousReceptors,
Gastrointestinal,
};
enum class NoSpecific {
ChronoCeption = 0xD0,
Agency, // the subjective feeling of having chosen a particular action
Familiarity, // recognition memory
};
enum class NoHuman {
Echolocation = 0xE0,
ElectroReception,
HygroReception,
InfaredSense,
};
};
}
#endif //SENSE_CONNECTOR_TYPES
|
ce96876aea9e7a1c507f64be6a5af6453a311bb3
|
9b700d31a4b856c7b121e8ea741a2604ed29a395
|
/GyroLights/GyroLights.ino
|
c28ef741b8bcb0609904a53ab484f208c82ac124
|
[
"MIT"
] |
permissive
|
egg82/Arduino
|
a7e09eec99ff101702df1873f11a8e73eac4712d
|
ebb61831cb38e45a6c9effd40c6f95443856a559
|
refs/heads/master
| 2020-09-12T02:31:50.289347
| 2019-12-07T02:22:06
| 2019-12-07T02:22:06
| 222,271,460
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,293
|
ino
|
GyroLights.ino
|
#include "LEDController.h"
#include "Gyro.h"
LEDController ledController;
Gyro gyro;
CRGB getRandColor() { return CRGB(random8(), random8(), random8()); }
void setup() {
Serial.begin(9600);
ledController = LEDController();
ledController.clear(CRGB::Black);
gyro = Gyro();
//gyro = Gyro(252.0, 457.0, 230.0, 473.0, 242.0, 455.0);
}
void loop() {
/*float x = gyro.readX();
float y = gyro.readY();
float z = gyro.readZ();
Serial.print("X: ");
Serial.print(x);
Serial.print(", Y: ");
Serial.print(y);
Serial.print(", Z: ");
Serial.println(z);
delay(1);*/
/*for (int i = 0; i < NUM_LEDS; i++) {
ledController.setLED(i, getRandColor());
delay(50);
}*/
/*float x = gyro.readX();
Serial.print("X: ");
Serial.print(x);
float y = gyro.readY();
Serial.print(", Y: ");
Serial.print(y);
float z = gyro.readZ();
Serial.print(", Z: ");
Serial.println(z);
delay(50);*/
/*delay(15000);
Serial.println("Min");
float min = 3.40282347e+38F;
for (int i = 0; i < 128; i++) {
float num;
for (int j = 0; j < 16; j++) {
num += gyro.readX();
delay(10);
}
num /= 16;
min = min(min, num);
}
Serial.println("Max");
delay(5000);
float max = -3.4028235e+38F;
for (int i = 0; i < 128; i++) {
float num;
for (int j = 0; j < 16; j++) {
num += gyro.readX();
delay(10);
}
num /= 16;
max = max(max, num);
}
Serial.print("X Min: ");
Serial.println(min);
Serial.print("X Max: ");
Serial.println(max);
delay(300000);*/
float min, max;
delay(15000);
Serial.println("X Min");
delay(5000);
Serial.println("Start");
min = 3.40282347e+38F;
for (int i = 0; i < 20480; i++) {
min = min(min, gyro.readRawX());
delay(1);
}
Serial.println("X Max");
delay(5000);
Serial.println("Start");
max = -3.4028235e+38F;
for (int i = 0; i < 20480; i++) {
max = max(max, gyro.readRawX());
delay(1);
}
Serial.print("X: ");
Serial.print(min);
Serial.print(", ");
Serial.println(max);
Serial.println("Y Min");
delay(5000);
Serial.println("Start");
min = 3.40282347e+38F;
for (int i = 0; i < 20480; i++) {
min = min(min, gyro.readRawY());
delay(1);
}
Serial.println("Y Max");
delay(5000);
Serial.println("Start");
max = -3.4028235e+38F;
for (int i = 0; i < 20480; i++) {
max = max(max, gyro.readRawY());
delay(1);
}
Serial.print("Y: ");
Serial.print(min);
Serial.print(", ");
Serial.println(max);
Serial.println("Z Min");
delay(5000);
Serial.println("Start");
min = 3.40282347e+38F;
for (int i = 0; i < 20480; i++) {
min = min(min, gyro.readRawZ());
delay(1);
}
Serial.println("Z Max");
delay(5000);
Serial.println("Start");
max = -3.4028235e+38F;
for (int i = 0; i < 20480; i++) {
max = max(max, gyro.readRawZ());
delay(1);
}
Serial.print("Z: ");
Serial.print(min);
Serial.print(", ");
Serial.println(max);
delay(300000);
}
|
9fbe188ce07531a534032ea6771cada2a9c7e08b
|
ee544bd13f56bcc06c5952b99b3d61e6fbfa2140
|
/Team00/Code00/src/spa/src/Tokenizer.cpp
|
d0cf5be6391cee87f12cc2f69631ec7e2d200caf
|
[] |
no_license
|
elevatethegame/Query-Parser-for-Static-Program-Analysis
|
791415498d1de572ac16e544d1c864e2769a4564
|
27896b6b388c10746fc7fde47bf8b6f01c99887c
|
refs/heads/query-preprocessor
| 2023-04-03T13:04:14.853729
| 2021-04-09T02:56:21
| 2021-04-09T02:56:21
| 339,255,218
| 0
| 0
| null | 2021-04-09T02:56:21
| 2021-02-16T01:33:22
|
C++
|
UTF-8
|
C++
| false
| false
| 8,820
|
cpp
|
Tokenizer.cpp
|
#include "Tokenizer.h"
#include "SyntacticException.h" // for throwing SyntacticException
#include <ctype.h> // for std::isdigit, std::isalpha
#include <algorithm> // for std::find
#include <iterator> // for std::begin, std::end
std::set<char> Tokenizer::specialCharactersAmongIdentifiers = {'_', '.', '#'};
std::set<std::string> Tokenizer::designEntities = { "stmt", "read", "print", "while", "if", "assign",
"variable", "constant", "procedure", "prog_line", "call" };
std::set<std::string> Tokenizer::attrNames = { "procName", "varName", "value", "stmt#" };
bool Tokenizer::canTreatAsIdent(TokenTypes type, std::string value) {
// Keyword TokenTypes which can also be treated as identifiers when accepting tokens
TokenTypes keywordTypes[] = { TokenTypes::Modifies, TokenTypes::Uses, TokenTypes::Parent,
TokenTypes::Follows, TokenTypes::Select, TokenTypes::Such, TokenTypes::That, TokenTypes::Pattern,
TokenTypes::Next, TokenTypes::Calls, TokenTypes::Affects,
TokenTypes::And, TokenTypes::With, TokenTypes::Boolean };
if (std::find(std::begin(keywordTypes), std::end(keywordTypes), type) != std::end(keywordTypes))
return true;
// Possibly an identifier with same name as design entity token
if (type == TokenTypes::DesignEntity && value != "prog_line")
return true;
if (type == TokenTypes::AttrName && value != "stmt#")
return true;
return false;
}
bool Tokenizer::canTreatAsTermSymbol(TokenTypes type) {
return type == TokenTypes::TermSymbol || type == TokenTypes::Asterisk;
}
std::string Tokenizer::getAttrRefSynonym(std::string tokenValue)
{
int periodIndex = tokenValue.find(".");
std::string synonym = tokenValue.substr(0, periodIndex);
return synonym;
}
std::string Tokenizer::getAttrRefAttrName(std::string tokenValue)
{
int periodIndex = tokenValue.find(".");
std::string attrName = tokenValue.substr(periodIndex + 1);
return attrName;
}
Tokenizer::Tokenizer(const std::string givenInput) : inputStream(givenInput)
{
}
std::unique_ptr<Token> Tokenizer::readInteger()
{
std::string integer = readWhile(std::isdigit);
return std::make_unique<Token>(Token{ TokenTypes::Integer, integer });
}
bool Tokenizer::isAlphanumericOrSpecialChar(char c)
{
for (char allowedSpecialCharacter : Tokenizer::specialCharactersAmongIdentifiers) {
if (c == allowedSpecialCharacter)
return true;
}
return std::isalnum(c);
}
bool Tokenizer::canTokenizeAsAttrRef(std::string identifier)
{
int periodIndex = identifier.find(".");
if (periodIndex <= 0 || periodIndex >= identifier.size() - 1) return false;
std::string synonym = identifier.substr(0, periodIndex);
std::string attrName = identifier.substr(periodIndex + 1);
// Synonym is not a valid identifier
for (int i = 1; i < synonym.size(); i++) {
if (!std::isalnum(synonym[i])) return false;
}
// AttrName is not valid
if (std::find(std::begin(Tokenizer::attrNames), std::end(Tokenizer::attrNames), identifier) != std::end(Tokenizer::attrNames)) {
return false;
}
return true;
}
std::unique_ptr<Token> Tokenizer::readIdentifier()
{
std::string identifier = std::string(1, inputStream.next());
identifier += readWhile(Tokenizer::isAlphanumericOrSpecialChar);
std::unique_ptr<Token> token;
if (identifier == "Select") {
token = std::make_unique<Token>(Token{ TokenTypes::Select, identifier });
}
else if (identifier == "such") {
token = std::make_unique<Token>(Token{ TokenTypes::Such, identifier });
}
else if (identifier == "that") {
token = std::make_unique<Token>(Token{ TokenTypes::That, identifier });
}
else if (identifier == "pattern") {
token = std::make_unique<Token>(Token{ TokenTypes::Pattern, identifier });
}
else if (identifier == "and") {
token = std::make_unique<Token>(Token{ TokenTypes::And, identifier });
}
else if (identifier == "Modifies") {
token = std::make_unique<Token>(Token{ TokenTypes::Modifies, identifier });
}
else if (identifier == "Uses") {
token = std::make_unique<Token>(Token{ TokenTypes::Uses, identifier });
}
else if (identifier == "Parent") {
token = std::make_unique<Token>(Token{ TokenTypes::Parent, identifier });
}
else if (identifier == "Follows") {
token = std::make_unique<Token>(Token{ TokenTypes::Follows, identifier });
}
else if (identifier == "Calls") {
token = std::make_unique<Token>(Token{ TokenTypes::Calls, identifier });
}
else if (identifier == "Next") {
token = std::make_unique<Token>(Token{ TokenTypes::Next, identifier });
}
else if (identifier == "Affects") {
token = std::make_unique<Token>(Token{ TokenTypes::Affects, identifier });
}
else if (identifier == "with") {
token = std::make_unique<Token>(Token{ TokenTypes::With, identifier });
}
else if (identifier == "BOOLEAN") {
token = std::make_unique<Token>(Token{ TokenTypes::Boolean, identifier });
}
else if (std::find(std::begin(Tokenizer::designEntities), std::end(Tokenizer::designEntities), identifier) != std::end(Tokenizer::designEntities)) {
token = std::make_unique<Token>(Token{ TokenTypes::DesignEntity, identifier });
}
else if (std::find(std::begin(Tokenizer::attrNames), std::end(Tokenizer::attrNames), identifier) != std::end(Tokenizer::attrNames)) {
token = std::make_unique<Token>(Token{ TokenTypes::AttrName, identifier });
}
else if (canTokenizeAsAttrRef(identifier)) {
token = std::make_unique<Token>(Token{ TokenTypes::AttrRef, identifier });
}
else {
// Valid identifier must not contain any special characters, throw syntax error if such characters found
bool isValidIdentifier = true;
for (char const& c : identifier) {
for (char allowedSpecialCharacter : Tokenizer::specialCharactersAmongIdentifiers) {
if (c == allowedSpecialCharacter) {
isValidIdentifier = false;
break;
}
}
if (!isValidIdentifier) break;
}
if (!isValidIdentifier)
throw SyntacticException("Invalid identifier encountered: " + identifier);
token = std::make_unique<Token>(Token{ TokenTypes::Identifier, identifier });
}
return token;
}
std::string Tokenizer::readWhile(std::function<bool(char)> predicate)
{
std::string str = "";
while (!inputStream.eof() && predicate(inputStream.peek())) {
str += inputStream.next();
}
return str;
}
std::unique_ptr<Token> Tokenizer::readNext()
{
readWhile(std::isspace);
if (inputStream.eof()) return std::unique_ptr<Token>();
char ch = inputStream.peek();
switch (ch)
{
case '*':
return std::make_unique<Token>(Token{ TokenTypes::Asterisk, std::string(1, inputStream.next()) });
break;
case '(':
return std::make_unique<Token>(Token{ TokenTypes::LeftParen, std::string(1, inputStream.next()) });
break;
case ')':
return std::make_unique<Token>(Token{ TokenTypes::RightParen, std::string(1, inputStream.next()) });
break;
case '"':
return std::make_unique<Token>(Token{ TokenTypes::DoubleQuote, std::string(1, inputStream.next()) });
break;
case '_':
return std::make_unique<Token>(Token{ TokenTypes::Underscore, std::string(1, inputStream.next()) });
break;
case ';':
return std::make_unique<Token>(Token{ TokenTypes::Semicolon, std::string(1, inputStream.next()) });
break;
case ',':
return std::make_unique<Token>(Token{ TokenTypes::Comma, std::string(1, inputStream.next()) });
break;
case '+':
case '-':
return std::make_unique<Token>(Token{ TokenTypes::ExprSymbol, std::string(1, inputStream.next()) });
break;
case '/':
case '%':
return std::make_unique<Token>(Token{ TokenTypes::TermSymbol, std::string(1, inputStream.next()) });
break;
case '<':
return std::make_unique<Token>(Token{ TokenTypes::LeftAngleBracket, std::string(1, inputStream.next()) });
break;
case '>':
return std::make_unique<Token>(Token{ TokenTypes::RightAngleBracket, std::string(1, inputStream.next()) });
break;
case '=':
return std::make_unique<Token>(Token{ TokenTypes::Equals, std::string(1, inputStream.next()) });
break;
default:
break;
}
if (std::isdigit(ch)) return readInteger();
if (std::isalpha(ch)) return readIdentifier();
throw SyntacticException("Cannot handle invalid character: " + ch);
}
|
8b018ca9981432b61909ca5048b620a56efe6dbd
|
5d8b6281a9d940b65c460e5d263887345339cb0a
|
/mete/IIImete/src/ThrMeteM/mete_init.cpp
|
c61c2e2866d67117e162a9c6d82fd2361c8c9924
|
[] |
no_license
|
ubuntu11/cTest
|
4064cfe6bc354ae54b74832030712251e547a5a8
|
b1529c47fe9209de719a497d94aa1e37c60fed1d
|
refs/heads/master
| 2023-07-11T10:50:00.130464
| 2021-08-18T07:51:43
| 2021-08-18T07:51:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,970
|
cpp
|
mete_init.cpp
|
/**********************************************************
* name: mete_init.cpp
*
* desc: 气象下载器的,初始化
*
* date: 20170803100107
*
***********************************************************/
#include "mete_init.h"
#include "funcLib.h"
//using namespace tinyxml2;
C_MSysInit* C_MSysInit::cInstance_p = NULL;
C_MSysInit::C_MSysInit()
{
prtDebugFlag = 0;
}
C_MSysInit::~C_MSysInit()
{
}
void C_MSysInit::setPrtFlag ( int iprtFlag )
{
prtDebugFlag = iprtFlag;
}
const int& C_MSysInit::getPrtFlag()
{
return prtDebugFlag;
}
const T_meteLogs& C_MSysInit::getMeteLog()
{
return meteLogs;
}
const char* C_MSysInit::getXmlName()
{
return locaXmlName;
}
const XMLDocument& C_MSysInit::getDoc()
{
return docLxml;
}
void C_MSysInit::init()
{
memset ( &meteLogs, 0, sizeof ( T_meteLogs ) );
memset ( locaXmlName, 0, sizeof ( locaXmlName ) );
memset ( fullOtherLog, 0, sizeof ( fullOtherLog ) );
//prtDebugFlag = 0;//打印错误日志flag, 0 打印,其他值 不打印
char vRetMsg[MC_ERRMSG_MAX];
memset ( vRetMsg, 0, sizeof ( vRetMsg ) );
int vRet = 0;
vRet = iniSys ( &meteLogs,
locaXmlName,
vRetMsg,
1,
&docLxml
);
if ( vRet != 0 )
{
printf ( "%s|%s|%d: iniSys vRet=[%d]\n%s",
__FILE__, __func__, __LINE__, vRet, vRetMsg );
return;
}
//获取是否打印debug配置及日志文件配置
prtDebugFlag = meteLogs.debugFlag;
snprintf ( fullOtherLog, sizeof ( fullOtherLog ),
"%s",
meteLogs.fullOtherLog );
vRet = getDoDirFromL ( docLxml,
MC_L_TOANTI,
toAnti_p,
vRetMsg
);
if ( vRet != 0 )
{
printf ( "%s|%s|%d: getDoDirFromL %s vRet=[%d]\n%s",
__FILE__, __func__, __LINE__, MC_L_TOANTI,
vRet, vRetMsg );
return;
}
vRet = getDoDirFromL ( docLxml,
MC_L_TOANTIBAK,
toAntiBak_p,
vRetMsg
);
if ( vRet != 0 )
{
printf ( "%s|%s|%d: getDoDirFromL %s vRet=[%d]\n%s",
__FILE__, __func__, __LINE__, MC_L_TOANTIBAK,
vRet, vRetMsg );
return;
}
return;
}
//void C_MSysInit::start()
//{
//
// init();
//
//}
//void C_MSysInit::stop()
void C_MSysInit::clear()
{
docLxml.Clear();
delete this;
}
C_MSysInit* C_MSysInit::Instance()
{
if ( cInstance_p == NULL )
{
cInstance_p = new C_MSysInit();
}
return cInstance_p;
}
|
76019870374c4e0d0561a6c04e8d695379fb8233
|
cf9efb609f32e0015110ab951b14bfeefddf0a27
|
/OTOO/OcTreeOpenCL.hpp
|
30621bc61ff6e862e2372f183adbf1cb47f11309
|
[] |
no_license
|
dadeba/OTOO-TEST
|
0acd14ab87ca2cd8999a8eb817f6662e56c44fec
|
7cb368dd5239d5a02e3075cdef38288dcb1020cd
|
refs/heads/master
| 2020-05-19T10:51:56.453636
| 2012-07-05T01:22:47
| 2012-07-05T01:22:47
| 4,893,034
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 20,792
|
hpp
|
OcTreeOpenCL.hpp
|
#ifndef OTOO_GRAVITYTREE_H
#define OTOO_GRAVITYTREE_H
#include "OpenCLDevice.hpp"
namespace OTOO {
struct PHKeys {
static const uint64 T0[12][8];
static const uint64 T1[12][8];
uint64 poi(uint64 key, uint64 level)
{
return (key >> 3*level)&0x7ULL;
}
uint64 Get(uint64 morton_key, uint64 maxlevel)
{
uint64 key = 0;
uint64 l = 0;
for(uint64 level = maxlevel; level >= 1; level--) {
// for(uint64 level = maxlevel; level >= 5; level--) {
uint64 p = poi(morton_key, level);
uint64 oo;
if (level >= maxlevel-1) {
oo = p;
} else {
oo = T0[l][p];
}
key |= (oo << (level*3));
l = T1[l][p];
}
return key;
}
};
// A B C D E F G H I J K M
// 0 1 2 3 4 5 6 7 8 9 10 11
const uint64 PHKeys::T0[12][8] = {
{0, 2, 3, 1, 5, 7, 6, 4},
{0, 1, 5, 4, 6, 7, 3, 2},
{0, 4, 6, 2, 3, 7, 5, 1},
{6, 4, 5, 7, 3, 1, 0, 2},
{6, 7, 3, 2, 0, 1, 5, 4},
{6, 2, 0, 4, 5, 1, 3, 7},
{5, 7, 6, 4, 0, 2, 3, 1},
{5, 4, 0, 1, 3, 2, 6, 7},
{5, 1, 3, 7, 6, 2, 0, 4},
{3, 1, 0, 2, 6, 4, 5, 7},
{3, 2, 6, 7, 5, 4, 0, 1},
{3, 7, 5, 1, 0, 4, 6, 2}
};
const uint64 PHKeys::T1[12][8] = {
{1, 2, 2, 9, 9, 8, 8, 4},
{2, 0, 0, 7, 7, 3, 3, 11},
{0, 1, 1, 5, 5, 10, 10, 6},
{4, 5, 5, 6, 6, 11, 11, 1},
{5, 3, 3, 10, 10, 0, 0, 8},
{3, 4, 4, 2, 2, 7, 7, 9},
{7, 8, 8, 3, 3, 2, 2, 10},
{8, 6, 6, 1, 1, 9, 9, 5},
{6, 7, 7, 11, 11, 4, 4, 0},
{10, 11, 11, 0, 0, 5, 5, 7},
{11, 9, 9, 4, 4, 6, 6, 2},
{9, 10, 10, 8, 8, 1, 1, 3}
};
class GravityTree {
public:
GravityTree(uint64);
~GravityTree();
void SetupOpenCL(int, int, const char *);
void ProfilingKernel();
void DumpInfo();
void CalcCM();
void CalcCM0();
void CalcCM(uint64);
void CalcB2(float, float);
void CalcB2(uint64, float, float);
void SetEPS(float);
void SetALLEPS2();
void GetMortonOrder(uint64 *);
void ConstructKeybasedTree(uint64, ArrayX3 &, ArrayX &);
void CalcGravityOpenCL(ArrayX3 &, ArrayX &);
void CalcGravity(ArrayX3 &, ArrayX &);
void CalcRootBox(uint64, ArrayX3 &, ArrayX &);
void SetParticles(uint64, ArrayX3 &, ArrayX &);
void CalcKeys();
void SortKeys();
void ResetCounter() {
count_interactions = 0.0;
}
double GetKernelTime(uint64 i) {
return accum_ker_time[i]/count_force;
}
void ClearTimingInfo();
void DumpTimingInfo();
void SetVL(uint64);
void EnableProfiling();
void DisableProfiling();
double GetCounter();
void GetCM(Vector3 &);
Vector4 GetCM();
void CalcGravity(float &ppx, float &ppy, float &ppz,
float &ax_t, float &ay_t, float &az_t, float &pot_t,
uint64 &body, uint64 &cell, uint64 &ss);
void CalcGravity(float &ppx, float &ppy, float &ppz);
protected:
uint64 MakeCell();
bool CellOrNot(uint64);
bool Particle(uint64);
int Key(float);
uint64 dilate3(uint32);
uint32 dilate_3(unsigned short);
uint64 poi(uint64, uint64);
void Recursive(uint64 cur, uint64 level, uint64 nk, Keys *k);
double GetKernelTime(cl::Event &e) {
cl_ulong st = e.getProfilingInfo<CL_PROFILING_COMMAND_START>();
cl_ulong en = e.getProfilingInfo<CL_PROFILING_COMMAND_END>();
return (en - st)*1.0e-9;
}
uint64 nalloc, nalloc0;
uint64 n, ncell;
ArrayX4 B;
#define PX(i) B((i),0)
#define PY(i) B((i),1)
#define PZ(i) B((i),2)
#define MS(i) B((i),3)
ArrayX4 X;
ArrayX S;
int *next, *more;
Keys *kk;
uint64 Root;
float RootSize;
#define n_opencldevice0 4
uint64 n_ocl_dev;
uint64 n_per_device;
std::vector<OpenCLDevice *> ov;
cl::Kernel ker[n_opencldevice0];
cl::Event ker_event[n_opencldevice0];
cl::Buffer b_pos[n_opencldevice0], b_size[n_opencldevice0], b_next[n_opencldevice0], b_more[n_opencldevice0];
cl::Buffer b_acc[n_opencldevice0], b_cc[n_opencldevice0];
std::string kernel_options;
uint64 opencl_offset[n_opencldevice0];
uint64 opencl_grav_thread[n_opencldevice0];
double accum_ker_time[n_opencldevice0];
uint64 count_force;
double kernel_execution_time;
double count_interactions;
float eps2, eps;
uint64 VL_kernel;
bool profiling;
bool counter;
uint64 maxdeeps;
// parameters for tree
static const uint64 empty;
static const uint64 maxlevel;
static const uint64 keyshift;
static const float cell_mass_min_frac;
static const float a_err_max_default;
static const uint64 ncrit;
cl::NDRange GetGlobalRange(uint64 __n) {
return cl::NDRange(__n);
}
cl::NDRange GetLocalRange() {
// return cl::NDRange(2*8,8);
// return cl::NDRange(8*2,8);
// return cl::NDRange(16, 4);
return cl::NDRange(64);
}
private:
PHKeys PHK;
};
const uint64 GravityTree::empty = -1ULL;
const uint64 GravityTree::maxlevel = 21;
const uint64 GravityTree::keyshift = maxlevel/2;
const float GravityTree::cell_mass_min_frac = 0.05;
const float GravityTree::a_err_max_default = 0.01;
const uint64 GravityTree::ncrit = 16;
GravityTree::GravityTree(uint64 np) {
nalloc0 = np;
nalloc = 2*np;
Allocate(nalloc, B);
Allocate(nalloc, S);
Allocate(nalloc0, X);
next = new int[nalloc];
more = new int[nalloc];
kk = new Keys[nalloc0];
SetEPS(0.001);
SetVL(8);
DisableProfiling();
}
GravityTree::~GravityTree() {
nalloc = 0;
delete next;
delete more;
delete kk;
}
void GravityTree::SetEPS(float e)
{
eps = e;
eps2 = e*e;
}
void GravityTree::SetVL(uint64 n)
{
if (n <= 16) VL_kernel = n;
else {
std::cerr << "Unsupported VL\n";
exit(-1);
}
std::stringstream options;
if (VL_kernel != 0) {
options << "-DVL=" << VL_kernel;
kernel_options = options.str();
}
}
void GravityTree::EnableProfiling() {
profiling = true;
counter = true;
}
void GravityTree::DisableProfiling() {
profiling = true;
counter = false;
}
double GravityTree::GetCounter() {
return count_interactions;
}
bool GravityTree::CellOrNot(uint64 ip)
{
return (ip >= n);
}
bool GravityTree::Particle(uint64 ip)
{
return !CellOrNot(ip);
}
uint64 GravityTree::MakeCell()
{
return (n + ncell++);
}
void GravityTree::CalcCM0()
{
#pragma omp parallel for schedule(dynamic)
for(uint64 i = 0; i < ncell; i++) {
uint64 i_node, c_node, stop;
Eigen::Vector4d cm;
cm << 0.0, 0.0, 0.0, 0.0;
i_node = Root + i;
c_node = i_node;
stop = next[c_node];
while(c_node != stop) {
if ( Particle(c_node) ) {
cm.x() += MS(c_node)*PX(c_node);
cm.y() += MS(c_node)*PY(c_node);
cm.z() += MS(c_node)*PZ(c_node);
cm.w() += MS(c_node);
c_node = next[c_node];
} else {
c_node = more[c_node];
}
}
PX(i_node) = cm.x()/cm.w();
PY(i_node) = cm.y()/cm.w();
PZ(i_node) = cm.z()/cm.w();
MS(i_node) = cm.w();
}
}
void GravityTree::CalcCM(uint64 root)
{
uint64 c_node, stop;
Eigen::Vector4d cm;
cm << 0.0, 0.0, 0.0, 0.0;
c_node = more[root];
stop = next[root];
while(c_node != stop) {
if ( !Particle(c_node) ) {
CalcCM(c_node);
}
cm.x() += MS(c_node)*PX(c_node);
cm.y() += MS(c_node)*PY(c_node);
cm.z() += MS(c_node)*PZ(c_node);
cm.w() += MS(c_node);
c_node = next[c_node];
}
PX(root) = cm.x()/cm.w();
PY(root) = cm.y()/cm.w();
PZ(root) = cm.z()/cm.w();
MS(root) = cm.w();
}
void GravityTree::CalcCM()
{
CalcCM(Root);
}
void GravityTree::CalcB2(uint64 root, float err, float m_frac)
{
uint64 i_node, stop;
double b2, bmax2;
float big_cell = 2.0*S[Root];
b2 = 0.0;
bmax2 = 0.0;
i_node = more[root];
stop = next[root];
while(i_node != stop) {
if ( !Particle(i_node) ) {
CalcB2(i_node, err, m_frac);
}
if (MS(root) > m_frac*MS(Root)) {
} else {
double dx, dy, dz, r2;
dx = PX(root) - PX(i_node);
dy = PY(root) - PY(i_node);
dz = PZ(root) - PZ(i_node);
r2 = dx*dx + dy*dy + dz*dz;
bmax2 = std::max(bmax2, r2);
b2 += MS(i_node)*r2;
}
i_node = next[i_node];
}
if (b2 == 0.0) {
S[root] = big_cell;
} else {
S[root] = 0.5*sqrt(bmax2) + sqrt(0.25*bmax2 + sqrt(3.0*b2/err));
}
S[root] = S[root]*S[root];
}
void GravityTree::CalcB2(float err, float m_frac)
{
// make the Root node far too large.
// S[Root] *= 2.0;
float big_cell = 2.0*S[Root];
#pragma omp parallel for schedule(dynamic)
for(uint64 i = 0; i < ncell; i++) {
uint64 i_node, c_node, stop;
double b2, bmax2;
b2 = 0.0;
bmax2 = 0.0;
i_node = Root+i;
if (MS(i_node) > m_frac*MS(Root)) {
// if a node is massive enough, make it larger too.
S[i_node] = big_cell;
} else {
c_node = i_node;
stop = next[c_node];
while(c_node != stop) {
if ( Particle(c_node) ) {
double dx, dy, dz, r2;
dx = PX(c_node) - PX(i_node);
dy = PY(c_node) - PY(i_node);
dz = PZ(c_node) - PZ(i_node);
r2 = dx*dx + dy*dy + dz*dz;
bmax2 = std::max(bmax2, r2);
b2 += MS(c_node)*r2;
c_node = next[c_node];
} else {
c_node = more[c_node];
}
}
// This is an absolute MAC.
// See Salmon&Warren 1993 : Skeltons from the Treecode Closet
S[i_node] = 0.5*sqrt(bmax2) + sqrt(0.25*bmax2 + sqrt(3.0*b2/err));
}
// compute the square of the node size
S[i_node] = S[i_node]*S[i_node];
}
}
void GravityTree::SetALLEPS2()
{
#pragma omp parallel for
for(uint64 i = 0; i < n; i++) {
S[i] = eps2;
}
}
void GravityTree::DumpInfo(void)
{
std::cout << n << "\t" << ncell << "\t" << RootSize << "\n";
std::cout << "root " << MS(Root) << " " << PX(Root) << " " << S[Root] << "\n";
}
int GravityTree::Key(float x)
{
return (int)(x*(float)(0x1<<maxlevel));
}
uint32 GravityTree::dilate_3(unsigned short t)
{
uint32 r = t;
r = (r * 0x10001) & 0xFF0000FF;
r = (r * 0x00101) & 0x0F00F00F;
r = (r * 0x00011) & 0xC30C30C3;
r = (r * 0x00005) & 0x49249249;
return r;
}
uint64 GravityTree::dilate3(uint32 t)
{
uint64 h, l;
uint64 mask = (0x1<<keyshift) - 1;
h = (uint64)dilate_3( t >> keyshift );
l = (uint64)dilate_3( t & mask );
return h<<(3*keyshift) | l;
}
uint64 GravityTree::poi(uint64 key, uint64 level)
{
// return (key >> 3*level)&0x7ULL;
return PHK.poi(key, level);
}
void GravityTree::Recursive(uint64 cur, uint64 level, uint64 nk, Keys *k)
{
bool flag[8] = {false, false, false, false, false, false, false, false};
uint64 cells[8], p_st[8], p_ne[8];
if (level == 0) {
std::cerr << " reach max level tree " <<"\n";
exit(-1);
}
maxdeeps = std::min(maxdeeps, level);
uint64 start = 0;
for(uint64 i = 0; i < 8; i++) {
uint64 j;
if (i == 7) {
// list all remaning particles
j = nk;
} else {
// find a next bunch of particles with key == i
if (poi(k[start].k, level) != i) {
// no particles
j = start;
} else {
// use a binary search to find the boundary
uint64 lo = start;
uint64 hi = nk;
uint64 mid = (hi+lo)/2;
while(hi-lo != 1 && mid != hi) {
uint64 q = poi(k[mid].k, level);
if (q > i) {
hi = mid;
} else {
lo = mid;
}
mid = (hi + lo)/2;
}
j = hi;
}
}
uint64 ne = j - start;
if (ne >= 1) {
flag[i] = true;
if (ne == 1) {
cells[i] = k[start].i;
} else {
cells[i] = MakeCell();
// cell_level[cells[i]] = level;
}
p_st[i] = start;
p_ne[i] = ne;
}
start = j;
}
uint64 fst_cell, lst_cell, c = 0, x[8];
for(uint64 i = 0; i < 8; i++) {
if (flag[i]) x[c++] = i;
}
fst_cell = cells[x[0]];
if (c == 0) {
lst_cell = fst_cell;
} else {
lst_cell = cells[x[c-1]];
}
for(uint64 i = 0; i < c; i++) {
cells[i] = cells[x[i]];
p_ne[i] = p_ne[x[i]];
p_st[i] = p_st[x[i]];
}
if (fst_cell == lst_cell) {
// one paticle
} else {
// link the cell to the next cell
for(uint64 i = 0; i < c-1; i++) {
next[cells[i]] = cells[i+1];
}
}
more[cur ] = fst_cell;
next[lst_cell] = next[cur];
for(uint64 i = 0; i < c; i++) {
if (p_ne[i] <= ncrit) {
// stop recursion and link particles in a cells[i]
uint64 fst_cell, lst_cell;
Keys *kk = &k[p_st[i]];
uint64 np = p_ne[i];
fst_cell = kk[0 ].i;
lst_cell = kk[np-1].i;
for(uint64 l = 0; l < np-1; l++) {
uint64 now = kk[l].i;
uint64 nei = kk[l+1].i;
next[now] = nei;
}
more[cells[i]] = fst_cell;
next[lst_cell] = next[cells[i]];
} else {
// continue to build tree ...
Recursive(cells[i], level-1, p_ne[i], &k[p_st[i]]);
}
}
}
void GravityTree::GetMortonOrder(uint64 *list)
{
for(uint64 i = 0; i < n; i++) {
list[i] = kk[i].i;
}
}
void GravityTree::CalcKeys()
{
float cx, cy, cz;
cx = PX(Root) - 0.5*RootSize;
cy = PY(Root) - 0.5*RootSize;
cz = PZ(Root) - 0.5*RootSize;
float R_I = 1.0/RootSize;
#pragma omp parallel for
for(uint64 i = 0; i < n; i++) {
uint64 key;
uint32 kx, ky, kz;
kx = Key((PX(i) - cx)*R_I);
ky = Key((PY(i) - cy)*R_I);
kz = Key((PZ(i) - cz)*R_I);
key = dilate3(kz)<<2 | dilate3(ky)<<1 | dilate3(kx);
kk[i].k = key;
kk[i].i = i;
kk[i].k = PHK.Get(key, maxlevel);
}
}
void GravityTree::SortKeys()
{
#ifdef _OPENMP
__gnu_parallel::sort(kk, kk + n, KeyCmp());
#else
std::sort(kk, kk + n, KeyCmp());
#endif
}
void GravityTree::ProfilingKernel() {
try {
/*
if (profiling) {
cl_ulong st = kernel_event.getProfilingInfo<CL_PROFILING_COMMAND_START>();
cl_ulong en = kernel_event.getProfilingInfo<CL_PROFILING_COMMAND_END>();
kernel_execution_time = (en - st)*1.0e-9;
std::cerr << kernel_execution_time << "\t";
if (counter) {
int *cc;
o->q.enqueueReadBuffer(b_cc, CL_TRUE, 0, n*sizeof(cl_int), X.data());
cc = (int *)X.data();
double cc_total = 0.0;
for(uint64 i = 0; i < n; i++) cc_total += (double)cc[i];
count_interactions += cc_total;
std::cerr << " " << 38.0*cc_total/kernel_execution_time/1.0e9 << "GFlops " << cc_total <<"\n";
}
}
*/
} catch( cl::Error e ) {
std::cerr << e.what() << ":" << e.err() << "\n";
exit(-1);
}
}
void GravityTree::CalcGravity(float &ppx, float &ppy, float &ppz,
float &ax_t, float &ay_t, float &az_t, float &pot_t,
uint64 &body, uint64 &cell, uint64 &ss)
{
uint64 self;
float dx, dy, dz, r2, r1i, r2i, phi;
ax_t = 0.0;
ay_t = 0.0;
az_t = 0.0;
pot_t = 0.0;
body = 0;
cell = 0;
ss = 0;
self = Root;
while(self != empty) {
dx = ppx - PX(self);
dy = ppy - PY(self);
dz = ppz - PZ(self);
r2 = dx*dx + dy*dy + dz*dz;
if ( !CellOrNot(self) ) {
if (r2 != 0.0) {
r2i = 1.0/(r2 + S[self]);
r1i = sqrt(r2i);
phi = MS(self)*r1i;
pot_t-= phi;
phi *= r2i;
ax_t -= phi*dx;
ay_t -= phi*dy;
az_t -= phi*dz;
body++;
} else {
ss++;
}
self = next[self];
} else {
if (r2 > S[self]) {
r2i = 1.0/r2;
r1i = sqrt(r2i);
phi = MS(self)*r1i;
pot_t-= phi;
phi *= r2i;
ax_t -= phi*dx;
ay_t -= phi*dy;
az_t -= phi*dz;
cell++;
self = next[self];
} else {
self = more[self];
}
}
}
}
void GravityTree::CalcGravity(ArrayX3 &A, ArrayX &P)
{
uint64 count = 0;
for(uint64 i = 0; i < n; i++) {
uint64 body, cell, ss;
float ppx, ppy, ppz, ax_t, ay_t, az_t, pot_t;
ppx = PX(i);
ppy = PY(i);
ppz = PZ(i);
GravityTree::CalcGravity(ppx, ppy, ppz, ax_t, ay_t, az_t, pot_t, body, cell, ss);
A(i,0) = ax_t;
A(i,1) = ay_t;
A(i,2) = az_t;
P(i) = pot_t;
count += body + cell;
}
std::cout << count << " " << (float)count/n << "\n";
}
void GravityTree::CalcGravityOpenCL(ArrayX3 &A, ArrayX &P)
{
try {
int ns = n + ncell;
#pragma omp parallel for
for(uint64 i = 0; i < n_ocl_dev; i++) {
ker[i].setArg(0, b_pos[i]);
ker[i].setArg(1, b_size[i]);
ker[i].setArg(2, b_next[i]);
ker[i].setArg(3, b_more[i]);
ker[i].setArg(4, b_acc[i]);
ker[i].setArg(5, (int)n);
ker[i].setArg(6, (int)n);
ker[i].setArg(7, (int)(opencl_offset[i]));
cl_bool flag = CL_FALSE;
ov[i]->q.enqueueWriteBuffer(b_pos[i], flag, 0, ns*sizeof(cl_float4), B.data());
ov[i]->q.enqueueWriteBuffer(b_next[i], flag, 0, ns*sizeof(cl_int), next);
ov[i]->q.enqueueWriteBuffer(b_more[i], flag, 0, ns*sizeof(cl_int), more);
ov[i]->q.enqueueWriteBuffer(b_size[i], flag, 0, ns*sizeof(cl_float), S.data());
ov[i]->q.enqueueNDRangeKernel(ker[i],
cl::NullRange,
cl::NDRange(opencl_grav_thread[i]),
GetLocalRange(),
NULL, &ker_event[i]);
ov[i]->q.flush();
ker_event[i].wait();
flag = CL_TRUE;
ov[i]->q.enqueueReadBuffer(b_acc[i], flag, 0, n_per_device*sizeof(cl_float4),
X.bottomRows(n - opencl_offset[i]).data());
accum_ker_time[i] += GetKernelTime(ker_event[i]);
}
A = X.leftCols(3);
P = -X.rightCols(1);
} catch( cl::Error e ) {
std::cerr << e.what() << ":" << e.err() << "\n";
exit(-1);
}
count_force++;
}
void GravityTree::SetParticles(uint64 np, ArrayX3 &P, ArrayX &M)
{
// Block operations
// See http://eigen.tuxfamily.org/dox/TutorialBlockOperations.html
B.topLeftCorner(np,3) = P;
B.topRightCorner(np,1) = M;
}
void GravityTree::CalcRootBox(uint64 np, ArrayX3 &P, ArrayX &M)
{
n = np;
SetParticles(np, P, M);
Vector3 pmax = P.colwise().maxCoeff();
Vector3 pmin = P.colwise().minCoeff();
Vector3 box = pmax - pmin;
RootSize = box.maxCoeff();
RootSize = RootSize*1.01;
Vector3 center = 0.5*(pmax + pmin);
ncell = 0;
Root = MakeCell();
S[Root] = RootSize;
PX(Root) = center.x();
PY(Root) = center.y();
PZ(Root) = center.z();
next[Root] = -1;
// cell_level[Root] = maxlevel;
// cell_level.assign(np, 0);
}
void GravityTree::ConstructKeybasedTree(uint64 np, ArrayX3 &P, ArrayX &M)
{
double dum_all = e_time();
double dum = e_time();
CalcRootBox(np, P, M);
CalcKeys();
std::cerr << " CK " << e_time() - dum;
dum = e_time();
SortKeys();
std::cerr << " SK " << e_time() - dum;
dum = e_time();
maxdeeps = maxlevel-1;
Recursive(Root, maxlevel-1, n, &kk[0]);
std::cerr << " CT " << e_time() - dum;
std::cerr << " SUM " << e_time() - dum_all << " " << maxdeeps << " :: ";
}
void GravityTree::GetCM(Vector3 &c)
{
c.x() = PX(Root);
c.y() = PY(Root);
c.z() = PZ(Root);
}
Vector4 GravityTree::GetCM()
{
return B.row(Root);
}
void GravityTree::SetupOpenCL(int ip = 0, int id = 0, const char *k_f = "grav.cl")
{
try {
if (id < 0) {
id = -id;
n_ocl_dev = id;
} else {
n_ocl_dev = 1;
}
n_per_device = nalloc0/n_ocl_dev;
for(uint64 i = 0; i < n_ocl_dev; i++) {
ov.push_back(new OpenCLDevice(ip));
ov[i]->SetupContext( n_ocl_dev == 1 ? id : i );
ov[i]->SetKernelOptions(kernel_options);
ov[i]->BuildOpenCLKernels(k_f);
ker[i] = ov[i]->GetKernel("tree_v");
// read only buffers (HOST -> GPU)
b_pos[i] = cl::Buffer(ov[i]->ctx, CL_MEM_READ_ONLY, nalloc*sizeof(cl_float4));
b_size[i] = cl::Buffer(ov[i]->ctx, CL_MEM_READ_ONLY, nalloc*sizeof(cl_float));
b_next[i] = cl::Buffer(ov[i]->ctx, CL_MEM_READ_ONLY, nalloc*sizeof(cl_int));
b_more[i] = cl::Buffer(ov[i]->ctx, CL_MEM_READ_ONLY, nalloc*sizeof(cl_int));
// output buffers (GPU -> HOST)
b_acc[i] = cl::Buffer(ov[i]->ctx, CL_MEM_WRITE_ONLY, (n_per_device)*sizeof(cl_float4));
opencl_offset[i] = n_per_device*i;
opencl_grav_thread[i] = n_per_device/VL_kernel;
}
} catch( cl::Error e ) {
std::cerr << e.what() << ":" << e.err() << "\n";
exit(-1);
}
}
void GravityTree::ClearTimingInfo()
{
for(uint64 i = 0; i < n_opencldevice0; i++) {
accum_ker_time[i] = 0.0;
}
count_force = 0;
}
void GravityTree::DumpTimingInfo()
{
std::cerr << "GRAV ";
for(uint64 i = 0; i < n_ocl_dev; i++) {
std::cerr << i << " " << accum_ker_time[i]/count_force << "\t";
}
std::cerr << "\n";
}
}
#endif
|
fb29862a825fcae8bfff78e0519d701e7c26f6ec
|
cde9dc97b0fc3df945e2500a4b21deb9caf994cf
|
/ilwiscore/include/ilwisobjects/geometry/georeference/cornersgeoreference.h
|
69cfb9664abcb1a1930c9d01a4bf3abbbdb06427
|
[] |
no_license
|
MartinSchouwenburg/ilwisobjects
|
7bbe06a9c097472dea0496522465f59701782351
|
ad59176c1eb79d56089abc009ea1622958d78fe4
|
refs/heads/main
| 2023-05-10T13:46:05.864706
| 2021-06-14T08:56:55
| 2021-06-14T08:56:55
| 373,075,845
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,671
|
h
|
cornersgeoreference.h
|
/*IlwisObjects is a framework for analysis, processing and visualization of remote sensing and gis data
Copyright (C) 2018 52n North
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/
#ifndef CORNERSGEOREFERENCE_H
#define CORNERSGEOREFERENCE_H
#include "kernel_global.h"
namespace Ilwis {
class GeoRefImplementation;
class KERNELSHARED_EXPORT CornersGeoReference : public SimpelGeoReference
{
public:
CornersGeoReference();
CornersGeoReference(const Resource& resource);
void internalEnvelope(const Envelope& env);
int compute();
QSize computeGridSize() const;
bool isCornersOfCorners() const;
Envelope internalEnvelope() const;
GeoRefImplementation *clone();
static QString typeName();
bool isCompatible(const IlwisData<GeoReference>& georefOther) const;
QString grfType() const;
static GeoRefImplementation *create();
private:
void copyTo(GeoRefImplementation *impl);
Envelope _internalEnvelope;
};
typedef IlwisData<CornersGeoReference> ICornersGeoReference;
}
#endif // CORNERSGEOREFERENCE_H
|
67eb3e09ce8521e384f9cfa6a4b5671189b647e1
|
8350ba26f61854b656270e26653e96bd1aefbc83
|
/src/FindFileJob.h
|
16f2e77bee4e4867162ed985e6d6fa7b366c272b
|
[] |
no_license
|
qyqx/rtags
|
1ea7f7267f71cb50b640c3f6e1c903430444ec67
|
f2506bab26a22b31123eafc9f46c467a0d3e9722
|
refs/heads/master
| 2020-12-01T01:15:40.706146
| 2013-07-14T21:55:41
| 2013-07-14T21:55:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 400
|
h
|
FindFileJob.h
|
#ifndef FindFileJob_h
#define FindFileJob_h
#include <rct/String.h>
#include <rct/List.h>
#include "RTagsClang.h"
#include "Job.h"
#include "Location.h"
#include <rct/RegExp.h>
class FindFileJob : public Job
{
public:
FindFileJob(const QueryMessage &query, const shared_ptr<Project> &project);
protected:
virtual void execute();
private:
String mPattern;
RegExp mRegExp;
};
#endif
|
fd821a65606f93cb2074d6909b089349f95dbf9f
|
0ce577bad754c58a376834299e776a13637ed92d
|
/aaaaa/Range.h
|
84f1f262717c0f79fdb9c03e061878751cc0bf1a
|
[] |
no_license
|
Aescosaurus/directx-is-hard
|
d0b5e30dbb9876698076804b92773bd7a4ae84e1
|
ac66116b6fbabb92b9a3b7ca11c7325e64c56963
|
refs/heads/master
| 2023-01-13T12:15:42.310613
| 2020-11-06T03:40:39
| 2020-11-06T03:40:39
| 310,483,790
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 396
|
h
|
Range.h
|
#pragma once
#include "Random.h"
#include <algorithm>
// suck it windows
#undef min
#undef max
template<typename T>
class Range_
{
public:
Range_( T min,T max )
:
min( min ),
max( max )
{
if( min > max ) std::swap( min,max );
}
operator T() const
{
return( T( Random::Range( min,max ) ) );
}
public:
T min;
T max;
};
typedef Range_<float> Range;
typedef Range_<int> RangeI;
|
5c0ab464d1b6823709dd33687386a97200aa7a9d
|
48eb1b74ad6fe59d1104f7102d01f1fe939408fa
|
/Source/LifeOfMercenary/Public/Quest/QuestManager.h
|
7bb1d6485449054de491de3df5a0ed73d32ce7f9
|
[] |
no_license
|
Tackkyun/LifeOfMercenary_Git
|
2db8315377664a0e29e39d7884f70522b8e9d818
|
aad844a8189e67a17ed49db59bf361af18d262f8
|
refs/heads/master
| 2020-05-03T09:02:29.015592
| 2019-06-18T09:29:43
| 2019-06-18T09:29:43
| 178,543,309
| 0
| 0
| null | null | null | null |
UHC
|
C++
| false
| false
| 3,545
|
h
|
QuestManager.h
|
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "Engine/DataTable.h" // FTableRowBase
#include "QuestManager.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FChangeQuestList);
USTRUCT(BlueprintType)
struct FQuestData : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
public:
FQuestData() : Num(0), Title("NONE"), Client("NONE"), StartDate("NONE"), EndDate("NONE"),
Pay(0), Fame(0), Deposit(0), IsEnd(true), DetailStory("NONE") {}
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
int32 Num;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
FString Title;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
FString Client;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
FString StartDate;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
FString EndDate;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
int32 Pay;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
int32 Fame;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
int32 Deposit;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
bool IsEnd;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DT_RQ")
FString DetailStory;
};
USTRUCT(BlueprintType)
struct FReward
{
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadWrite, Category = "Reword")
float money;
UPROPERTY(BlueprintReadWrite, Category = "Reword")
float fame;
};
/**
*
*/
UCLASS()
class LIFEOFMERCENARY_API UQuestManager : public UObject
{
GENERATED_BODY()
public:
UQuestManager();
~UQuestManager() {};
//퀘스트 목록이 담긴 데이터 테이블
UPROPERTY()
UDataTable* gameObjectLookupTable = nullptr;
private:
//퀘스트 갯수
int32 totalQuestNum = 0;
//현재 퀘스트
int32 currentQuest = INDEX_NONE;
//완료 퀘스트 배열
TArray<int32> complateQuestArray;
public:
//현재날짜(일단위)로 부터 전후 일의 퀘스트들을 반환
UFUNCTION(BlueprintCallable, Category = "QuestManager")
TArray<int32> GetQuestByDate(int32 _date, int32 _beforeDate, int32 _afterDate);
//퀘스트 수락
UFUNCTION(BlueprintCallable, Category = "QuestManager")
bool AcceptQuest(int32 _num);
//퀘스트 완료
UFUNCTION(BlueprintCallable, Category = "QuestManager")
FReward ComlateQuest(bool _isSuccess);
//해당 번호의 퀘스트 얻어오기. 0번부터 시작.
UFUNCTION(BlueprintCallable, Category = "QuestManager")
FQuestData GetQuestData(int32 _num);
//현재 퀘스트 삭제
UFUNCTION(BlueprintCallable, Category = "QuestManager")
void DeleteCurrentQuest();
//접근자
UFUNCTION(BlueprintCallable, Category = "QuestManager")
int32 GetCurrentQuest();
//완료한 퀘스트 배열
UFUNCTION(BlueprintCallable, Category = "QuestManager")
TArray<int32> GetComplateQuestArray();
//퀘스트 리스트 변화시 호출되는 Delegate
UPROPERTY(BlueprintCallable, Category = "QuestManager")
FChangeQuestList changedQuestList;
private:
//퀘스트 갯수 세팅
void SetQuestNum();
//퀘스트 성공
FReward SuccesQuest();
//퀘스트 실패
FReward FailQuest();
//미수행퀘스트에서 현재퀘스트로
bool UnperformedToCurrent(int32 _num);
//현재퀘스트에서 완료퀘스트로
bool CurrentToComlate();
//완료 퀘스트 목록에 해당 퀘스트가 있는지 여부
bool ComplateQuestArrayHaveNum(int32 _num);
};
|
e22e5a1245699d537c199615b3d64b3317590f9a
|
00ab7afe1168efffeb640aa4e9aee7d7e3e98327
|
/codeup/100000566/F.cpp
|
6bba89f840a4084c125d132498beb1aab8b71cdd
|
[] |
no_license
|
fylr/algorithm
|
16f84351b3282f39051776f74cfd8c5e7f51655d
|
743132323f66b23a2cd3ecdd7145c9c5bedf1bfc
|
refs/heads/main
| 2023-06-28T00:11:40.034266
| 2021-07-28T13:14:39
| 2021-07-28T13:14:39
| 360,783,353
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 120
|
cpp
|
F.cpp
|
#include<stdio.h>
#include<stdlib.h>
int main()
{
char str[5];
scanf("%s", &str);
printf("%s\n", str);
return 0;
}
|
c7f5100e5e060a99f173be7646058c402975d357
|
924f21b8066b0167d28f6545ba4f3729b084602a
|
/include/yds_key_maps.h
|
28ff1cd139788f01a9b635326f5df2ee43e2e4ad
|
[
"MIT"
] |
permissive
|
ArwinSaleh/delta-studio
|
34a3bd24b07679d3f105430f113f489d4532ffdf
|
a06675cfa7c8981093bb7da6cec204c2216a4371
|
refs/heads/master
| 2023-03-04T09:10:35.447322
| 2021-01-30T21:55:18
| 2021-01-30T21:55:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 303
|
h
|
yds_key_maps.h
|
#ifndef YDS_KEY_MAPS_H
#define YDS_KEY_MAPS_H
#include "yds_keyboard.h"
class ysKeyMaps {
public:
ysKeyMaps() { m_windowsKeyMap = nullptr; }
~ysKeyMaps() {}
static const ysKey::Code *GetWindowsKeyMap();
protected:
static ysKey::Code *m_windowsKeyMap;
};
#endif /* YDS_KEY_MAPS_H */
|
53a1b33163335e10536ff34b1b765793fa49d753
|
b786a05c5bd90e660690427c54c95be9e02516b9
|
/practical-07-11/third_test.cpp
|
230622d3556149f8d2f9e67ca5acefdcd6a4ab0c
|
[] |
no_license
|
Zacsch/OOP
|
9e81f27a0fe6c50f4b97a3dd139e2ef5985ff3cd
|
86444cd4b91612631b57c03c28bb3c4894233cb4
|
refs/heads/master
| 2020-03-15T09:11:05.209582
| 2018-05-24T03:52:02
| 2018-05-24T03:52:02
| 132,069,064
| 0
| 1
| null | 2018-05-04T01:46:56
| 2018-05-04T01:28:42
| null |
UTF-8
|
C++
| false
| false
| 3,574
|
cpp
|
third_test.cpp
|
#include <iostream>
#include <string>
using namespace std;
int main()
{
int numberOfHumans;
cin >> numberOfHumans;
int numberOfPlayers;
cin >> numberOfPlayers;
string playerNames[5]={"a","b","c","d","e"};
bool playerType[numberOfPlayers];
for (int i=0; i<numberOfPlayers; i++)
{
cin >> playerType[i];
}
int humanPlayerTurn=0; //set to the next human player to have their turn
int compPlayerTurn=0; //set to the next computer player to have their turn
int firstPlayer=1; //get the number that represents the first player to indicate the round is complete. This is initially player 2 (array position 1)
int currentPlayer=1; //get the current player number, initially it is player 2
if ((playerType[0]))
{
humanPlayerTurn++; //if the first player inputted was human, then the second human player will be the first human player to have their turn
if (humanPlayerTurn==numberOfHumans)
{
humanPlayerTurn=0;
}
}
else
{
compPlayerTurn++; //if the first player inputted was a computer player then the second computer player will be the first computer player to have their turn
if (compPlayerTurn==numberOfPlayers-numberOfHumans)
{
compPlayerTurn=0;
}
}
cout << humanPlayerTurn << compPlayerTurn << endl;
string turnStart; //used later for holding play until an input is placed
while (true)
{
bool blackjack=0; //check for instant win condition
int win; //return score of hand
for (int i=0;i<numberOfHumans;i++) //for loop to check the hand of each human player
{
cin >> win;
if (win) //does someone have a hand value of 21
{
blackjack=1; //set condition used to skip next do loop
}
cout << win << endl;
}
for (int i=0;i<(numberOfPlayers-numberOfHumans);i++) //same as for loop above but for computer players
{
cin >> win;
if (win)
{
blackjack=1;
}
cout << win << endl;
}
do
{
if (blackjack) //did someone get 21 on their starting hand
{
cout << "break due to blackjack" << endl;
break; //skip to the end of the loop if someone has blackjack
}
if (playerType[currentPlayer]) //is the next player a human player?
{
cout << playerNames[currentPlayer] << "- it is your turn (type something (it can be anything) then press enter)" << endl;
cin >> turnStart; //random variable to hold play until an input is placed
humanPlayerTurn++; //increase to call for the next human player when their turn comes around
if (humanPlayerTurn==numberOfHumans)
{
humanPlayerTurn=0; //reset to 0 if the last human player was the last one inputted
}
}
else //if the player is not human then the player must be computer
{
cout << playerNames[currentPlayer] << "- it is your turn" << endl; //display who's turn it is
compPlayerTurn++; //increase to call for the next computer player when their turn comes around
if (compPlayerTurn==numberOfPlayers-numberOfHumans)
{
compPlayerTurn=0; //reset to 0 if the last computer player was the last one inputted
}
}
currentPlayer++; //increment to call the next player
if (currentPlayer==numberOfPlayers)
{
currentPlayer=0; //reset to 0 if current player was the last player just before
}
cout << humanPlayerTurn << compPlayerTurn << currentPlayer << endl;
} while(currentPlayer!=firstPlayer);
return 0;
}
}
|
c5ba2da24ff2b9097db6d6eae08883f16cff5dff
|
ecc6a41152867476f960f7e736a4aac67e325a1f
|
/NSCashe.cpp
|
9187d15d199791a585606c8539a31cb5d6cecaf6
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
teknikqa/sirius
|
375f6674c25e54776ff7733f8efc99031894a7cd
|
684770782d689c53eb67003f7c9b8527b2cf2686
|
refs/heads/master
| 2020-05-17T09:12:50.236976
| 2013-03-13T07:25:37
| 2013-03-13T07:25:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,940
|
cpp
|
NSCashe.cpp
|
//////////////////////////////////////////////////////////////////////
// NSCashe.cpp: implementation of the CNSCashe class.
// very simple internet name resolve and cache system by Teknikqa
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <winsock.h>
#include "Sirius.h"
#include "NSCashe.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CNSCashe::CNSCashe()
{
m_NSStack = NULL;
m_bNameResolve = FALSE;
}
CNSCashe::~CNSCashe()
{
// free class memory
PNSEntry pNSTemp, pNS = m_NSStack;
while (NULL != pNS) {
delete [] pNS->szName;
pNSTemp = pNS;
pNS = pNS->next;
delete pNSTemp;
}
}
char * CNSCashe::GetNameByIP(DWORD dwIP)
{
if (!m_bNameResolve)
return inet_ntoa(*(in_addr *)(&dwIP));
// check is it already in cashe stack
char *szName = FindNameByIP(dwIP);
if (NULL != szName)
return szName;
// add new value
PNSEntry pNewNS = new TNSEntry;
pNewNS->dwIP = dwIP;
HOSTENT *pHostEnt = gethostbyaddr((char *)&dwIP, sizeof(DWORD), AF_INET);
char *szAddr;
if (NULL == pHostEnt) {
szAddr = new char [16];
strcpy(szAddr, inet_ntoa(*(in_addr *)(&dwIP)));
}
else {
szAddr = new char [strlen(pHostEnt->h_name)+2];
strcpy(szAddr, pHostEnt->h_name);
}
pNewNS->szName = szAddr;
pNewNS->next = m_NSStack;
m_NSStack = pNewNS;
return szAddr;
}
char * CNSCashe::FindNameByIP(DWORD dwIP)
{
PNSEntry pNS = m_NSStack;
while (NULL != pNS) {
if (dwIP == pNS->dwIP)
return pNS->szName;
pNS = pNS->next;
}
return NULL;
}
BOOL CNSCashe::EnableNameResolve(BOOL bEnable)
{
BOOL bOld = m_bNameResolve;
m_bNameResolve = bEnable;
return bOld;
}
|
f6fba9f6084f29c142bd7de4a7ebf21be8605757
|
d2988c8498c94c5b3c4019ae370c118301eb5783
|
/src/core/cpu_kernel/avx/dispatch_avx.h
|
837e94f2dc28d5cf561c828db2d54c630fd5f460
|
[
"MIT"
] |
permissive
|
zpzim/SCAMP
|
34faf8a177ac3fb422d8fd058b143f9313f82173
|
fe867f9cf755d149f1a7aa98b6ed0509c1311fac
|
refs/heads/master
| 2023-08-09T00:48:29.592709
| 2023-08-01T00:14:19
| 2023-08-01T00:14:19
| 127,799,249
| 134
| 39
|
MIT
| 2022-08-04T14:51:57
| 2018-04-02T18:58:28
|
C++
|
UTF-8
|
C++
| false
| false
| 297
|
h
|
dispatch_avx.h
|
#pragma once
#include "core/kernel_common.h"
#include "core/tile.h"
namespace SCAMP {
SCAMPError_t dispatch_kernel_avx(SCAMPKernelInputArgs<double> args, Tile *t,
void *profile_a, void *profile_b, bool do_rows,
bool do_cols);
}
|
466dd68970f2cd99077a9ffe494d08fc55b68011
|
b907b0cfd758d5db53b6a8852e5c369fe4b6e775
|
/include/common.h
|
e39b9c7cea946399d5475c25a348956a12cc1af3
|
[] |
no_license
|
swpustc/system-constituent
|
131d8d03b873926ad652a36c427f1f7245446d10
|
1dde770100487524a834583826526ec831b317a5
|
refs/heads/master
| 2020-12-24T05:42:04.461726
| 2016-10-04T03:10:13
| 2016-10-04T03:10:13
| 34,052,974
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 15,789
|
h
|
common.h
|
/**********************************************************
* STL算法扩展
* 支持平台:Windows; Linux
* 编译环境:VS2013+; g++ -std=c++11
***********************************************************/
#pragma once
#include <ctime>
#include <mutex>
#include <atomic>
#include <chrono>
#include <cstdio>
#include <memory>
#include <codecvt>
#include <cstdint>
#include <fstream>
#include <sstream>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <type_traits>
#if defined(_WIN32) || defined(WIN32)
#include <tchar.h>
#include <crtdefs.h>
#include <Windows.h>
#else // Linux
#include <unistd.h>
#include <sys/time.h>
#endif // #if defined(_WIN32) || defined(WIN32)
#include "system_constituent_version.h"
#if defined(_WIN32) || defined(WIN32)
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
inline int gettimeofday(struct timeval* tv, struct timezone* tz)
{
if (tv)
{
union filetime_t
{
FILETIME ft;
DWORD64 ut;
} filetime;
DWORD64 time_now;
static const DWORD64 EPOCH_BIAS = 116444736000000000; /*1970/01/01*/
::GetSystemTimeAsFileTime(&filetime.ft);
time_now = filetime.ut - EPOCH_BIAS;
tv->tv_sec = (long)(time_now / 10000000ULL);
tv->tv_usec = (long)((time_now % 10000000ULL) / 10ULL);
}
if (tz)
{
TIME_ZONE_INFORMATION TimeZoneInformation;
::GetTimeZoneInformation(&TimeZoneInformation);
tz->tz_dsttime = (int)TimeZoneInformation.DaylightBias;
tz->tz_minuteswest = (int)TimeZoneInformation.Bias;
}
return 0;
}
#else // UNIX
#define OutputDebugStringW(...) void()
#define OutputDebugStringA(...) void()
#define OutputDebugString(...) void()
#endif // #if defined(_WIN32) || defined(WIN32)
template<class T> inline auto auto_max(T&& t) -> decltype(::std::forward<T>(t))
{
return ::std::forward<T>(t);
}
template<class T1, class T2, class... Args> inline
auto auto_max(T1&& t1, T2&& t2, Args&&... args)
-> decltype(::std::forward<T1>(t1) > ::std::forward<T2>(t2) ? ::std::forward<T1>(t1) : ::std::forward<T2>(t2))
{
return auto_max(::std::forward<T1>(t1) > ::std::forward<T2>(t2) ?
::std::forward<T1>(t1) : ::std::forward<T2>(t2), ::std::forward<Args>(args)...);
}
template<class T> inline auto auto_min(T&& t) -> decltype(::std::forward<T>(t))
{
return ::std::forward<T>(t);
}
template<class T1, class T2, class... Args> inline
auto auto_min(T1&& t1, T2&& t2, Args&&... args)
-> decltype(::std::forward<T1>(t1) < ::std::forward<T2>(t2) ? ::std::forward<T1>(t1) : ::std::forward<T2>(t2))
{
return auto_min(::std::forward<T1>(t1) < ::std::forward<T2>(t2) ?
::std::forward<T1>(t1) : ::std::forward<T2>(t2), ::std::forward<Args>(args)...);
}
template<class T> inline
typename ::std::decay<T>::type decay_type(T&& arg)
{
return ::std::forward<T>(arg);
}
struct function_wapper
{
template<class Fn, class... Args> inline void operator()(Fn&& fn, Args&&... args)
{
decay_type(::std::forward<Fn>(fn))(decay_type(::std::forward<Args>(args))...);
}
template<class Fn, class... Args> inline void operator()(::std::shared_ptr<Fn>& fn, Args&&... args)
{
(*fn.get())(decay_type(::std::forward<Args>(args))...);
}
template<class Fn, class... Args> inline void operator()(::std::unique_ptr<Fn>& fn, Args&&... args)
{
(*fn.get())(decay_type(::std::forward<Args>(args))...);
}
};
// 自旋锁
class spin_mutex
{
private:
#if _MSC_VER <= 1900
::std::atomic_flag flag;
public:
spin_mutex(){ flag.clear(); }
#else /* _MSC_VER <= 1900 */
::std::atomic_flag flag = ATOMIC_FLAG_INIT;
public:
spin_mutex() = default;
#endif /* _MSC_VER <= 1900 */
public:
spin_mutex(const spin_mutex&) = delete;
spin_mutex& operator= (const spin_mutex&) = delete;
void lock(){ while (flag.test_and_set(::std::memory_order_acquire)); }
void unlock(){ flag.clear(::std::memory_order_release); }
};
SYSCONAPI_EXTERN ::std::mutex g_log_lock;
SYSCONAPI_EXTERN ::std::ofstream g_log_ofstream;
SYSCONAPI_EXTERN const uint32_t system_constituent_version;
SYSCONAPI_EXTERN const char* system_constituent_version_string;
SYSCONAPI_EXTERN ::std::wstring_convert<::std::codecvt_utf8<wchar_t>, wchar_t> convert_utf8_unicode;
#ifdef _MSC_VER
template<uint32_t codepage = CP_ACP, class Elem = wchar_t, class Walloc = ::std::allocator<Elem>, class Balloc = ::std::allocator<char>>
class convert_cp_unicode_t
{
typedef ::std::basic_string<char, ::std::char_traits<char>, Balloc> byte_string;
typedef ::std::basic_string<Elem, ::std::char_traits<Elem>, Walloc> wide_string;
typedef ::mbstate_t state_type;
void init()
{
static_assert(sizeof(wchar_t) == sizeof(Elem), "sizeof Elem must be 2");
static state_type State0 = '?';
State = State0;
nconv = 0;
}
public:
convert_cp_unicode_t()
: has_berr(false), has_werr(false), has_state(false)
{
init();
}
convert_cp_unicode_t(state_type State_arg)
: has_berr(false), has_werr(false), has_state(true)
{
init();
State = State_arg;
}
convert_cp_unicode_t(const byte_string& berr_arg)
: has_berr(true), has_werr(false), has_state(false), berr(berr_arg)
{
init();
}
convert_cp_unicode_t(const byte_string& berr_arg, const wide_string& werr_arg)
: has_berr(true), has_werr(false), has_state(false), berr(berr_arg), werr(werr_arg)
{
init();
}
~convert_cp_unicode_t(){}
size_t converted() const
{
return nconv;
}
state_type state() const
{
return State;
}
wide_string from_bytes(char _Byte)
{
return ::std::move(from_bytes(&_Byte, &_Byte + 1));
}
wide_string from_bytes(const char *ptr)
{
return ::std::move(from_bytes(ptr, ptr + ::strlen(ptr)));
}
wide_string from_bytes(const byte_string& bstr)
{
const char *ptr = bstr.c_str();
return ::std::move(from_bytes(ptr, ptr + bstr.size()));
}
wide_string from_bytes(const char *first, const char *last)
{
size_t length, result, n;
length = (size_t)::MultiByteToWideChar(codepage, 0, first, (int)(last - first), nullptr, 0);
wide_string wstr;
wstr.resize(length);
result = (size_t)::MultiByteToWideChar(codepage, 0, first, (int)(last - first), (LPWSTR)const_cast<Elem*>(wstr.c_str()), (int)(length + 1));
const Elem *wptr = wstr.c_str(), *next = wptr;
for (; *next++;);
wstr.resize(n = next - wptr - 1);
assert(length >= n);
nconv += n;
return ::std::move(wstr);
}
byte_string to_bytes(Elem _Char)
{
return ::std::move(to_bytes(&_Char, &_Char + 1));
}
byte_string to_bytes(const Elem *wptr)
{
const Elem *next = wptr;
for (; *next++;);
return ::std::move(to_bytes(wptr, next));
}
byte_string to_bytes(const wide_string& wstr)
{
const Elem *wptr = wstr.c_str();
return ::std::move(to_bytes(wptr, wptr + wstr.size()));
}
byte_string to_bytes(const Elem *first, const Elem *last)
{
size_t length, result, n;
if (codepage == CP_UTF7 || codepage == CP_UTF8)
length = (size_t)::WideCharToMultiByte(codepage, 0, (LPCWCH)first, (int)(last - first), nullptr, 0, nullptr, nullptr);
else
length = (size_t)::WideCharToMultiByte(codepage, 0, (LPCWCH)first, (int)(last - first), nullptr, 0, (LPCCH)&State, nullptr);
byte_string str;
str.resize(length);
if (codepage == CP_UTF7 || codepage == CP_UTF8)
result = (size_t)::WideCharToMultiByte(codepage, 0, (LPCWCH)first, (int)(last - first), const_cast<char*>(str.c_str()), (int)(length + 1), nullptr, nullptr);
else
result = (size_t)::WideCharToMultiByte(codepage, 0, (LPCWCH)first, (int)(last - first), const_cast<char*>(str.c_str()), (int)(length + 1), (LPCCH)&State, nullptr);
str.resize(n = ::strlen(str.c_str()));
assert(length >= n);
nconv += n;
return ::std::move(str);
}
convert_cp_unicode_t(const convert_cp_unicode_t&) = delete;
convert_cp_unicode_t& operator=(const convert_cp_unicode_t&) = delete;
private:
byte_string berr;
wide_string werr;
state_type State; // the remembered State
bool has_state;
bool has_berr;
bool has_werr;
size_t nconv;
};
SYSCONAPI_EXTERN convert_cp_unicode_t<CP_ACP, wchar_t> convert_default_unicode;
#else /* _MSC_VER */
#define convert_default_unicode convert_utf8_unicode
#endif /* _MSC_VER */
#ifdef _UNICODE
typedef ::std::wstringstream tstringstream;
typedef ::std::wstring tstring;
#else /* _UNICODE */
typedef ::std::stringstream tstringstream;
typedef ::std::string tstring;
#endif /* _UNICODE */
template<class T, class Arg> inline void debug_put(::std::basic_stringstream<char, T>&& ss, Arg&& arg)
{
ss << ::std::forward<Arg>(arg);
#ifdef _MSC_VER
auto&& uni_str = convert_default_unicode.from_bytes(ss.str());
auto&& cvt_str = convert_utf8_unicode.to_bytes(uni_str);
#else /* _MSC_VER */
auto&& cvt_str = ss.str();
#endif /* _MSC_VER */
g_log_ofstream << cvt_str;
g_log_ofstream.flush();
#if defined(_DEBUG) || defined(DEBUG)
#ifdef _MSC_VER
::OutputDebugStringW(uni_str.c_str());
#else /* _MSC_VER */
::OutputDebugStringA(cvt_str.c_str());
#endif /* _MSC_VER */
#endif
}
template<class T, class Arg> inline void debug_put(::std::basic_stringstream<wchar_t, T>&& ss, Arg&& arg)
{
ss << ::std::forward<Arg>(arg);
auto&& uni_str = ss.str();
auto&& cvt_str = convert_utf8_unicode.to_bytes(uni_str);
g_log_ofstream << cvt_str;
g_log_ofstream.flush();
#if defined(_DEBUG) || defined(DEBUG)
::OutputDebugStringW(uni_str.c_str());
#endif
}
inline void _debug_output()
{
auto now = ::std::chrono::system_clock::to_time_t(::std::chrono::system_clock::now());
debug_put(tstringstream(), _T(" [TID:"));
debug_put(tstringstream(),
#if defined(_WIN32) || defined(WIN32)
::GetCurrentThreadId()
#else // Linux
::gettid()
#endif // #if defined(_WIN32) || defined(WIN32)
);
debug_put(tstringstream(), _T("] "));
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4996 )
debug_put(tstringstream(), ::_tctime(&now));
#pragma warning( pop )
#else // _MSC_VER
debug_put(::std::stringstream(), ::std::ctime(&now));
#endif // #ifdef _MSC_VER
}
template<class T, class... Args> inline void _debug_output(T&& arg, Args&&... args)
{
debug_put(tstringstream(), arg);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(char* debug_string, Args&&... args)
{
debug_put(::std::stringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(const char* debug_string, Args&&... args)
{
debug_put(::std::stringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(volatile char* debug_string, Args&&... args)
{
debug_put(::std::stringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(const volatile char* debug_string, Args&&... args)
{
debug_put(::std::stringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class T, class A, class... Args> inline void _debug_output(::std::basic_string<char, T, A>& debug_string, Args&&... args)
{
debug_put(::std::stringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class T, class A, class... Args> inline void _debug_output(const ::std::basic_string<char, T, A>& debug_string, Args&&... args)
{
debug_put(::std::stringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class T, class A, class... Args> inline void _debug_output(::std::basic_string<char, T, A>&& debug_string, Args&&... args)
{
debug_put(::std::stringstream(), ::std::move(debug_string));
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(wchar_t* debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(const wchar_t* debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(volatile wchar_t* debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class... Args> inline void _debug_output(const volatile wchar_t* debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class T, class A, class... Args> inline void _debug_output(::std::basic_string<wchar_t, T, A>& debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class T, class A, class... Args> inline void _debug_output(const ::std::basic_string<wchar_t, T, A>& debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), debug_string);
_debug_output(::std::forward<Args>(args)...);
}
template<class T, class A, class... Args> inline void _debug_output(::std::basic_string<wchar_t, T, A>&& debug_string, Args&&... args)
{
debug_put(::std::wstringstream(), ::std::move(debug_string));
_debug_output(::std::forward<Args>(args)...);
}
#if defined(_DEBUG) || defined(DEBUG)
// Debug下,无论output为何值总是输出。Release下,output为true时输出
template<bool output = false, class... Args> inline void debug_output(Args&&... args)
{
::std::lock_guard<decltype(g_log_lock)> lck(g_log_lock);
_debug_output(decay_type(::std::forward<Args>(args))...);
}
#else // NDEBUG
// Debug下,无论output为何值总是输出。Release下,output为true时输出。不输出使用debug_output(...)
template<bool output = false, class... Args> inline void debug_output(Args&&... args)
{
if (output)
{
::std::lock_guard<decltype(g_log_lock)> lck(g_log_lock);
_debug_output(decay_type(::std::forward<Args>(args))...);
}
}
// Debug下,无论output为何值总是输出。Release下,默认不输出。输出使用debug_output<true>(...)
#define debug_output(...) void()
#endif //#if defined(_DEBUG) || defined(DEBUG)
// 设置log流的文件位置
template<class Elem, class T = ::std::char_traits<Elem>, class A = ::std::allocator<Elem>> inline
void set_log_location(::std::basic_string<Elem, T, A> file_name)
{
set_log_location(file_name.c_str());
}
// 设置log流的文件位置
template<class Elem> inline void set_log_location(const Elem* file_name)
{
g_log_ofstream.open(file_name, ::std::ios::app | ::std::ios::ate);
debug_output<true>(_T("Process Start: [PID:"),
#if defined(_WIN32) || defined(WIN32)
::GetCurrentProcessId()
#else // Linux
::getpid()
#endif // #if defined(_WIN32) || defined(WIN32)
, _T(']'));
}
// 关闭log流的文件位置
inline void close_log_location()
{
debug_output<true>(_T("Process End: [PID:"),
#if defined(_WIN32) || defined(WIN32)
::GetCurrentProcessId()
#else // Linux
::getpid()
#endif // #if defined(_WIN32) || defined(WIN32)
, _T(']'));
g_log_ofstream.close();
}
|
67ed033c112e6ad51663026120599ca8902ce061
|
50457fc28800b3cf2f25e06478f33981a1a626dc
|
/Codeforces/1148B.cpp
|
56d310ecad5bfafdc525438f0a668f69f332b332
|
[] |
no_license
|
h-sinha/CP-codes
|
5b1ef5021b7fd180b518270ffdb12997dc8d367b
|
937174c73d1c80114de4535a6908122158366ad4
|
refs/heads/master
| 2021-07-20T18:47:00.500294
| 2021-07-06T05:11:57
| 2021-07-06T05:11:57
| 159,954,721
| 2
| 2
| null | 2020-01-07T18:57:28
| 2018-12-01T14:51:44
|
C++
|
UTF-8
|
C++
| false
| false
| 1,850
|
cpp
|
1148B.cpp
|
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define DEBUG
#ifdef DEBUG
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define debug(...)
#endif
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define RFOR(i,a,b) for(int i=a;i>=b;--i)
#define ln "\n"
#define mp make_pair
#define pb push_back
#define sz(a) ll(a.size())
#define F first
#define S second
#define all(c) c.begin(),c.end()
#define trace(c,x) for(auto &x:c)
#define pii pair<ll,ll>
typedef long long ll;
typedef long double ld;
typedef priority_queue<pii,std::vector<pii>,greater<pii> > revpr;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;
// ordered_set X
//K-th smallest
//*X.find_by_order(k-1)
//NO OF ELEMENTS < A
//X.order_of_key(A)
const int L=1e6+7;
map<ll,ll> counter;
std::vector<ll> b;
ll a[L], aa[L], bb[L];
int co[L], f[L];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n, m, ta, tb, k,tt;
cin >> n >> m >> ta >> tb >> k ;
FOR(i,0,n)
{
cin >> a[i];
a[i] += ta;
}
for (int i = 0; i < m; ++i)
{
cin >> tt;
b.pb(tt);
}
if(n<=k || m<=k)
{
cout<<"-1";
return 0;
}
ll ans = 0;
std::vector<ll> ::iterator it;
FOR(i,0,k+1)
{
if(b[m-k+i-1]<a[i])
{
cout<<"-1";
return 0;
}
it = lower_bound(all(b), a[i]);
ans = max(ans, b[(it-b.begin()) + k - i] + tb);
}
cout<<ans;
return 0;
}
|
61ed79bab9ee22a9c1d91ea4e8dc987f7ad9bef7
|
a1f19ca2de4d090b6da1a728c6fb81a4cfca3ff7
|
/api/Network.cpp
|
2de43b0a1cff5f8efa88a9b45fde7c9962e7dd56
|
[] |
no_license
|
prakashgupta/suproject
|
48ead60a189f7c6a41daed8f48822dd4158bcf0f
|
2b37a9ad416ed987d00ecb565cebf5e8e4034296
|
refs/heads/master
| 2021-01-02T22:39:42.056805
| 2010-02-14T20:44:54
| 2010-02-14T20:44:54
| 34,527,578
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,977
|
cpp
|
Network.cpp
|
#include "Network.h"
Network::Network(void) {
tv.tv_sec = 0;
tv.tv_usec = 0;
}
Network::~Network() {
list<int>::Iterator it = remoteFD.begin();
for(int i=0; i<remoteFD.getSize(); i++) {
close(*it);
it++;
}
close(fd);
}
int Network::Startup(int p, int m) {
port = p;
max = m;
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
//addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_addr.s_addr = inet_addr("127.0.0.1");
memset(&(addr.sin_zero), 0, 8);
if((fd = socket(AF_INET, SOCK_STREAM, 0))==0)
std::cerr << "socket()";
if((bind(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr)))==-1)
std::cerr << "bind()";
listen(fd, max);
NetworkThread.Start(this);
}
int Network::Startup(const char *a, int p) {
address = a;
port = p;
if (!(he=gethostbyname(address.c_str())))
std::cerr << "gesthostbyname()";
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) std::cerr << "socket()";
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
addr.sin_addr = *((struct in_addr *)he->h_addr);
bzero(&(addr.sin_zero), 8);
if (connect(fd,(struct sockaddr *)&addr, sizeof(struct sockaddr)) ==-1) {
std::cerr << "connect()";
return -1;
}
}
int Network::Close(void) {
list<int>::Iterator it = remoteFD.begin();
for(int i=0; i<remoteFD.getSize(); i++) {
it+=i;
close(*it);
}
close(fd);
}
int Network::Close(int id) {
list<int>::Iterator it = remoteFD.begin();
it+=id;
close(*it);
remoteFD.erase(it);
list<stringc>::Iterator ip = remoteIP.begin();
ip += id;
remoteIP.erase(ip);
std::cout << "CLOSE: " << id << std::endl;
}
void Network::Wait(void) {
while(fd) {
socklen_t size;
int fdtmp;
char iptmp[16];
// std::cout << "Funcionando! " << max << " " << port;
while((((fdtmp = accept(fd, (struct sockaddr *)&addr,&size)))<0)||(remoteFD.getSize()>=max))usleep(1);
inet_ntop(addr.sin_family, &addr.sin_addr, iptmp, INET_ADDRSTRLEN);
remoteIP.push_back(iptmp);
std::cout << iptmp << " " << fdtmp << " conectado.\n";
remoteFD.push_back(fdtmp);
}
}
int Network::getSize(void) {
return remoteFD.getSize();
}
int Network::Receive(int id, stringc *buffer) {
list<int>::Iterator fp = remoteFD.begin();
fp+=id;
char *btmp;
int total, received, left;
uint16_t bytes_nbo;
recv(*fp, &bytes_nbo, 2, 0);
total = ntohs(bytes_nbo);
std::cout << std::endl << total << std::endl;
left = total;
while(left > 0) {
btmp = new char[left+1];
received = recv(*fp, btmp, left, NULL);
btmp[left] = '\0';
buffer->append(btmp);
delete [] btmp;
left -= received;
std::cout << std::endl << received << std::endl;
}
}
int Network::Receive(stringc *buffer) {
char *btmp;
int total, received, left;
uint16_t bytes_nbo;
recv(fd, &bytes_nbo, 2, 0);
total = ntohs(bytes_nbo);
std::cout << std::endl << total << std::endl;
left = total;
while(left > 0) {
btmp = new char[left+1];
received = recv(fd, btmp, left, NULL);
btmp[left] = '\0';
buffer->append(btmp);
delete [] btmp;
left -= received;
std::cout << std::endl << received << std::endl;
}
}
int Network::ReceiveAll(list<stringc> *buffer) {
if(!remoteFD.getSize())
return -1;
char *btmp;
int total, received, left, rv;
uint16_t bytes_nbo;
buffer->clear();
// list<stringc>::Iterator sp = buffer->begin();
ufds = new struct pollfd[remoteFD.getSize()];
list<int>::Iterator fp = remoteFD.begin();
// std::cout << *fp << *(fp+1) << *(fp+2);
for(int i=0; i<remoteFD.getSize(); i++) {
buffer->push_back("aaaaaaa");
ufds[i].fd = *fp;
ufds[i].events = POLLIN | POLLHUP | POLLERR;
fp++;
}
rv = poll(ufds, remoteFD.getSize(), 0);
std::cout << "RV: " << rv << std::endl;
if(rv<1)
return rv;
fp = remoteFD.begin();
list<stringc>::Iterator sp = buffer->begin();
for(int i=0; i<remoteFD.getSize(); i++) {
if(ufds[i].revents & POLLIN) {
if(!recv(*fp, &bytes_nbo, sizeof(uint16_t), NULL))
{
std::cout << "CLOSE!!!!!" << std::endl;
this->Close(i);
i--;
continue;
}
total = ntohs(bytes_nbo);
std::cout << "FP: " << *fp << std::endl << "TOTAL: " << total << std::endl << "Buffer: " << sp->c_str() << std::endl;
left = total;
while(left > 0) {
btmp = new char[left+1];
received = recv(*fp, btmp, left, NULL);
btmp[left] = '\0';
*sp = btmp;
delete [] btmp;
left -= received;
std::cout << std::endl << received << std::endl;
}
}
sp++;
fp++;
}
delete [] ufds;
}
int Network::Send(int id, stringc *buffer) {
uint16_t bytes_nbo;
int left, bytes;
bytes_nbo = htons(buffer->size());
list<int>::Iterator p = remoteFD.begin();
p+=id;
if(send(*p, &bytes_nbo, 2, NULL) != 2)
std::cerr << "send()_nbo";
left = buffer->size();
while(left>0) {
bytes = send(*p, buffer->c_str()+(buffer->size()-left), left, NULL);
left -= bytes;
}
}
int Network::SendAll(stringc *buffer) {
uint16_t bytes_nbo;
int left, bytes;
bytes_nbo = htons(buffer->size());
list<int>::Iterator fp = remoteFD.begin();
// p += 0;
for(int i=0; i<remoteFD.getSize(); fp+=++i) {
if(send(*fp, &bytes_nbo, 2, NULL) != 2)
std::cerr << "send()_nbo";
left = buffer->size();
while(left>0) {
bytes = send(*fp, buffer->c_str()+(buffer->size()-left), left, NULL);
left -= bytes;
}
}
}
int Network::Send(stringc *buffer) {
uint16_t bytes_nbo;
int left, bytes;
bytes_nbo = htons(buffer->size());
if(send(fd, &bytes_nbo, sizeof(uint16_t), NULL) != 2)
std::cerr << "send()_nbo";
left = buffer->size();
while(left>0) {
bytes = send(fd, buffer->c_str()+(buffer->size()-left), left, NULL);
left -= bytes;
}
}
int Network::getIP(int id, stringc *buffer) {
list<stringc>::Iterator sp = remoteIP.begin();
sp+=id;
*buffer = *sp;
}
|
3fb4eee9582bbe51d1c5a1b350b6ea36f14bc22f
|
a72d9357c5b43c5ae6b5b82ca16d548ac1fdd853
|
/examples/chapter04_04a/src/os/os_task_control_block.h
|
89f5530fad215430fb13ed66b5e8cdc0e3a0f4a3
|
[
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-3.0-only"
] |
permissive
|
ckormanyos/real-time-cpp
|
d61e90e79b47d41349ba4f34633a14ea35f36d70
|
1741e058cac3b0e865602be5f747d1fe828b7f6f
|
refs/heads/master
| 2023-08-29T02:58:32.175068
| 2023-08-28T11:48:04
| 2023-08-28T11:48:04
| 5,922,310
| 484
| 160
|
BSL-1.0
| 2023-08-28T11:48:05
| 2012-09-23T13:31:08
|
C++
|
UTF-8
|
C++
| false
| false
| 2,182
|
h
|
os_task_control_block.h
|
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2016.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef OS_TASK_CONTROL_BLOCK_2013_07_30_H_
#define OS_TASK_CONTROL_BLOCK_2013_07_30_H_
#include <cstddef>
#include <cstdint>
#include <limits>
#include <os/os.h>
namespace os
{
class task_control_block final
{
public:
task_control_block(const function_type init,
const function_type func,
const tick_type cycle,
const tick_type offset) : my_init (init),
my_func (func),
my_cycle(cycle),
my_timer(offset),
my_event() { }
task_control_block(const task_control_block& other_tcb) : my_init (other_tcb.my_init),
my_func (other_tcb.my_func),
my_cycle(other_tcb.my_cycle),
my_timer(other_tcb.my_timer),
my_event(other_tcb.my_event) { }
~task_control_block() { }
private:
const function_type my_init;
const function_type my_func;
const tick_type my_cycle;
timer_type my_timer;
event_type my_event;
void initialize() const { my_init(); }
bool execute(const tick_type& timepoint_of_ckeck_ready);
task_control_block();
task_control_block& operator=(const task_control_block&);
friend void start_os ();
friend bool set_event (const task_id_type, const event_type&);
friend void get_event (event_type&);
friend void clear_event(const event_type&);
};
}
#endif // OS_TASK_CONTROL_BLOCK_2013_07_30_H_
|
77ac25b8fb6cea25ed72969f97f2953c91961652
|
ecccf62599bbc31bf8f70d5d8845244385eecce8
|
/PolygonFilling/PolygonFilling/src/Maths/Point.h
|
0dd852400269414d6eb3015b07e0c5d11c7d01c7
|
[] |
no_license
|
Mistergix/ESGI-polygon-filling
|
9db8f82a885f9ecb5074e724b4779076cd48ee8f
|
eec52752e6169151497d7e85e0a324489a45a2dd
|
refs/heads/master
| 2023-02-20T07:44:11.920047
| 2021-01-19T19:19:51
| 2021-01-19T19:19:51
| 325,603,953
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 118
|
h
|
Point.h
|
#pragma once
class Point {
private :
float m_x, m_y;
public :
float getX();
float getY();
Point(float, float);
};
|
16ad3b40ba9fd531ae58919a35a32b031c9d161d
|
68c805de1584fc0c2f0b439b1695b3bec80bbbe2
|
/GamesAndAlgorithms/MagicSquare/MagicSquare.h
|
a896581b74bb6425862d6d8870a2996cec1560ea
|
[] |
no_license
|
girishetty/mytools
|
f8009099383d4c8600953e57ae1effe264e171fb
|
300fcb5552c13dfaac03190028646ab5c0640664
|
refs/heads/master
| 2022-03-20T05:57:10.984171
| 2022-02-10T06:42:15
| 2022-02-10T06:42:15
| 20,978,920
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 375
|
h
|
MagicSquare.h
|
#ifndef MAGICSQUARE_H
#define MAGICSQUARE_H
#include <vector>
class MagicSquare {
enum {
KMaxSize = 20,
};
public:
MagicSquare(size_t aSize = 1);
void Display() const;
void Create();
size_t fixMagicSquare(std::vector<std::vector<int>>& square);
private:
int iSize;
int iSquare[KMaxSize][KMaxSize];
};
#endif //MAGICSQUARE_H
|
1d1e6adb46945c95754e25d2ff55b01a8a97fe99
|
8476022a29e9b5f10178c034fca402155fb66eec
|
/ENet/include/DicClave.cpp
|
0454a62ea460989ef0d44840840d9cc8cb956ae9
|
[] |
no_license
|
Subtes/proyecto_subtes
|
48e66fe3435e759f99e4ac86363cfb61f82f8773
|
9a9dd5cb52062beb38f91b7355f1943fc0c08c83
|
refs/heads/master
| 2021-01-01T16:25:20.529668
| 2015-12-18T14:22:26
| 2015-12-18T14:22:26
| 32,394,262
| 0
| 1
| null | 2015-12-18T14:22:26
| 2015-03-17T13:14:22
|
C
|
UTF-8
|
C++
| false
| false
| 369
|
cpp
|
DicClave.cpp
|
#include "stdafx.h"
#include "DicClave.h"
DicClave::DicClave()
{
Host = "";
Clave = "";
SubClave = "";
}
DicClave::DicClave(std::string unHost, std::string unaClave)
{
Host = unHost;
Clave = unaClave;
}
DicClave::DicClave(std::string unHost, std::string unaClave, std::string unaSubClave)
{
SubClave = unaSubClave;
Host = unHost;
Clave = unaClave;
}
|
1abca5ef47a59afee78a065bacf6b8aab4e99b0e
|
12cfee6f46b01524b96a6471020324d7b258e7a0
|
/2022/src/day_03/rucksack_reorganization.cpp
|
1681d3a087fa3769d461e86ecc9f18c86afd7feb
|
[] |
no_license
|
Polladin/AOC
|
ecda1fd627bc92ca2d9d2953d58a025ca210c520
|
20042fb45e185001d1043d6110db5baac65aca41
|
refs/heads/master
| 2022-12-16T20:24:13.460877
| 2022-12-11T12:57:36
| 2022-12-11T12:57:36
| 161,549,723
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,352
|
cpp
|
rucksack_reorganization.cpp
|
#include "rucksack_reorganization.h"
#include <vector>
#include <set>
#include <algorithm>
#include <iostream>
#include <optional>
#include "common/file_reader.h"
std::string get_sorted_unique_str( std::string && str )
{
std::sort( str.begin(), str.end() );
str.erase( std::unique( str.begin(), str.end() ), str.end() );
return std::move( str );
}
char get_intersection_unique( const std::string & str )
{
std::vector< char > res;
std::size_t posHalf = str.length() / 2;
std::string part_1 = get_sorted_unique_str( str.substr( 0 , posHalf ) );
std::string part_2 = get_sorted_unique_str( str.substr( posHalf, posHalf ) );
std::set_intersection( part_1.begin(), part_1.end()
, part_2.begin(), part_2.end()
, std::back_inserter( res ) );
if ( res.size() != 1 )
throw "Wrong Union!";
return res.front();
}
long long get_priority( char ch )
{
std::cout << "Plus '" << ch << "' : " << (( ch >= 'a' && ch <= 'z' ) ? ch - 'a' + 1 : ch - 'A' + 27) << "\n";
return ( ch >= 'a' && ch <= 'z' ) ? ch - 'a' + 1 : ch - 'A' + 27;
}
std::optional< long long > corresponds( const std::string & pack_1, const std::string & pack_2, const std::string & pack_3 )
{
std::vector< char > res_1_2;
std::vector< char > res_2_3;
std::vector< char > res_3_1;
std::set_intersection( pack_1.begin(), pack_1.end()
, pack_2.begin(), pack_2.end()
, std::back_inserter( res_1_2 ) );
std::set_intersection( pack_3.begin(), pack_3.end()
, pack_2.begin(), pack_2.end()
, std::back_inserter( res_2_3 ) );
std::set_intersection( pack_1.begin(), pack_1.end()
, pack_3.begin(), pack_3.end()
, std::back_inserter( res_3_1 ) );
std::vector< char > res_1_2_2_3;
std::set_intersection( res_1_2.begin(), res_1_2.end()
, res_2_3.begin(), res_2_3.end()
, std::back_inserter( res_1_2_2_3 ) );
std::vector< char > res;
std::set_intersection( res_1_2_2_3.begin(), res_1_2_2_3.end()
, res_3_1.begin() , res_3_1.end()
, std::back_inserter( res ) );
if ( res.size() != 1 )
throw "Fail!";
return { get_priority( res.front() ) };
}
long long RucksackReorganization::task_1( const std::string & filename )
{
std::vector< std::string > rucksacks = FileReader::read_file( filename );
long long res = 0;
for ( const auto & _rucksack : rucksacks )
{
res += get_priority( get_intersection_unique( _rucksack ) );
// std::cout << "res: " << res << "\n";
}
return res;
}
long long RucksackReorganization::task_2(const std::string &filename)
{
std::vector< std::string > rucksacks = FileReader::read_file( filename );
for ( auto & _rucksack : rucksacks )
_rucksack = get_sorted_unique_str( std::move( _rucksack ) );
std::set< std::size_t > usedIdx;
long long res = 0;
for ( std::size_t idx = 0; idx < rucksacks.size(); idx += 3 )
{
res += corresponds( rucksacks[ idx ], rucksacks[ idx + 1 ], rucksacks[ idx + 2 ] ).value();
}
return res;
}
|
7b7821df5357e6b1ee1914e7af8e7a1c81331659
|
f843ebad90e8ac27461239f4957e4f938664d5dc
|
/Source/LightSwitch/LightSwitchCodeOnly.cpp
|
cb87c17a6931ae898e452bda8497cabb3f8c35a6
|
[] |
no_license
|
matzar/LightSwitch
|
fbc63ac7b2dd46c757e99b4ee14b7a27ae0c0f61
|
dabf4590c3657ef428c72f9888e55d525081740c
|
refs/heads/master
| 2020-03-30T20:14:49.991669
| 2018-10-04T13:52:52
| 2018-10-04T13:52:52
| 151,579,722
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,641
|
cpp
|
LightSwitchCodeOnly.cpp
|
// Fill out your copyright notice in the Description page of Project Settings.
#include "LightSwitchCodeOnly.h"
#include "Components/PointLightComponent.h"
#include "Components/SphereComponent.h"
// Sets default values
ALightSwitchCodeOnly::ALightSwitchCodeOnly()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
DesiredIntensity = 3000.0f;
/** Create the PointLightComponent, set its variables (including setting its intensity to the value of DesiredIntensity), and make it the root component. **/
// Create the PointLight component
PointLight = CreateDefaultSubobject<UPointLightComponent>(TEXT("PointLight"));
// set its intensity to DesiredIntensity variable
PointLight->Intensity = DesiredIntensity;
// set the light's visibility
PointLight->bVisible = true;
// set the root component to PointLight
RootComponent = PointLight;
/** Create the SphereComponent, set its variables, and attach it to the PointLightComponent. **/
// create the SphereComponent
Sphere = CreateAbstractDefaultSubobject<USphereComponent>(TEXT("Sphere"));
// set sphere's radios
Sphere->InitSphereRadius(250.0f);
// Attach Sphere to PointLight
Sphere->SetupAttachment(PointLight);
/** Designate the OnOverlap function as a delegate called when an Actor overlaps or leaves the SphereComponent. **/
Sphere->OnComponentBeginOverlap.AddDynamic(this, &ALightSwitchCodeOnly::OnOverlapBegin); // setup a notification for when this component overlaps something
Sphere->OnComponentEndOverlap.AddDynamic(this, &ALightSwitchCodeOnly::OnOverlapEnd); // setup a notification for when this component (ends?) overlaping something
}
// Called when the game starts or when spawned
void ALightSwitchCodeOnly::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ALightSwitchCodeOnly::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void ALightSwitchCodeOnly::OnOverlapBegin(UPrimitiveComponent * OverlappedComp, AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
if (OtherActor && (OtherActor != this) && OtherComp)
{
ToggleLight();
}
}
void ALightSwitchCodeOnly::OnOverlapEnd(UPrimitiveComponent * OverlappedComp, AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherBodyIndex)
{
if (OtherActor && (OtherActor != this) && OtherComp)
{
ToggleLight();
}
}
void ALightSwitchCodeOnly::ToggleLight()
{
//(PointLight->bVisible) ? PointLight->bVisible = false : PointLight->bVisible = true;
PointLight->ToggleVisibility();
}
|
ab4ce37307ec8f00f43d29431103f3f17efee9e3
|
a7764174fb0351ea666faa9f3b5dfe304390a011
|
/src/RWStepBasic/RWStepBasic_RWDocumentRelationship.cxx
|
cae05e571ed5985dcdafeed66bd0bb78b9b27ee1
|
[] |
no_license
|
uel-dataexchange/Opencascade_uel
|
f7123943e9d8124f4fa67579e3cd3f85cfe52d91
|
06ec93d238d3e3ea2881ff44ba8c21cf870435cd
|
refs/heads/master
| 2022-11-16T07:40:30.837854
| 2020-07-08T01:56:37
| 2020-07-08T01:56:37
| 276,290,778
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,362
|
cxx
|
RWStepBasic_RWDocumentRelationship.cxx
|
//gka 05.03.99 S4134 upgrade from CD to DIS
#include <RWStepBasic_RWDocumentRelationship.ixx>
#include <Interface_EntityIterator.hxx>
#include <StepBasic_DocumentRelationship.hxx>
#include <StepBasic_Document.hxx>
#include <TCollection_HAsciiString.hxx>
RWStepBasic_RWDocumentRelationship::RWStepBasic_RWDocumentRelationship () {}
void RWStepBasic_RWDocumentRelationship::ReadStep
(const Handle(StepData_StepReaderData)& data,
const Standard_Integer num,
Handle(Interface_Check)& ach,
const Handle(StepBasic_DocumentRelationship)& ent) const
{
// --- Number of Parameter Control ---
if (!data->CheckNbParams(num,4,ach,"document_relationship")) return;
// --- own field : name ---
Handle(TCollection_HAsciiString) aName;
//szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
data->ReadString (num,1,"name",ach,aName);
// --- own field : description ---
Handle(TCollection_HAsciiString) aDescr;
if (data->IsParamDefined (num,2)) { //gka 05.03.99 S4134 upgrade from CD to DIS
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
data->ReadString (num,2,"description",ach,aDescr);
}
// --- own field : relating ---
Handle(StepBasic_Document) aRelating;
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
data->ReadEntity (num, 3,"relating_document", ach, STANDARD_TYPE(StepBasic_Document), aRelating);
// --- own field : related ---
Handle(StepBasic_Document) aRelated;
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
data->ReadEntity (num, 4,"related_document", ach, STANDARD_TYPE(StepBasic_Document), aRelated);
//--- Initialisation of the read entity ---
ent->Init(aName, aDescr, aRelating,aRelated);
}
void RWStepBasic_RWDocumentRelationship::WriteStep
(StepData_StepWriter& SW,
const Handle(StepBasic_DocumentRelationship)& ent) const
{
// --- own field : name ---
SW.Send(ent->Name());
// --- own field : description ---
SW.Send(ent->Description());
// --- own field : kind ---
SW.Send(ent->RelatingDocument());
SW.Send(ent->RelatedDocument());
}
void RWStepBasic_RWDocumentRelationship::Share(const Handle(StepBasic_DocumentRelationship)& ent, Interface_EntityIterator& iter) const
{
iter.AddItem(ent->RelatingDocument());
iter.AddItem(ent->RelatedDocument());
}
|
d7a468312dd0fa8826085b03a836e7b07198151d
|
992df6ff3b49fddf01babb2a04ded03109da7ab7
|
/4.0/Demo/tcpsocket/src/TCPSocketImpl.h
|
49142aea67e42a132d78d08e40992db3602176a3
|
[] |
no_license
|
charfeddine-ahmed/PushFramework
|
abf187bc30bdd0f702929c4e571af49279278d56
|
ed9804ffc5148e180cb95bafe13aa2e0f3903147
|
refs/heads/master
| 2021-12-08T15:22:19.895640
| 2021-12-01T14:04:08
| 2021-12-01T14:04:08
| 92,851,089
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,698
|
h
|
TCPSocketImpl.h
|
#pragma once
class TCPSocket;
class ResponseHandler;
class TCPSocketImpl : public Connection
{
public:
TCPSocketImpl(TCPSocket* pFacade);
~TCPSocketImpl(void);
bool initialize(ProtocolFramework::Protocol* pProtocol, ProtocolFramework::MessageFactory* messageFactory);
int getStatus();
bool connect(const char* hostAddress, unsigned int uPort, string& strError);
int sendRequest(ProtocolFramework::OutgoingPacket* pPacket);
int sendBufferBytesRequest(Buffer& protocolBytes, Protocol* pProtocol);
void disconnect(bool waitForSend);
const char* explainLastError();
void LogStatistics();
private:
TCPSocket* pFacade;
int status;
std::string strIP;
unsigned int uPort;
SOCKET hSocket;
HANDLE hThread;
HANDLE hKillEvent;
WSAEVENT hSocketEvent;
ProtocolFramework::BufferList oBuffer;
ProtocolFramework::Protocol* pProtocol;
ProtocolFramework::MessageFactory* messageFactory;
CRITICAL_SECTION cs;
ProtocolFramework::ProtocolContext* pContext;
ProtocolManager theProtocolManager;
bool isPoolInitialized;
MemoryAllocator memoryAllocator;
private:
static unsigned __stdcall networkJobsThreadProc(LPVOID lParam);
void doNetworkJobs();
HANDLE CreatePeriodicTimer();
bool OnRead();
bool OnWrite();
bool OnConnect();
bool OnClose();
bool bSendInProgress;
bool WriteBytes();
bool stopClient;
std::string getLastErrorStdStr();
bool ReadReceivedBytes(Buffer& incomingBytes);
//CStats m_stats;
public:
time_t lastTimeDataIsSent;
public:
virtual Protocol* getProtocol();
virtual MessageFactory& getMessageFactory();
virtual void InitializeConnection();
};
|
165f499d3328e3252074431723356e637cd76b63
|
7da6942859bb296f2e765aa583fd546832b1787c
|
/CrazyTanks_v2.0/src/CGold.h
|
4d2da1af2b33d7937f5bc8fe7c9c3c8cdc39113a
|
[] |
no_license
|
romanenko97/CrazyTanks_v2.0
|
ea5458a9abd45820ab0e7a548a05e85e4eee9d5e
|
70160dbac1d7db23f4382bf293e382d7b4e5315b
|
refs/heads/master
| 2021-04-12T08:37:24.599861
| 2018-03-26T21:45:56
| 2018-03-26T21:45:56
| 126,321,963
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 294
|
h
|
CGold.h
|
#pragma once
#include"IFieldObject.h"
class CGold :public IFieldObject
{
public:
CGold();
~CGold();
int getHealth() const override;
nStruct::sCoord getCoord() const override;
void changeHealth() override;
void render() const override;
private:
nStruct::sCoord mCoord;
int mHealth;
};
|
a7a070be5713b2bf3797994f3e0040fdf47dfb82
|
a5a99f646e371b45974a6fb6ccc06b0a674818f2
|
/CalibMuon/CSCCalibration/test/stubs/CSCFakeDBCrosstalkHandler.h
|
15f9f5abf354bc0b80b948c38ba99d5b50b4d806
|
[
"Apache-2.0"
] |
permissive
|
cms-sw/cmssw
|
4ecd2c1105d59c66d385551230542c6615b9ab58
|
19c178740257eb48367778593da55dcad08b7a4f
|
refs/heads/master
| 2023-08-23T21:57:42.491143
| 2023-08-22T20:22:40
| 2023-08-22T20:22:40
| 10,969,551
| 1,006
| 3,696
|
Apache-2.0
| 2023-09-14T19:14:28
| 2013-06-26T14:09:07
|
C++
|
UTF-8
|
C++
| false
| false
| 939
|
h
|
CSCFakeDBCrosstalkHandler.h
|
#ifndef CSC_FAKEDBGAINS_SRC_IMPL_H
#define CSC_FAKEDBGAINS_SRC_IMPL_H
#include <iostream>
#include <string>
#include <typeinfo>
#include <vector>
#include "CalibMuon/CSCCalibration/interface/CSCFakeDBCrosstalk.h"
#include "CondCore/PopCon/interface/PopConSourceHandler.h"
#include "CondFormats/CSCObjects/interface/CSCobject.h"
#include "CondFormats/DataRecord/interface/CSCDBCrosstalkRcd.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
namespace popcon {
class CSCFakeDBCrosstalkImpl : public popcon::PopConSourceHandler<CSCDBCrosstalk> {
public:
void getNewObjects();
std::string id() const { return m_name; }
~CSCFakeDBCrosstalkImpl();
CSCFakeDBCrosstalkImpl(const edm::ParameterSet &pset);
private:
std::string m_name;
};
} // namespace popcon
#endif
|
a229fa34cc828c881cbac12b0ef46d2c11211212
|
df4c20f45d3582f384b44fb1c07a50c7b44dbe38
|
/interfaces/lola/lola_frame.cpp
|
6eda86d3bb9c3ed0ca2b2cb2f2452231453876ed
|
[
"BSD-2-Clause"
] |
permissive
|
LARG/spl-release
|
eeae659f141d1f63ce20bbcedb88ed25e75bd759
|
8a4dd93368cfe7b525d375467093abf3955c5e1a
|
refs/heads/master
| 2023-02-21T02:11:51.722812
| 2023-02-15T02:41:01
| 2023-02-15T02:41:01
| 75,247,826
| 1
| 2
|
NOASSERTION
| 2023-02-15T02:41:03
| 2016-12-01T02:37:22
|
C++
|
UTF-8
|
C++
| false
| false
| 26,607
|
cpp
|
lola_frame.cpp
|
#include "lola_frame.h"
#include <iostream>
#include <math/Geometry.h>
#include <stdio.h>
#include <cmath>
#include "stl_ext.h"
#include <assert.h>
/*
* This file contains most of the code related to the LoLA connector.
*
* The code in this file is used to recieve sensor values from LoLA and pass it
* along to higher level parts of the codebase, and to send actuator commands
* from higher levels to the actuators in the robot. Note that the camera is
* the only sensor which is not covered by this file. Before sending joint
* position and joint stiffness values to the robot, this file also performs
* interpolation between initial and target values.
*/
using namespace std;
LolaFrameHandler::LolaFrameHandler(boost::asio::io_service& io_service) :
// The file ~ /robocup.conf must exist at boot - up for this socket to exist.
socket(io_service),
head_yaw(0, 0, false),
stiffness(0, NUM_JOINTS-1, false, false),
head_pitch(1,1),
body(BODY_JOINT_OFFSET, NUM_JOINTS-1, true)
{
socket.connect("/tmp/robocup");
// The indexing in LoLA is different from the indexing in the rest of our
// codebase.
initIxDictionary();
initSensorFrame();
initActuatorFrame();
}
LolaFrameHandler::~LolaFrameHandler() {
/* The destructor must be called when LoLA is killed since it sets
* joint stiffnesses to -1, therefore saving battery and letting joints
* cool down.
* Note: in our codebase, the range of stiffness is 0 to 1, but in LoLA
* it ranges from -1 to 1.
*/
std::cout << "Destructing LolaFrameHandler" << std::endl;
socket.receive(boost::asio::buffer(data, MAX_LEN));
set_stiffness(-1.f, &actuator_frame.joints.legs);
set_stiffness(-1.f, &actuator_frame.joints.arms);
set_stiffness(-1.f, &actuator_frame.joints.head);
set_led(-1.f, 0.f, 0.f, &actuator_frame.leds.chest);
char* buffer;
size_t size;
std::tie(buffer, size) = pack();
this->socket.send(boost::asio::buffer(buffer, size));
}
void LolaFrameHandler::initSensorFrame() {
// This function sets up memory locations where readings from LoLA are
// stored.
auto& gyr = sensor_frame.imu.gyr;
auto& accel = sensor_frame.imu.accel;
auto& head = sensor_frame.joints.head;
auto& arms = sensor_frame.joints.arms;
auto& legs = sensor_frame.joints.legs;
auto& fsr = sensor_frame.fsr;
auto& battery = sensor_frame.battery;
auto& angles = sensor_frame.imu.angles;
auto& buttons = sensor_frame.buttons;
auto& sonars = sensor_frame.sonars;
// There might be joints missing here, which can be added in using
// Softbank's documentation.
sensor_frame_positions = {
{"Angles", {&angles.x, &angles.y}},
{"Touch", {&buttons.chest,
&buttons.head.front,
&buttons.head.middle,
&buttons.head.rear,
&buttons.left_foot.left,
&buttons.left_foot.right,
&buttons.left_hand.back,
&buttons.left_hand.left,
&buttons.left_hand.right,
&buttons.right_foot.left,
&buttons.right_foot.right,
&buttons.right_hand.back,
&buttons.right_hand.left,
&buttons.right_hand.right}},
{"Accelerometer", {&accel.x, &accel.y, &accel.z}},
{"Gyroscope", {&gyr.roll, &gyr.pitch, &gyr.yaw}},
// The order for battery values in Softbank's documentation is wrong.
{"Battery", {&battery.charge, &battery.status, &battery.current, &battery.temp}},
{"FSR", {&fsr.left.fl, &fsr.left.fr, &fsr.left.rl, &fsr.left.rr,
&fsr.right.fl, &fsr.right.fr, &fsr.right.rl, &fsr.right.rr}},
{"Position", {
&head[Lola::HeadYaw].angle, &head[Lola::HeadPitch].angle,
&arms[Lola::LShoulderPitch].angle, &arms[Lola::LShoulderRoll].angle, &arms[Lola::LElbowYaw].angle,
&arms[Lola::LElbowRoll].angle, &arms[Lola::LWristYaw].angle,
&legs[Lola::HipYawPitch].angle, &legs[Lola::LHipRoll].angle, &legs[Lola::LHipPitch].angle,
&legs[Lola::LKneePitch].angle, &legs[Lola::LAnklePitch].angle, &legs[Lola::LAnkleRoll].angle,
&legs[Lola::RHipRoll].angle, &legs[Lola::RHipPitch].angle, &legs[Lola::RKneePitch].angle,
&legs[Lola::RAnklePitch].angle, &legs[Lola::RAnkleRoll].angle,
&arms[Lola::RShoulderPitch].angle, &arms[Lola::RShoulderRoll].angle, &arms[Lola::RElbowYaw].angle,
&arms[Lola::RElbowRoll].angle, &arms[Lola::RWristYaw].angle,
&arms[Lola::LHand].angle, &arms[Lola::RHand].angle}},
{"Stiffness", {
&head[Lola::HeadYaw].stiffness, &head[Lola::HeadPitch].stiffness,
&arms[Lola::LShoulderPitch].stiffness, &arms[Lola::LShoulderRoll].stiffness, &arms[Lola::LElbowYaw].stiffness,
&arms[Lola::LElbowRoll].stiffness, &arms[Lola::LWristYaw].stiffness,
&legs[Lola::HipYawPitch].stiffness, &legs[Lola::LHipRoll].stiffness, &legs[Lola::LHipPitch].stiffness,
&legs[Lola::LKneePitch].stiffness, &legs[Lola::LAnklePitch].stiffness, &legs[Lola::LAnkleRoll].stiffness,
&legs[Lola::RHipRoll].stiffness, &legs[Lola::RHipPitch].stiffness, &legs[Lola::RKneePitch].stiffness,
&legs[Lola::RAnklePitch].stiffness, &legs[Lola::RAnkleRoll].stiffness,
&arms[Lola::RShoulderPitch].stiffness, &arms[Lola::RShoulderRoll].stiffness, &arms[Lola::RElbowYaw].stiffness,
&arms[Lola::RElbowRoll].stiffness, &arms[Lola::RWristYaw].stiffness,
&arms[Lola::LHand].stiffness, &arms[Lola::RHand].stiffness}},
{"Current", {
&head[Lola::HeadYaw].current, &head[Lola::HeadPitch].current,
&arms[Lola::LShoulderPitch].current, &arms[Lola::LShoulderRoll].current, &arms[Lola::LElbowYaw].current,
&arms[Lola::LElbowRoll].current, &arms[Lola::LWristYaw].current,
&legs[Lola::HipYawPitch].current, &legs[Lola::LHipRoll].current, &legs[Lola::LHipPitch].current,
&legs[Lola::LKneePitch].current, &legs[Lola::LAnklePitch].current, &legs[Lola::LAnkleRoll].current,
&legs[Lola::RHipRoll].current, &legs[Lola::RHipPitch].current, &legs[Lola::RKneePitch].current,
&legs[Lola::RAnklePitch].current, &legs[Lola::RAnkleRoll].current,
&arms[Lola::RShoulderPitch].current, &arms[Lola::RShoulderRoll].current, &arms[Lola::RElbowYaw].current,
&arms[Lola::RElbowRoll].current, &arms[Lola::RWristYaw].current,
&arms[Lola::LHand].current, &arms[Lola::RHand].current}},
{"Temperature", {
&head[Lola::HeadYaw].temperature, &head[Lola::HeadPitch].temperature,
&arms[Lola::LShoulderPitch].temperature, &arms[Lola::LShoulderRoll].temperature, &arms[Lola::LElbowYaw].temperature,
&arms[Lola::LElbowRoll].temperature, &arms[Lola::LWristYaw].temperature,
&legs[Lola::HipYawPitch].temperature, &legs[Lola::LHipRoll].temperature, &legs[Lola::LHipPitch].temperature,
&legs[Lola::LKneePitch].temperature, &legs[Lola::LAnklePitch].temperature, &legs[Lola::LAnkleRoll].temperature,
&legs[Lola::RHipRoll].temperature, &legs[Lola::RHipPitch].temperature, &legs[Lola::RKneePitch].temperature,
&legs[Lola::RAnklePitch].temperature, &legs[Lola::RAnkleRoll].temperature,
&arms[Lola::RShoulderPitch].temperature, &arms[Lola::RShoulderRoll].temperature, &arms[Lola::RElbowYaw].temperature,
&arms[Lola::RElbowRoll].temperature, &arms[Lola::RWristYaw].temperature,
&arms[Lola::LHand].temperature, &arms[Lola::RHand].temperature}},
{"Sonar", {&sonars.left, &sonars.right}}
};
sensor_integer_data = {
{"Status", {
&head[Lola::HeadYaw].status, &head[Lola::HeadPitch].status,
&arms[Lola::LShoulderPitch].status, &arms[Lola::LShoulderRoll].status, &arms[Lola::LElbowYaw].status,
&arms[Lola::LElbowRoll].status, &arms[Lola::LWristYaw].status,
&legs[Lola::HipYawPitch].status, &legs[Lola::LHipRoll].status, &legs[Lola::LHipPitch].status,
&legs[Lola::LKneePitch].status, &legs[Lola::LAnklePitch].status, &legs[Lola::LAnkleRoll].status,
&legs[Lola::RHipRoll].status, &legs[Lola::RHipPitch].status, &legs[Lola::RKneePitch].status,
&legs[Lola::RAnklePitch].status, &legs[Lola::RAnkleRoll].status,
&arms[Lola::RShoulderPitch].status, &arms[Lola::RShoulderRoll].status, &arms[Lola::RElbowYaw].status,
&arms[Lola::RElbowRoll].status, &arms[Lola::RWristYaw].status,
&arms[Lola::LHand].status, &arms[Lola::RHand].status}},
};
}
void LolaFrameHandler::initActuatorFrame() {
/* This sets up memory locations from which LoLA reads when sending data
* to the LoLA connector socket.
*/
auto& head = actuator_frame.joints.head;
auto& arms = actuator_frame.joints.arms;
auto& legs = actuator_frame.joints.legs;
auto& ears = actuator_frame.leds.ears;
auto& eyes = actuator_frame.leds.eyes;
auto& chest = actuator_frame.leds.chest;
auto& lfoot = actuator_frame.leds.left_foot;
auto& rfoot = actuator_frame.leds.right_foot;
auto& skull = actuator_frame.leds.skull;
auto& sonars = actuator_frame.sonars;
// Also not all actuators, you know the drill. ;)
actuator_frame_positions = {
{"LEar", {&ears.left[0], &ears.left[1], &ears.left[2], &ears.left[3], &ears.left[4],
&ears.left[5], &ears.left[6], &ears.left[7], &ears.left[8], &ears.left[9]}},
{"REar", {&ears.right[9], &ears.right[8], &ears.right[7], &ears.right[6], &ears.right[5],
&ears.right[4], &ears.right[3], &ears.right[2], &ears.right[1], &ears.right[0]}},
// What did they take to come up with the ordering of the eye LEDs?
{"LEye", {&eyes.left[1].r, &eyes.left[0].r, &eyes.left[7].r, &eyes.left[6].r,
&eyes.left[5].r, &eyes.left[4].r, &eyes.left[3].r, &eyes.left[2].r,
&eyes.left[1].g, &eyes.left[0].g, &eyes.left[7].g, &eyes.left[6].g,
&eyes.left[5].g, &eyes.left[4].g, &eyes.left[3].g, &eyes.left[2].g,
&eyes.left[1].b, &eyes.left[0].b, &eyes.left[7].b, &eyes.left[6].b,
&eyes.left[5].b, &eyes.left[4].b, &eyes.left[3].b, &eyes.left[2].b}},
{"REye", {&eyes.right[0].r, &eyes.right[1].r, &eyes.right[2].r, &eyes.right[3].r,
&eyes.right[4].r, &eyes.right[5].r, &eyes.right[6].r, &eyes.right[7].r,
&eyes.right[0].g, &eyes.right[1].g, &eyes.right[2].g, &eyes.right[3].g,
&eyes.right[4].g, &eyes.right[5].g, &eyes.right[6].g, &eyes.right[7].g,
&eyes.right[0].b, &eyes.right[1].b, &eyes.right[2].b, &eyes.right[3].b,
&eyes.right[4].b, &eyes.right[5].b, &eyes.right[6].b, &eyes.right[7].b}},
{"Chest", {&chest.r, &chest.g, &chest.b}},
{"LFoot", {&lfoot.r, &lfoot.g, &lfoot.b}},
{"RFoot", {&rfoot.r, &rfoot.g, &rfoot.b}},
{"Skull", {&skull.left[0], &skull.left[1], &skull.left[2], &skull.left[3], &skull.left[4], &skull.left[5],
&skull.right[0], &skull.right[1], &skull.right[2], &skull.right[3], &skull.right[4], &skull.right[5]}},
{"Position", {
&head[Lola::HeadYaw].angle, &head[Lola::HeadPitch].angle,
&arms[Lola::LShoulderPitch].angle, &arms[Lola::LShoulderRoll].angle, &arms[Lola::LElbowYaw].angle,
&arms[Lola::LElbowRoll].angle, &arms[Lola::LWristYaw].angle,
&legs[Lola::HipYawPitch].angle, &legs[Lola::LHipRoll].angle, &legs[Lola::LHipPitch].angle,
&legs[Lola::LKneePitch].angle, &legs[Lola::LAnklePitch].angle, &legs[Lola::LAnkleRoll].angle,
&legs[Lola::RHipRoll].angle, &legs[Lola::RHipPitch].angle, &legs[Lola::RKneePitch].angle,
&legs[Lola::RAnklePitch].angle, &legs[Lola::RAnkleRoll].angle,
&arms[Lola::RShoulderPitch].angle, &arms[Lola::RShoulderRoll].angle, &arms[Lola::RElbowYaw].angle,
&arms[Lola::RElbowRoll].angle, &arms[Lola::RWristYaw].angle,
&arms[Lola::LHand].angle, &arms[Lola::RHand].angle}},
{"Stiffness", {
&head[Lola::HeadYaw].stiffness, &head[Lola::HeadPitch].stiffness,
&arms[Lola::LShoulderPitch].stiffness, &arms[Lola::LShoulderRoll].stiffness, &arms[Lola::LElbowYaw].stiffness,
&arms[Lola::LElbowRoll].stiffness, &arms[Lola::LWristYaw].stiffness,
&legs[Lola::HipYawPitch].stiffness, &legs[Lola::LHipRoll].stiffness, &legs[Lola::LHipPitch].stiffness,
&legs[Lola::LKneePitch].stiffness, &legs[Lola::LAnklePitch].stiffness, &legs[Lola::LAnkleRoll].stiffness,
&legs[Lola::RHipRoll].stiffness, &legs[Lola::RHipPitch].stiffness, &legs[Lola::RKneePitch].stiffness,
&legs[Lola::RAnklePitch].stiffness, &legs[Lola::RAnkleRoll].stiffness,
&arms[Lola::RShoulderPitch].stiffness, &arms[Lola::RShoulderRoll].stiffness, &arms[Lola::RElbowYaw].stiffness,
&arms[Lola::RElbowRoll].stiffness, &arms[Lola::RWristYaw].stiffness,
&arms[Lola::LHand].stiffness, &arms[Lola::RHand].stiffness}},
};
sonar_actuator_frame_positions = {{"Sonar", {&sonars.left, &sonars.right}}};
}
void LolaFrameHandler::get_sensor_values(JointBlock* joint_angles, SensorBlock* sensors) {
// unpack data recieved from the LoLA connector and pass it along to
// higher levels of the codebase by setting values in the JointBlock and
// SensorBlock memory blocks.
this->unpack(this->data, this->socket.receive(boost::asio::buffer(data, MAX_LEN)));
for(int i = 0; i < NUM_JOINTS; i++) {
if (auto ptr = find(sensor_frame_positions, "Position")) {
joint_angles->values_[i] = *(ptr.value())[utToLolaJointIx[i]];
}
if (auto ptr = find(sensor_frame_positions, "Stiffness")) {
joint_angles->stiffness_[i] = *(ptr.value())[utToLolaJointIx[i]];
}
if (auto ptr = find(sensor_frame_positions, "Temperature")) {
joint_angles->temperature_[i] = *(ptr.value())[utToLolaJointIx[i]];
}
if (auto ptr = find(sensor_frame_positions, "Current")) {
joint_angles->current_[i] = *(ptr.value())[utToLolaJointIx[i]];
}
if (auto ptr = find(sensor_integer_data, "Status")) {
joint_angles->status_[i] = *(ptr.value())[utToLolaJointIx[i]];
}
}
// Look at the "Sensor" enum in core/common/RobotInfo.h in order to make
// sense of this block of code. Basically we are searching for values in
// the recieved message and setting corresponding values in the sensor
// block.
std::string search_str;
for(int i=0; i < NUM_SENSORS; i++) {
if (i < accelX) search_str = "Gyroscope";
else if (i < angleX) search_str = "Accelerometer";
else if (i < battery) {
if (i == angleZ) {
sensors->values_[i] = 0;
continue;
}
search_str = "Angles";
} else if (i == battery) search_str = "Battery";
else if (i < bumperLL) search_str = "FSR";
else if (i < centerButton) {
sensors->values_[i] = 0;
continue;
}
else if (i <= headRear) {
search_str = "Touch";
}
else {
std::cout << i << " " << NUM_SENSORS << std::endl;
assert(false); // Should not get here.
}
if (auto ptr = find(sensor_frame_positions, search_str)) {
sensors->values_[i] = *(ptr.value())[utToLolaSensorIx[i]];
}
}
if(auto ptr = find(sensor_frame_positions, "Sonar")) {
sensors->sonar_left_[0] = *(ptr.value())[0];
sensors->sonar_right_[0] = *(ptr.value())[1];
}
}
void LolaFrameHandler::set_actuator_values(JointCommandBlock *raw_joint_commands, JointBlock* raw_joint_angles_, LEDBlock* led_block) {
/* This function takes actuator values from higher level code and passes
* them along to the LoLA connector.
*/
std::vector<float> interpolated_angle(NUM_JOINTS, 0);
std::vector<float> interpolated_stiffness(NUM_JOINTS, -1);
std::array<float, NUM_JOINTS> transformed_stiffness_;
// The range of stiffnesses in our codebase is 0 to 1 whereas for LoLA
// the range of stiffnesses is -1 to 1. We simply scale the values
// recieved from higher levels of the codebase before passing them along.
for(int i = 0; i < NUM_JOINTS; i++) {
transformed_stiffness_[i] = raw_joint_commands->stiffness_[i] * 2 - 1;
}
// Gettng interpolated commands for head yaw, head pitch, body angles and
// stiffnesses.
head_yaw.nextMovement(
raw_joint_commands->angles_,
raw_joint_angles_->values_,
raw_joint_commands->send_head_yaw_angle_,
raw_joint_commands->head_yaw_angle_time_,
interpolated_angle
);
head_pitch.nextMovement(
raw_joint_commands->angles_,
raw_joint_angles_->values_,
raw_joint_commands->send_head_pitch_angle_,
raw_joint_commands->head_pitch_angle_time_,
interpolated_angle
);
body.nextMovement(
raw_joint_commands->angles_,
raw_joint_angles_->values_,
raw_joint_commands->send_body_angles_,
raw_joint_commands->body_angle_time_,
interpolated_angle
);
stiffness.nextMovement(
transformed_stiffness_,
raw_joint_angles_->stiffness_,
raw_joint_commands->send_stiffness_,
raw_joint_commands->stiffness_time_,
interpolated_stiffness
);
for(int i = 0; i < interpolated_angle.size(); i++) {
if (auto ptr = find(actuator_frame_positions, "Position")) {
*(ptr.value())[utToLolaJointIx[i]] = interpolated_angle[i];
}
if (auto ptr = find(actuator_frame_positions, "Stiffness")) {
*(ptr.value())[utToLolaJointIx[i]] = interpolated_stiffness[i];
}
}
send_leds(led_block);
char* buffer;
size_t size;
tie(buffer, size) = pack();
this->socket.send(boost::asio::buffer(buffer, size));
}
void LolaFrameHandler::send_leds(LEDBlock* led_block) {
if ( not led_block->send_leds_ ) return;
led_block->send_leds_ = false; // reset variable
std::string search_str;
for(int i = 0; i < NUM_LEDS; i++) {
if (i <= EarLeft324) search_str = "LEar";
else if (i <= EarRight324) search_str = "REar";
else if (i <= FaceBlueLeft315) search_str = "LEye";
else if (i <= FaceBlueRight315) search_str = "REye";
else if (i <= ChestBlue) search_str = "Chest";
else if (i <= LFootBlue) search_str = "LFoot";
else if (i <= RFootBlue) search_str = "RFoot";
else search_str = "Skull";
if (auto ptr = find(actuator_frame_positions, search_str)) {
*(ptr.value())[utToLolaLed[i]] = led_block->values_[i];
}
}
}
const LolaSensorFrame& LolaFrameHandler::unpack(const char* const buffer, size_t size) {
msgpack::unpacker pac;
pac.reserve_buffer(size);
memcpy(pac.buffer(), buffer, size);
pac.buffer_consumed(size);
msgpack::object_handle object_handler;
if (!pac.next(object_handler)) {
cerr << "No MsgPack message in LoLA message." << endl;
return sensor_frame;
}
const auto& map = object_handler.get().via.map;
auto* category = map.ptr;
for (uint32_t i = 0; i < map.size; i++, category++) {
if (auto ptr = find(sensor_frame_positions, category->key.as<string>())) {
zip(*ptr, category->val.as<vector<float>>(), [](float* r, float f) { if (r != nullptr) *r = f; });
} else if (auto ptr = find(sensor_integer_data, category->key.as<string>())) {
zip(*ptr, category->val.as<vector<int>>(), [](int* r, int f) { if (r != nullptr) *r = f; });
}
}
// These seem to be different between robots but consistent between reboots. Make sure you calibrate each robot otherwise most filters (e.g. Madgwick) won't work correctly!
sensor_frame.imu.gyr.yaw *= -1.f; //z
sensor_frame.imu.gyr.pitch *= 1.f; //y
sensor_frame.imu.gyr.roll *= 1.f; //x
return sensor_frame;
}
pair<char*, size_t> LolaFrameHandler::pack() {
buffer.clear();
msgpack::packer<msgpack::sbuffer> pk(&buffer);
pk.pack_map(actuator_frame_positions.size() + sonar_actuator_frame_positions.size());
for (const auto& kv : actuator_frame_positions) {
pk.pack(kv.first);
pk.pack_array(kv.second.size());
for (float* val : kv.second) {
pk.pack(*val);
}
}
for (const auto& kv : sonar_actuator_frame_positions) {
pk.pack(kv.first);
pk.pack_array(kv.second.size());
for (bool* val : kv.second) {
pk.pack(*val);
}
}
return {buffer.data(), buffer.size()};
}
void LolaFrameHandler::initIxDictionary() {
// This list was made by looking at the "Position" vector inside sensor_frame_positions
// 0. HeadYaw
// 1. HeadPitch
// 2. LShoulderPitch
// 3. LShoulderRoll
// 4. LElbowYaw
// 5. LElbowRoll
// 6. LWristYaw
// 7. HipYawPitch
// 8. LHipRoll
// 9. LHipPitch
// 10. LKneePitch
// 11. LAnklePitch
// 12. LAnkleRoll
// 13. RHipRoll
// 14. RHipPitch
// 15. RKneePitch
// 16. RAnklePitch
// 17. RAnkleRoll
// 18. RShoulderPitch
// 19. RShoulderRoll
// 20. RElbowYaw
// 21. RElbowRoll
// 22. RWristYaw
// 23. LHand
// 24. RHand
this->utToLolaJointIx[HeadYaw] = 0;
this->utToLolaJointIx[HeadPitch] = 1;
this->utToLolaJointIx[LHipYawPitch] = 7;
this->utToLolaJointIx[LHipRoll] = 8;
this->utToLolaJointIx[LHipPitch] = 9;
this->utToLolaJointIx[LKneePitch] = 10;
this->utToLolaJointIx[LAnklePitch] = 11;
this->utToLolaJointIx[LAnkleRoll] = 12;
this->utToLolaJointIx[RHipYawPitch] = 7;
this->utToLolaJointIx[RHipRoll] = 13;
this->utToLolaJointIx[RHipPitch] = 14;
this->utToLolaJointIx[RKneePitch] = 15;
this->utToLolaJointIx[RAnklePitch] = 16;
this->utToLolaJointIx[RAnkleRoll] = 17;
this->utToLolaJointIx[LShoulderPitch] = 2;
this->utToLolaJointIx[LShoulderRoll] = 3;
this->utToLolaJointIx[LElbowYaw] = 4;
this->utToLolaJointIx[LElbowRoll] = 5;
this->utToLolaJointIx[RShoulderPitch] = 18;
this->utToLolaJointIx[RShoulderRoll] = 19;
this->utToLolaJointIx[RElbowYaw] = 20;
this->utToLolaJointIx[RElbowRoll] = 21;
utToLolaSensorIx[gyroX] = 0;
utToLolaSensorIx[gyroY] = 1;
utToLolaSensorIx[gyroZ] = 2;
utToLolaSensorIx[accelX] = 0;
utToLolaSensorIx[accelY] = 1;
utToLolaSensorIx[accelZ] = 2;
utToLolaSensorIx[angleX] = 0;
utToLolaSensorIx[angleY] = 1;
utToLolaSensorIx[angleZ] = -1; // Not available yet
utToLolaSensorIx[battery] = 0;
utToLolaSensorIx[fsrLFL] = 0;
utToLolaSensorIx[fsrLFR] = 1;
utToLolaSensorIx[fsrLRL] = 2;
utToLolaSensorIx[fsrLRR] = 3;
utToLolaSensorIx[fsrRFL] = 4;
utToLolaSensorIx[fsrRFR] = 5;
utToLolaSensorIx[fsrRRL] = 6;
utToLolaSensorIx[fsrRRR] = 7;
utToLolaSensorIx[bumperLL] = 4;
utToLolaSensorIx[bumperLR] = 5;
utToLolaSensorIx[bumperRL] = 9;
utToLolaSensorIx[bumperRR] = 10;
utToLolaSensorIx[centerButton] = 0;
utToLolaSensorIx[headFront] = 1;
utToLolaSensorIx[headMiddle] = 2;
utToLolaSensorIx[headRear] = 3;
// Ear lights
utToLolaLed[EarLeft0] = 0;
utToLolaLed[EarLeft36] = 1;
utToLolaLed[EarLeft72] = 2;
utToLolaLed[EarLeft108] = 3;
utToLolaLed[EarLeft144] = 4;
utToLolaLed[EarLeft180] = 5;
utToLolaLed[EarLeft216] = 6;
utToLolaLed[EarLeft252] = 7;
utToLolaLed[EarLeft288] = 8;
utToLolaLed[EarLeft324] = 9;
utToLolaLed[EarRight0] = 0;
utToLolaLed[EarRight36] = 1;
utToLolaLed[EarRight72] = 2;
utToLolaLed[EarRight108] = 3;
utToLolaLed[EarRight144] = 4;
utToLolaLed[EarRight180] = 5;
utToLolaLed[EarRight216] = 6;
utToLolaLed[EarRight252] = 7;
utToLolaLed[EarRight288] = 8;
utToLolaLed[EarRight324] = 9;
// Eye lights
utToLolaLed[FaceRedLeft0] = 0;
utToLolaLed[FaceRedLeft45] = 1;
utToLolaLed[FaceRedLeft90] = 2;
utToLolaLed[FaceRedLeft135] = 3;
utToLolaLed[FaceRedLeft180] = 4;
utToLolaLed[FaceRedLeft225] = 5;
utToLolaLed[FaceRedLeft270] = 6;
utToLolaLed[FaceRedLeft315] = 7;
utToLolaLed[FaceGreenLeft0] = 8;
utToLolaLed[FaceGreenLeft45] = 9;
utToLolaLed[FaceGreenLeft90] = 10;
utToLolaLed[FaceGreenLeft135] = 11;
utToLolaLed[FaceGreenLeft180] = 12;
utToLolaLed[FaceGreenLeft225] = 13;
utToLolaLed[FaceGreenLeft270] = 14;
utToLolaLed[FaceGreenLeft315] = 15;
utToLolaLed[FaceBlueLeft0] = 16;
utToLolaLed[FaceBlueLeft45] = 17;
utToLolaLed[FaceBlueLeft90] = 18;
utToLolaLed[FaceBlueLeft135] = 19;
utToLolaLed[FaceBlueLeft180] = 20;
utToLolaLed[FaceBlueLeft225] = 21;
utToLolaLed[FaceBlueLeft270] = 22;
utToLolaLed[FaceBlueLeft315] = 23;
utToLolaLed[FaceRedRight0] = 0;
utToLolaLed[FaceRedRight45] = 1;
utToLolaLed[FaceRedRight90] = 2;
utToLolaLed[FaceRedRight135] = 3;
utToLolaLed[FaceRedRight180] = 4;
utToLolaLed[FaceRedRight225] = 5;
utToLolaLed[FaceRedRight270] = 6;
utToLolaLed[FaceRedRight315] = 7;
utToLolaLed[FaceGreenRight0] = 8;
utToLolaLed[FaceGreenRight45] = 9;
utToLolaLed[FaceGreenRight90] = 10;
utToLolaLed[FaceGreenRight135] = 11;
utToLolaLed[FaceGreenRight180] = 12;
utToLolaLed[FaceGreenRight225] = 13;
utToLolaLed[FaceGreenRight270] = 14;
utToLolaLed[FaceGreenRight315] = 15;
utToLolaLed[FaceBlueRight0] = 16;
utToLolaLed[FaceBlueRight45] = 17;
utToLolaLed[FaceBlueRight90] = 18;
utToLolaLed[FaceBlueRight135] = 19;
utToLolaLed[FaceBlueRight180] = 20;
utToLolaLed[FaceBlueRight225] = 21;
utToLolaLed[FaceBlueRight270] = 22;
utToLolaLed[FaceBlueRight315] = 23;
// Chest lights
utToLolaLed[ChestRed] = 0;
utToLolaLed[ChestGreen] = 1;
utToLolaLed[ChestBlue] = 2;
// Left foot lights
utToLolaLed[LFootRed] = 0;
utToLolaLed[LFootGreen] = 1;
utToLolaLed[LFootBlue] = 2;
// Right foot lights
utToLolaLed[RFootRed] = 0;
utToLolaLed[RFootGreen] = 1;
utToLolaLed[RFootBlue] = 2;
utToLolaLed[LHead0] = 0;
utToLolaLed[LHead1] = 1;
utToLolaLed[LHead2] = 2;
utToLolaLed[LHead3] = 3;
utToLolaLed[LHead4] = 4;
utToLolaLed[LHead5] = 5;
utToLolaLed[RHead5] = 6;
utToLolaLed[RHead4] = 7;
utToLolaLed[RHead3] = 8;
utToLolaLed[RHead2] = 9;
utToLolaLed[RHead1] = 10;
utToLolaLed[RHead0] = 11;
std::cout << "Loaded sensor and joint indices" << std::endl;
}
|
06bec7bb38baf99ee6f408d34acc136609863b00
|
7de0933dddab0e62d6048c7ae8d2dc835579cea0
|
/SHFW/Sprite.cpp
|
05ae9f2fd0a199c9b7592642ac312f803fa4324c
|
[] |
no_license
|
UltraGameCoder/SHFW
|
c177bfb112f5100f3c15167444fac0ef7b45a0dd
|
aa7eecade51f853c2c977e9add327090bbde99e3
|
refs/heads/master
| 2021-09-07T03:00:46.872161
| 2018-02-16T10:18:40
| 2018-02-16T10:18:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,915
|
cpp
|
Sprite.cpp
|
#include <iostream>
#include "SHFWConfig.h"
#include "Sprite.h"
Sprite::Sprite()
{
this->texturename = AUTOGENWHITE;
this->fragmentshader = DEFAULTFRAGMENTSHADERPATH;
this->vertexshader = DEFAULTVERTEXSHADERPATH;
spriteposition = Point3(0.0f, 0.0f, 0.0f); // spritebatch only
spriterotation = Point3(0.0f, 0.0f, 0.0f); // spritebatch only
spritescale = Point3(1.0f, 1.0f, 1.0f); // spritebatch only
pivot = Point2(0.5f, 0.5f);
uvdim = Point2(1.0f, 1.0f);
uvoffset = Point2(0.0f, 0.0f);
size = Point2(0, 0);
for (size_t i = 0; i < 8; i++) {
customParams[i] = Point3(0.0f, 0.0f, 0.0f);
}
this->palette = NULL;
this->frame = 0;
this->filter = DEFAULTFILTER;
this->wrap = DEFAULTWRAP;
this->dyntexture = NULL;
this->dynamic = false;
this->circlemesh = 0; // false
this->which = -1; // disabled
this->useculling = 0;
color = RGBAColor(255, 255, 255, 255);
}
Sprite::~Sprite()
{
//if (this->dyntexture != NULL) {
// TODO this leaks the dynamic textures (get rid of !dynamic)
if (this->dyntexture != NULL && !this->dynamic) {
delete this->dyntexture;
this->dyntexture = NULL;
}
if (this->palette != NULL) {
delete this->palette;
this->palette = NULL;
}
}
void Sprite::setPalette(const std::string& filename)
{
if (this->palette != NULL) {
delete this->palette;
this->palette = NULL;
}
this->palette = new Texture();
this->palette->loadTGAImage(filename, 0, 0, 1); // filename, filter, wrap, dimension
}
void Sprite::setupSprite(const std::string& filename, float pivotx, float pivoty, float uvwidth, float uvheight)
{
this->setupSprite(filename, pivotx, pivoty, uvwidth, uvheight, DEFAULTFILTER, DEFAULTWRAP);
}
void Sprite::setupCircleSprite(const std::string& filename, int radius, int segments)
{
this->setupSegmentSprite(filename, radius, segments, -1);
}
void Sprite::setupSegmentSprite(const std::string& filename, int radius, int segments, int which)
{
this->texturename = filename;
this->circlemesh = segments; // only a single segment (triangle)
this->which = which; // which segment
this->filter = DEFAULTFILTER;
this->wrap = DEFAULTWRAP;
size.x = radius * 2;
size.y = radius * 2;
}
void Sprite::setupSprite(const std::string& filename, float pivotx, float pivoty, float uvwidth, float uvheight, int filter, int wrap)
{
this->texturename = filename;
this->filter = filter;
this->wrap = wrap;
pivot.x = pivotx;
pivot.y = pivoty;
// 1.00000 = 1x1 spritesheet (basic sprite)
// 0.50000 = 2x2 spritesheet
// 0.25000 = 4x4 spritesheet
// 0.12500 = 8x8 spritesheet
// 0.06250 = 16x16 spritesheet
// 0.03125 = 32x32 spritesheet
uvdim.x = uvwidth;
uvdim.y = uvheight;
}
void Sprite::setupSpriteByPixelBuffer(PixelBuffer* pixels)
{
std::cout << "Sprite::setupSpriteByPixelBuffer() " << std::endl;
if (this->dyntexture != NULL) {
delete this->dyntexture;
this->dyntexture = NULL;
}
this->filter = pixels->filter;
this->wrap = pixels->wrap;
size.x = pixels->width;
size.y = pixels->height;
this->dyntexture = new Texture();
this->dyntexture->createFromBuffer(pixels);
this->dynamic = true;
}
void Sprite::setupSpriteTGAPixelBuffer(const std::string& filename, int filter, int wrap)
{
std::cout << "Sprite::setupSpriteByPixelBuffer() " << std::endl;
if (this->dyntexture != NULL) {
delete this->dyntexture;
this->dyntexture = NULL;
}
this->dyntexture = new Texture();
this->dyntexture->loadTGAImage(filename, filter, wrap);
this->dynamic = true;
size.x = (float) this->dyntexture->width();
size.y = (float) this->dyntexture->height();
this->filter = filter;
this->wrap = wrap;
}
int Sprite::setFrame(int f)
{
int w = 1.0f / uvdim.x;
int h = 1.0f / uvdim.y;
if (f >= w*h) {
this->frame = 0;
uvoffset.x = 0;
uvoffset.y = 0;
return this->frame;
}
int ypos=f/w;
int xpos=f%w;
uvoffset.x = xpos * uvdim.x;
uvoffset.y = ypos * uvdim.y;
this->frame = f;
return this->frame;
}
|
6a9a8b75fce1dbf81f4be0223435d311c6bbe068
|
4dcbb69d5ec59489e1cba4d5d6d54640b2e8ac64
|
/UAS/Stack & Queue/stack & queue.cpp
|
aaa763f4a4c104f3cca4eb159e2dc367b524ed50
|
[] |
no_license
|
fikrihelmi17/Cpp-KumpulanFileCppSemester3
|
933eab27afef872f52d10a891cc086c349212bdf
|
c763560a2132f266f1085bf23440d0e3d0402582
|
refs/heads/master
| 2022-11-20T04:21:10.439412
| 2020-07-03T07:17:17
| 2020-07-03T07:17:17
| 276,834,417
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,726
|
cpp
|
stack & queue.cpp
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
struct mahasiswa { //inisialisasi stuct mahasiswa
char kode[5]; //disini di deklarasikan variabel yang dibutuhkan
char nama[30];
char angkatan[20];
char jurusan[20];
char email[20];
};
struct stack { //karna dua pointer maka inisialisasikan dua pointer
mahasiswa mhs;
stack *top;
stack *bottom;
};
struct queue { //inisialisasi struct queue
mahasiswa mhs;
queue *next;
queue *prev;
};
//dibawah ini adalah inisialisasi fungsi fungsi
void push(char kode[], char nama[], char angkatan[], char jurusan[], char email[]);
void pop();
void printStack(char tipe[]);
void add(char kode[], char nama[], char angkatan[], char jurusan[], char email[]);
void hapus();
void printQueue(char tipe[]);
stack *sHead, *sTail;
queue *qHead, *qTail;
int main(){
int prg, pilih;
char kode[5];
char nama[30];
char angkatan[20];
char jurusan[20];
char email[20];
sHead = NULL;
sTail = NULL;
qHead = NULL;
qTail = NULL;
do{
//menu
system("cls");
printf(" 1. Stack\n");
printf(" 2. Queue\n");
printf(" 3. Keluar program\n\n");
printf(" Pilih : "); scanf("%d", &prg);
switch(prg){
case 1: //ketika case 1 maka keluar menu stack
do{
system("cls");
printf(" Tumpukan (Stack) \n");
printf(" 1. Tambah mhs\n");
printf(" 2. Hapus mhs\n");
printf(" 3. Cetak mhs dari atas\n");
printf(" 4. Keluar\n");
printf("==============================\n");
printf(" Pilih : "); scanf("%d",&pilih);
switch(pilih){
case 1:
system("cls");
printf(" Kode : "); scanf("%s", kode);
printf(" Nama : "); scanf("%s", nama);
printf(" Angkatan : "); scanf("%s", angkatan);
printf(" Jurusan : "); scanf("%s", jurusan);
printf(" Email : "); scanf("%s", email);
printf("\n\n");
push(kode, nama, angkatan, jurusan, email); //diarahkan ke fungsi push
break;
case 2:
system("cls");
pop();
getch(); //menunggu enter dari user
break;
case 3:
system("cls");
printStack("top");
getch();
break;
}
} while(pilih >= 1 && pilih <= 3); //jika diluar jangkauan ini maka program akan berhenti
break;
case 2:
do{
system("cls");
printf(" Antrian (Queue) \n");
printf(" 1. Tambah mhs\n");
printf(" 2. Hapus mhs\n");
printf(" 3. Cetak mhs dari depan\n");
printf(" 4. Keluar\n");
printf("\n\n");
printf(" Pilih : "); scanf("%d",&pilih);
switch(pilih){
case 1:
system("cls");
printf(" Kode : "); scanf("%s", kode);
printf(" Nama : "); scanf("%s", nama);
printf(" Angkatan : "); scanf("%s", angkatan);
printf(" Jurusan : "); scanf("%s", jurusan);
printf(" Email : "); scanf("%s", email);
printf("\n\n");
add(kode, nama, angkatan, jurusan, email); //diarahkan ke fungsi add
break;
case 2:
system("cls");
hapus();
getch();
break;
case 3:
system("cls");
printQueue("front");
getch();
break;
}
} while(pilih >= 1 && pilih <= 3);
break;
}
} while(prg >= 1 && prg <= 2);
return 0;
}
void push(char kode[], char nama[], char angkatan[], char jurusan[], char email[]){
stack *p = (stack*)malloc(sizeof(stack));
//memasukkan data ke struct
strcpy(p->mhs.kode, kode);
strcpy(p->mhs.nama, nama);
strcpy(p->mhs.angkatan, angkatan);
strcpy(p->mhs.jurusan, jurusan);
strcpy(p->mhs.email, email);
//disini lah bagian push
if(sHead == NULL) {
sHead = p;
p->top = NULL;
p->bottom = NULL;
sTail = p;
} else {
p->bottom = sHead;
sHead = p;
p->bottom->top = p;
p->top = NULL;
}
}
//fungsi pop atau menghapus
void pop(){
stack *p = sHead;
if(sHead != NULL) {
printf(" Mahasiswa %s sudah dihapus...", sHead->mhs.nama);
sHead = p->bottom;
sHead->top = NULL;
free(p); //hapus
}
}
//fungsi print stack
void printStack(char tipe[]){
printf(" Data Mahasiswa\n");
printf("===============================================\n");
printf(" Kode Nama Angkatan Jurusan Email\n");
printf("-----------------------------------------------\n");
if(strcmp(tipe,"top")==0){
stack *p = sHead;
while (p != NULL) {
printf(" %s %-10s %-11s %-9s %s \n",
p->mhs.kode, p->mhs.nama, p->mhs.angkatan, p->mhs.jurusan, p->mhs.email); //mengambil data dari struct dan printkan
p = p->bottom; //berjalan ke sebelahnya
}
}
printf("===============================================\n");
}
//fungsi add
void add(char kode[], char nama[], char angkatan[], char jurusan[], char email[]){
queue *p = (queue*)malloc(sizeof(queue));
//memasukkan data ke struct
strcpy(p->mhs.kode, kode);
strcpy(p->mhs.nama, nama);
strcpy(p->mhs.angkatan, angkatan);
strcpy(p->mhs.jurusan, jurusan);
strcpy(p->mhs.email, email);
//bagian queue
if(qHead == NULL) {
qHead = p;
p->next = NULL;
p->prev = NULL;
qTail = p;
} else {
p->prev = qTail;
qTail = p;
p->prev->next = p;
p->next = NULL;
}
}
void hapus(){
queue *p = qHead;
if(qHead != NULL) {
printf(" Mahasiswa %s sudah dihapus...", qHead->mhs.nama);
qHead = p->next;
qHead->prev = NULL;
free(p);
}
}
void printQueue(char tipe[]){
printf(" Data Mahasiswa\n");
printf("===============================================\n");
printf(" Kode Nama Angkatan Jurusan Email\n");
printf("-----------------------------------------------\n");
if(strcmp(tipe,"front")==0){
queue *p = qHead;
while (p != NULL) {
printf(" %s %-10s %-11s %-9s %s \n",
p->mhs.kode, p->mhs.nama, p->mhs.angkatan, p->mhs.jurusan, p->mhs.email);
p = p->next;
}
}
printf("===============================================\n");
}
|
dc540de43cf2955b24e6fd6bdf19007870169229
|
cbc55b359bb7fae22824a7ebc3734e0c756da0d5
|
/dependencies/PyMesh/src/IO/IOUtils.cpp
|
7e033cad6000204a74c96e368a506f94df34f39e
|
[
"MIT"
] |
permissive
|
aprieels/3D-watermarking-spectral-decomposition
|
6a022f87b25b5d056561ad7159dab1300530b0bf
|
dcab78857d0bb201563014e58900917545ed4673
|
refs/heads/master
| 2020-03-09T06:45:03.420116
| 2018-06-03T15:54:35
| 2018-06-03T15:54:35
| 128,647,275
| 7
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 971
|
cpp
|
IOUtils.cpp
|
/* This file is part of PyMesh. Copyright (c) 2015 by Qingnan Zhou */
#include "IOUtils.h"
#include <cstring>
#include <Core/Exception.h>
using namespace PyMesh;
std::string IOUtils::get_extention(const std::string& filename) {
size_t pos = filename.find_last_of('.');
return filename.substr(pos);
}
std::string IOUtils::get_name(const std::string& filename) {
size_t pos = filename.find_last_of('.');
return filename.substr(0, pos);
}
bool IOUtils::is_prefix(const char* prefix, const char* str) {
return strncmp(prefix, str, strlen(prefix)) == 0;
}
std::string IOUtils::next_line(std::ifstream& fin) {
constexpr size_t LINE_SIZE = 256;
char line[LINE_SIZE];
do {
if (fin.eof()) {
throw IOError("Error: EOF reached while parsing.");
}
fin.getline(line, LINE_SIZE);
} while(strlen(line) == 0 || line[0] == '#' ||
line[0] == '\n' || line[0] == '\r');
return std::string(line);
}
|
a7efea2c725cadbbb1af03958025409bfdcff21d
|
ffdc77394c5b5532b243cf3c33bd584cbdc65cb7
|
/tests/ut/cpp/device/ge_runtime_test.cc
|
b7585999903681c3e192cdf1987fef513145c2d1
|
[
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-free-unknown",
"AGPL-3.0-only",
"Libpng",
"MPL-1.1",
"IJG",
"GPL-2.0-only",
"BSL-1.0",
"Zlib",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-python-cwi",
"BSD-2-Clause",
"LicenseRef-scancode-gary-s-brown",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"Python-2.0",
"LicenseRef-scancode-mit-nagy",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] |
permissive
|
mindspore-ai/mindspore
|
ca7d5bb51a3451c2705ff2e583a740589d80393b
|
54acb15d435533c815ee1bd9f6dc0b56b4d4cf83
|
refs/heads/master
| 2023-07-29T09:17:11.051569
| 2023-07-17T13:14:15
| 2023-07-17T13:14:15
| 239,714,835
| 4,178
| 768
|
Apache-2.0
| 2023-07-26T22:31:11
| 2020-02-11T08:43:48
|
C++
|
UTF-8
|
C++
| false
| false
| 31,237
|
cc
|
ge_runtime_test.cc
|
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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 <memory>
#include "common/common_test.h"
#include "mock/runtime/event.h"
#define private public
#include "plugin/device/ascend/hal/device/ge_runtime/model_runner.h"
#include "plugin/device/ascend/hal/device/ge_runtime/runtime_model.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/task_factory.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/event_record_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/event_wait_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/hccl_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/label_goto_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/label_manager.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/label_set_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/label_switch_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/memcpy_async_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/profiler_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/stream_active_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/stream_switch_task.h"
#include "plugin/device/ascend/hal/device/ge_runtime/task/tbe_task.h"
#undef private
#include "common/opskernel/ops_kernel_info_store.h"
using namespace mindspore::ge::model_runner;
using namespace testing;
class MockOpsKernelInfoStore : public ge::OpsKernelInfoStore {
public:
ge::Status Initialize(const map<string, string> &) override { return ge::SUCCESS; }
ge::Status Finalize() override { return ge::SUCCESS; }
void GetAllOpsKernelInfo(std::map<string, ge::OpInfo> &infos) const override {}
bool CheckSupported(const ge::OpDescPtr &opDescPtr, std::string &un_supported_reason) const override { return true; }
bool CheckSupported(const ge::NodePtr &node, std::string &un_supported_reason) const { return true; }
bool CheckAccuracySupported(const ge::OpDescPtr &opDescPtr, std::string &un_supported_reason,
const bool realQuery = false) const override {
return true;
}
bool CheckAccuracySupported(const ge::NodePtr &node, std::string &un_supported_reason,
const bool realQuery = false) const {
return true;
}
ge::Status LoadTask(ge::GETaskInfo &task) override { return ge::SUCCESS; }
};
namespace mindspore {
class TestAscendGeRuntime : public UT::Common {
public:
TestAscendGeRuntime() {}
private:
void TearDown() override {
{
std::lock_guard<std::mutex> lock(HcclTask::model_stream_mapping_mutex_);
HcclTask::model_stream_mapping_.clear();
}
}
};
TEST_F(TestAscendGeRuntime, test_task_create_null_task_info_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
ASSERT_TRUE(TaskFactory::GetInstance().Create(model_context, nullptr) == nullptr);
}
TEST_F(TestAscendGeRuntime, test_aicpu_task_create_one_stream_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> aicpu_task_info = std::make_shared<AicpuTaskInfo>(
"op_name", 0, "so_name", "kernel_name", "node_def", "", std::vector<void *>{reinterpret_cast<void *>(1)},
std::vector<void *>{reinterpret_cast<void *>(1)}, true);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, aicpu_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<AicpuTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_aicpu_task_create_multi_stream_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> aicpu_task_info = std::make_shared<AicpuTaskInfo>(
"op_name", 0, "so_name", "kernel_name", "node_def", "", std::vector<void *>{reinterpret_cast<void *>(1)},
std::vector<void *>{reinterpret_cast<void *>(1)}, true);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, aicpu_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<AicpuTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_aicpu_task_create_invalid_stream_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> aicpu_task_info = std::make_shared<AicpuTaskInfo>(
"op_name", 5, "so_name", "kernel_name", "node_def", "", std::vector<void *>{reinterpret_cast<void *>(1)},
std::vector<void *>{reinterpret_cast<void *>(1)}, true);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, aicpu_task_info));
}
TEST_F(TestAscendGeRuntime, test_event_record_task_create_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> event_record_task_info = std::make_shared<EventRecordTaskInfo>("op_name", 0, 0);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, event_record_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<EventRecordTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_event_record_task_create_invalid_event_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> event_record_task_info = std::make_shared<EventRecordTaskInfo>("op_name", 0, 10);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, event_record_task_info));
}
TEST_F(TestAscendGeRuntime, test_event_wait_task_create_success) {
START_MOCK(rtEventReset);
EXPECT_CALL(MOCK_OBJECT(rtEventReset), rtEventReset(_, _)).WillOnce(Return(RT_ERROR_NONE));
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> event_record_task_info = std::make_shared<EventWaitTaskInfo>("op_name", 0, 0);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, event_record_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<EventWaitTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_event_wait_task_create_invalid_event_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> event_record_task_info = std::make_shared<EventWaitTaskInfo>("op_name", 0, 10);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, event_record_task_info));
}
TEST_F(TestAscendGeRuntime, test_hccl_task_create_success) {
MockOpsKernelInfoStore ops_kernel_info_store;
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> hccl_task_info = std::make_shared<HcclTaskInfo>(
"op_name", 0, "hccl_type", reinterpret_cast<void *>(1), reinterpret_cast<void *>(2), reinterpret_cast<void *>(3), 4,
5, std::vector<uint8_t>(6, 7), reinterpret_cast<void *>(&ops_kernel_info_store), 9, 10, 11, 12, "group", true);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, hccl_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<HcclTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_hccl_task_create_stream_reuse_success) {
const rtModel_t model = reinterpret_cast<rtModel_t>(0x12345678);
const rtStream_t stream = reinterpret_cast<rtStream_t>(0x87654321);
constexpr uint32_t stream_id = 0;
constexpr int64_t task1_stream_num = 3;
constexpr int64_t task2_stream_num = 5;
constexpr int64_t task3_stream_num = 4;
MockOpsKernelInfoStore ops_kernel_info_store;
ModelContext model_context(0, 0, 0, model, reinterpret_cast<rtStream_t>(2), {stream},
{reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> hccl_task_info_1 = std::make_shared<HcclTaskInfo>(
"op_name", stream_id, "hccl_type", reinterpret_cast<void *>(1), reinterpret_cast<void *>(2),
reinterpret_cast<void *>(3), 4, task1_stream_num, std::vector<uint8_t>(6, 7),
reinterpret_cast<void *>(&ops_kernel_info_store), 9, 10, 11, 12, "group", true);
std::shared_ptr<TaskInfo> hccl_task_info_2 = std::make_shared<HcclTaskInfo>(
"op_name", stream_id, "hccl_type", reinterpret_cast<void *>(1), reinterpret_cast<void *>(2),
reinterpret_cast<void *>(3), 4, task2_stream_num, std::vector<uint8_t>(6, 7),
reinterpret_cast<void *>(&ops_kernel_info_store), 9, 10, 11, 12, "group", true);
std::shared_ptr<TaskInfo> hccl_task_info_3 = std::make_shared<HcclTaskInfo>(
"op_name", stream_id, "hccl_type", reinterpret_cast<void *>(1), reinterpret_cast<void *>(2),
reinterpret_cast<void *>(3), 4, task3_stream_num, std::vector<uint8_t>(6, 7),
reinterpret_cast<void *>(&ops_kernel_info_store), 9, 10, 11, 12, "group", true);
std::shared_ptr<Task> task_1 = TaskFactory::GetInstance().Create(model_context, hccl_task_info_1);
std::shared_ptr<Task> task_2 = TaskFactory::GetInstance().Create(model_context, hccl_task_info_2);
std::shared_ptr<Task> task_3 = TaskFactory::GetInstance().Create(model_context, hccl_task_info_3);
ASSERT_TRUE(std::dynamic_pointer_cast<HcclTask>(task_1) != nullptr);
ASSERT_TRUE(std::dynamic_pointer_cast<HcclTask>(task_2) != nullptr);
ASSERT_TRUE(std::dynamic_pointer_cast<HcclTask>(task_3) != nullptr);
ASSERT_NO_THROW(task_1->Distribute());
ASSERT_NO_THROW(task_2->Distribute());
ASSERT_NO_THROW(task_3->Distribute());
{
std::lock_guard<std::mutex> lock(HcclTask::model_stream_mapping_mutex_);
auto model_iter = HcclTask::model_stream_mapping_.find(model);
ASSERT_NE(model_iter, HcclTask::model_stream_mapping_.end());
auto stream_iter = model_iter->second.find(stream_id);
ASSERT_NE(stream_iter, model_iter->second.end());
const auto &stream_vec = stream_iter->second;
ASSERT_EQ(stream_vec.size(), std::max(task1_stream_num, std::max(task2_stream_num, task3_stream_num)));
for (const auto &s : stream_vec) {
auto shared = s.lock();
ASSERT_TRUE(shared != nullptr);
}
}
}
TEST_F(TestAscendGeRuntime, test_label_goto_task_create_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_goto_task_info = std::make_shared<LabelGotoTaskInfo>("op_name", 0, 0);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, label_goto_task_info);
auto label_goto_task = std::dynamic_pointer_cast<LabelGotoTask>(task);
ASSERT_TRUE(label_goto_task != nullptr);
ASSERT_NO_THROW(task->Distribute());
label_goto_task->index_value_ = new uint8_t[5];
}
TEST_F(TestAscendGeRuntime, test_label_goto_task_create_invalid_label_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_goto_task_info = std::make_shared<LabelGotoTaskInfo>("op_name", 0, 1);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, label_goto_task_info));
}
TEST_F(TestAscendGeRuntime, test_label_goto_task_reuse_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_goto_task_info = std::make_shared<LabelGotoTaskInfo>("op_name", 0, 0);
std::shared_ptr<Task> task1 = TaskFactory::GetInstance().Create(model_context, label_goto_task_info);
std::shared_ptr<Task> task2 = TaskFactory::GetInstance().Create(model_context, label_goto_task_info);
auto label_goto_task_1 = std::dynamic_pointer_cast<LabelGotoTask>(task1);
auto label_goto_task_2 = std::dynamic_pointer_cast<LabelGotoTask>(task2);
ASSERT_TRUE(label_goto_task_1 != nullptr);
ASSERT_NO_THROW(task1->Distribute());
ASSERT_TRUE(label_goto_task_2 != nullptr);
ASSERT_NO_THROW(task2->Distribute());
ASSERT_EQ(label_goto_task_1->label_info_, label_goto_task_2->label_info_);
}
TEST_F(TestAscendGeRuntime, test_label_set_task_create_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_set_task_info = std::make_shared<LabelSetTaskInfo>("op_name", 0, 0);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, label_set_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<LabelSetTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_label_set_task_create_invalid_label_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1)}, {reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_set_task_info = std::make_shared<LabelGotoTaskInfo>("op_name", 0, 1);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, label_set_task_info));
}
TEST_F(TestAscendGeRuntime, test_label_switch_task_create_success) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_switch_task_info =
std::make_shared<LabelSwitchTaskInfo>("op_name", 0, 2, std::vector<uint32_t>{0, 1}, reinterpret_cast<void *>(1));
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, label_switch_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<LabelSwitchTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_label_switch_task_create_invalid_stream_id_failed) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_switch_task_info =
std::make_shared<LabelSwitchTaskInfo>("op_name", 1, 2, std::vector<uint32_t>{0, 1}, reinterpret_cast<void *>(1));
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, label_switch_task_info));
}
TEST_F(TestAscendGeRuntime, test_label_switch_task_create_invalid_label_id_failed) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_switch_task_info =
std::make_shared<LabelSwitchTaskInfo>("op_name", 0, 3, std::vector<uint32_t>{0, 1, 2}, reinterpret_cast<void *>(1));
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, label_switch_task_info));
}
TEST_F(TestAscendGeRuntime, test_label_switch_task_reuse_success) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> label_switch_task_info =
std::make_shared<LabelSwitchTaskInfo>("op_name", 0, 2, std::vector<uint32_t>{0, 1}, reinterpret_cast<void *>(1));
std::shared_ptr<Task> task1 = TaskFactory::GetInstance().Create(model_context, label_switch_task_info);
std::shared_ptr<Task> task2 = TaskFactory::GetInstance().Create(model_context, label_switch_task_info);
auto label_switch_task_1 = std::dynamic_pointer_cast<LabelSwitchTask>(task1);
auto label_switch_task_2 = std::dynamic_pointer_cast<LabelSwitchTask>(task2);
ASSERT_TRUE(label_switch_task_1 != nullptr);
ASSERT_TRUE(label_switch_task_2 != nullptr);
ASSERT_NO_THROW(task1->Distribute());
ASSERT_NO_THROW(task2->Distribute());
ASSERT_EQ(label_switch_task_1->label_info_, label_switch_task_2->label_info_);
}
TEST_F(TestAscendGeRuntime, test_memcpy_async_task_create_success) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> memcpy_task_info = std::make_shared<MemcpyAsyncTaskInfo>(
"op_name", 0, reinterpret_cast<void *>(1), 2, reinterpret_cast<void *>(3), 4, 5, true);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, memcpy_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<MemcpyAsyncTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_memcpy_async_task_create_invalid_stream_id_failed) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> memcpy_task_info = std::make_shared<MemcpyAsyncTaskInfo>(
"op_name", 1, reinterpret_cast<void *>(1), 2, reinterpret_cast<void *>(3), 4, 5, true);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, memcpy_task_info));
}
TEST_F(TestAscendGeRuntime, test_profiler_task_create_success) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> profiler_task_info = std::make_shared<ProfilerTraceTaskInfo>("op_name", 0, 1, true, 2);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, profiler_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<ProfilerTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_profiler_task_create_invalid_stream_id_failed) {
ModelContext model_context(
0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2), {reinterpret_cast<rtStream_t>(1)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)}, {reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> profiler_task_info = std::make_shared<ProfilerTraceTaskInfo>("op_name", 1, 1, true, 2);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, profiler_task_info));
}
TEST_F(TestAscendGeRuntime, test_stream_active_task_create_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> stream_active_task_info = std::make_shared<StreamActiveTaskInfo>("op_name", 0, 1);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, stream_active_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<StreamActiveTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_stream_active_task_create_invalid_active_stream_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> stream_active_task_info = std::make_shared<StreamActiveTaskInfo>("op_name", 0, 2);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, stream_active_task_info));
}
TEST_F(TestAscendGeRuntime, test_stream_switch_task_create_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> stream_switch_task_info = std::make_shared<StreamSwitchTaskInfo>(
"op_name", 0, 1, reinterpret_cast<void *>(2), reinterpret_cast<void *>(3), 4, 5);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, stream_switch_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<StreamSwitchTask>(task) != nullptr);
ASSERT_NO_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_stream_switch_task_create_invalid_true_stream_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> stream_switch_task_info = std::make_shared<StreamSwitchTaskInfo>(
"op_name", 0, 2, reinterpret_cast<void *>(2), reinterpret_cast<void *>(3), 4, 5);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, stream_switch_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<StreamSwitchTask>(task) != nullptr);
ASSERT_ANY_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_stream_switch_task_create_invalid_stream_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> stream_switch_task_info = std::make_shared<StreamSwitchTaskInfo>(
"op_name", 2, 1, reinterpret_cast<void *>(2), reinterpret_cast<void *>(3), 4, 5);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, stream_switch_task_info));
}
TEST_F(TestAscendGeRuntime, test_tbe_task_create_success) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> tbe_task_info = std::make_shared<TbeTaskInfo>(
"op_name", 0, "stub_func", 1, std::vector<uint8_t>(100, 2), 100, std::vector<uint8_t>{5, 6},
reinterpret_cast<void *>(7), 8, std::vector<uint8_t>{9, 10},
std::vector<void *>{reinterpret_cast<void *>(11), reinterpret_cast<void *>(12)},
std::vector<void *>{reinterpret_cast<void *>(13), reinterpret_cast<void *>(14)},
std::vector<void *>{reinterpret_cast<void *>(15), reinterpret_cast<void *>(16)}, true);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, tbe_task_info);
auto tbe_task = std::dynamic_pointer_cast<TbeTask>(task);
ASSERT_TRUE(tbe_task != nullptr);
ASSERT_NO_THROW(task->Distribute());
tbe_task->args_ = new uint8_t[5];
}
TEST_F(TestAscendGeRuntime, test_tbe_task_create_invalid_stream_id_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> tbe_task_info = std::make_shared<TbeTaskInfo>(
"op_name", 3, "stub_func", 1, std::vector<uint8_t>(100, 2), 100, std::vector<uint8_t>{5, 6},
reinterpret_cast<void *>(7), 8, std::vector<uint8_t>{9, 10},
std::vector<void *>{reinterpret_cast<void *>(11), reinterpret_cast<void *>(12)},
std::vector<void *>{reinterpret_cast<void *>(13), reinterpret_cast<void *>(14)},
std::vector<void *>{reinterpret_cast<void *>(15), reinterpret_cast<void *>(16)}, true);
ASSERT_ANY_THROW(TaskFactory::GetInstance().Create(model_context, tbe_task_info));
}
TEST_F(TestAscendGeRuntime, test_tbe_task_create_empty_stub_func_failed) {
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> tbe_task_info = std::make_shared<TbeTaskInfo>(
"op_name", 0, "", 1, std::vector<uint8_t>(100, 2), 100, std::vector<uint8_t>{5, 6}, reinterpret_cast<void *>(7), 8,
std::vector<uint8_t>{9, 10}, std::vector<void *>{reinterpret_cast<void *>(11), reinterpret_cast<void *>(12)},
std::vector<void *>{reinterpret_cast<void *>(13), reinterpret_cast<void *>(14)},
std::vector<void *>{reinterpret_cast<void *>(15), reinterpret_cast<void *>(16)}, true);
std::shared_ptr<Task> task = TaskFactory::GetInstance().Create(model_context, tbe_task_info);
ASSERT_TRUE(std::dynamic_pointer_cast<TbeTask>(task) != nullptr);
ASSERT_ANY_THROW(task->Distribute());
}
TEST_F(TestAscendGeRuntime, test_model_runner_success) {
constexpr uint32_t model_id = 0;
ModelContext model_context(0, 0, 0, reinterpret_cast<rtModel_t>(1), reinterpret_cast<rtStream_t>(2),
{reinterpret_cast<rtStream_t>(1), reinterpret_cast<rtStream_t>(2)},
{reinterpret_cast<rtLabel_t>(1), reinterpret_cast<rtLabel_t>(1)},
{reinterpret_cast<rtEvent_t>(1)});
std::shared_ptr<TaskInfo> tbe_task_info = std::make_shared<TbeTaskInfo>(
"tbe", 0, "stub_func", 1, std::vector<uint8_t>(100, 2), 100, std::vector<uint8_t>{5, 6},
reinterpret_cast<void *>(7), 8, std::vector<uint8_t>{9, 10},
std::vector<void *>{reinterpret_cast<void *>(11), reinterpret_cast<void *>(12)},
std::vector<void *>{reinterpret_cast<void *>(13), reinterpret_cast<void *>(14)},
std::vector<void *>{reinterpret_cast<void *>(15), reinterpret_cast<void *>(16)}, true);
std::shared_ptr<TaskInfo> aicpu_task_info = std::make_shared<AicpuTaskInfo>(
"aicpu", 0, "so_name", "kernel_name", "node_def", "", std::vector<void *>{reinterpret_cast<void *>(1)},
std::vector<void *>{reinterpret_cast<void *>(1)}, true);
auto davice_model = std::make_shared<DavinciModel>(
std::vector<std::shared_ptr<TaskInfo>>{tbe_task_info, aicpu_task_info}, std::vector<uint32_t>{},
std::vector<uint32_t>{}, nullptr, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0);
ASSERT_NO_THROW(ModelRunner::Instance().LoadDavinciModel(0, 0, model_id, davice_model));
auto iter = ModelRunner::Instance().runtime_models_.find(model_id);
ASSERT_TRUE(iter != ModelRunner::Instance().runtime_models_.end());
auto &task_list = iter->second->task_list_;
task_list.clear();
ASSERT_NO_THROW(task_list.emplace_back(TaskFactory::GetInstance().Create(model_context, tbe_task_info)));
ASSERT_NO_THROW(task_list.emplace_back(TaskFactory::GetInstance().Create(model_context, aicpu_task_info)));
ASSERT_NO_THROW(ModelRunner::Instance().DistributeTask(model_id));
ASSERT_NO_THROW(ModelRunner::Instance().LoadModelComplete(model_id));
ASSERT_NO_THROW(ModelRunner::Instance().RunModel(model_id));
ASSERT_FALSE(ModelRunner::Instance().GetTaskIdList(model_id).empty());
ASSERT_FALSE(ModelRunner::Instance().GetStreamIdList(model_id).empty());
ASSERT_FALSE(ModelRunner::Instance().GetRuntimeInfoMap(model_id).empty());
ASSERT_NO_THROW(ModelRunner::Instance().GetModelHandle(model_id));
ASSERT_NO_THROW(ModelRunner::Instance().UnloadModel(model_id));
}
} // namespace mindspore
|
e001c21a3e20391e1ed1a8da42c3f457c7dbd2b3
|
01c8dcaf54aa78fc7a8c8292a25bf3d31620f6f3
|
/examples/stepper_oneStepAtATime/stepper_oneStepAtATime.ino
|
ef5ab359ee6c49d4bf7cdd55540c2b9de8de7503
|
[] |
no_license
|
lilyrothschild8/MyStepper
|
9c8c797b9f8f6a9870ac6b82c825b8268425b7cb
|
8c9a708bbdae7e7d2f6323284361547e1502cf44
|
refs/heads/master
| 2023-03-19T22:20:06.686765
| 2018-10-15T11:55:30
| 2018-10-15T11:55:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 939
|
ino
|
stepper_oneStepAtATime.ino
|
//**************************************************************************//
//*************************** Created by ***********************************//
//*********************** Author : Jay Dalwadi *****************************//
//******** Github Link: https://github.com/jaydalwadi01/MyStepper **********//
//************************** Example Code **********************************//
//**************************************************************************//
#include <MyStepper.h>
// change this to fit the number of steps per revolution
// for your motor
int StepsPerRevolution = 200;
// Stepper motor drive pins
int PULSE_PIN = 13;
int DIR_PIN = 12;
int EN_PIN = 11;
// initialize the stepper library on pins 11 through 13:
MyStepper stepper(StepsPerRevolution, PULSE_PIN, DIR_PIN, EN_PIN);
void setup()
{
stepper.SetSpeed(100); // Set Spped of Motor in RPM.
}
void loop()
{
stepper.Steps(1); // Step by step
}
|
8136ec70bd0db76a48a03273d987882d3b70bcd5
|
a56c029277a2f81c6660ea9f6159e7f1a874132e
|
/src/DittoPlotUtil.cxx
|
2bcc89b69f48c51c84bdfbaf6b0652f87620fd21
|
[] |
no_license
|
sgnoohc/Ditto
|
8eea7ce9f95bbf4a12c7f03f3913f2ea05083c82
|
41d54af22b7c18ed446eb060d018abf2390e3034
|
refs/heads/master
| 2021-01-20T03:35:09.950653
| 2017-06-20T19:42:36
| 2017-06-20T19:42:36
| 89,559,936
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,534
|
cxx
|
DittoPlotUtil.cxx
|
// vim: tabstop=2:softtabstop=2:shiftwidth=2:expandtab
// .
// ..: P. Chang, philip@physics.ucsd.edu
namespace PlotUtil
{
bool plot1D(string name, float xval, double weight, Hist_DB &allhistos, string title, int numbinsx, float xmin, float xmax, string prefix)
{
/// Plot 1D histogram. If a histogram doesn't exist book first and fill.
/// if the histogram exists, return true
// If no title given, set title to name
if (title == "") title = name;
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
// Find whether a histogram with the name already exists
map<string, TH1*>::iterator iter= allhistos.find(name);
// If the histogram is not found, make a new one
if(iter == allhistos.end())
{
TH1D* currentHisto= new TH1D(name.c_str(), title.c_str(), numbinsx, xmin, xmax);
currentHisto->GetXaxis()->SetTitle(title.c_str());
currentHisto->Sumw2();
currentHisto->SetDirectory(0);
currentHisto->Fill(xval, weight);
allhistos.insert(pair<string, TH1D*> (name,currentHisto) );
return false;
}
// exists already, so just fill it
else
{
(*iter).second->Fill(xval, weight);
return true;
}
}
bool plot1D(string name, float xval, double weight, std::map<string, TH1*> &allhistos, string title, int numbinsx, const float * xbins, string prefix)
{
/// Plot 1D histogram. If a histogram doesn't exist book first and fill. (with variable binning)
// If no title given, set title to name
if (title=="") title=name;
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
// Find whether a histogram with the name already exists
std::map<string, TH1*>::iterator iter= allhistos.find(name);
// If the histogram is not found, make a new one.
if(iter == allhistos.end())
{
TH1D* currentHisto= new TH1D(name.c_str(), title.c_str(), numbinsx, xbins);
currentHisto->GetXaxis()->SetTitle(title.c_str());
currentHisto->Sumw2();
currentHisto->SetDirectory(0);
currentHisto->Fill(xval, weight);
allhistos.insert(std::pair<string, TH1D*> (name,currentHisto) );
return false;
}
else // exists already, so just fill it
{
(*iter).second->Fill(xval, weight);
return true;
}
}
void plot1D(string name, float xval, double weight, Hist_DB &allhistos, string prefix)
{
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
/// Plot 1D histogram. If a histogram doesn't exist throw an error
allhistos[name]->Fill(xval, weight);
return;
}
bool plot2D(string name, float xval, float yval, double weight, Hist_DB &allhistos, string title, int numbinsx, float xmin, float xmax, int numbinsy, float ymin, float ymax, string prefix)
{
/// Plot 1D histogram. If a histogram doesn't exist book first and fill.
/// if the histogram exists, return true
// If no title given, set title to name
if (title == "") title = name;
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
// Find whether a histogram with the name already exists
map<string, TH1*>::iterator iter= allhistos.find(name);
// If the histogram is not found, make a new one
if(iter == allhistos.end())
{
TH2D* currentHisto= new TH2D(name.c_str(), title.c_str(), numbinsx, xmin, xmax, numbinsy, ymin, ymax);
currentHisto->Sumw2();
currentHisto->SetDirectory(0);
currentHisto->Fill(xval, yval, weight);
allhistos.insert(pair<string, TH1*> (name,currentHisto) );
return false;
}
// exists already, so just fill it
else
{
((TH2D*) (*iter).second)->Fill(xval, yval, weight);
return true;
}
}
bool plot2D(string name, float xval, float yval, double weight, std::map<string, TH1*> &allhistos, string title, int numbinsx, const float * xbins, int numbinsy, const float* ybins, string prefix)
{
/// Plot 1D histogram. If a histogram doesn't exist book first and fill. (with variable binning)
// If no title given, set title to name
if (title=="") title=name;
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
// Find whether a histogram with the name already exists
std::map<string, TH1*>::iterator iter= allhistos.find(name);
// If the histogram is not found, make a new one.
if(iter == allhistos.end())
{
TH2D* currentHisto= new TH2D(name.c_str(), title.c_str(), numbinsx, xbins, numbinsy, ybins);
currentHisto->Sumw2();
currentHisto->SetDirectory(0);
currentHisto->Fill(xval, yval, weight);
allhistos.insert(std::pair<string, TH1*> (name,currentHisto) );
return false;
}
else // exists already, so just fill it
{
((TH2D*) (*iter).second)->Fill(xval, yval, weight);
return true;
}
}
void plot2D(string name, float xval, float yval, double weight, Hist_DB &allhistos, string prefix)
{
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
// Plot 1D histogram. If a histogram doesn't exist throw an error
((TH2D*) allhistos[name])->Fill(xval, yval, weight);
return;
}
void savePlots(Hist_DB &h_1d, const char* outfilename)
{
/// Save histograms to a ROOT file
// if size is 0 don't save
if (h_1d.size() == 0)
{
printf("[Ditto::PlotUtil::savePlots] histogram size is 0 skip saving ...\n");
return;
}
// Create a TFile
TFile outfile(outfilename,"RECREATE") ;
// Print the info that I am saving to the file
printf("[Ditto::PlotUtil::savePlots] Saving histograms to %s\n", outfilename);
// Loop over the histograms
Hist_DB::iterator it1d;
for (it1d = h_1d.begin(); it1d!=h_1d.end(); it1d++)
{
// save the histograms
it1d->second->Write();
delete it1d->second;
}
// Write to file and close
outfile.Write();
outfile.Close();
return;
}
void savePlots2D(Hist_DB &h_1d, const char* outfilename)
{
/// Save TH2 histograms to a ROOT file
// Create a TFile
TFile outfile(outfilename,"RECREATE") ;
// Print the info that I am saving to the file
printf("[Ditto::PlotUtil::savePlots] Saving histograms to %s\n", outfilename);
// Loop over the histograms
Hist_DB::iterator it1d;
for (it1d = h_1d.begin(); it1d!=h_1d.end(); it1d++)
{
// save the histograms
it1d->second->Write();
delete it1d->second;
}
// Write to file and close
outfile.Write();
outfile.Close();
return;
}
TH1* get(string name, Hist_DB &h_1d, string prefix)
{
// If prefix exists add prefix
if (prefix != "") name = TString::Format("%s_%s", prefix.c_str(), name.c_str()).Data();
// Find whether a histogram with the name already exists
std::map<string, TH1*>::iterator iter= h_1d.find(name);
// If the histogram is not found, make a new one.
if(iter == h_1d.end())
{
PrintUtil::warning(TString::Format("PlotUtil::get() Asked for %s but did not find a histogram with that name", name.c_str()).Data());
}
else
{
return (*iter).second;
}
return 0;
}
}
|
8707c35dae5f19e4441d86af49e3abf8168a9b98
|
a2d84e576b4ec7e8de9642b167c259cfae5c1e94
|
/src/endian_cpp.h
|
6dc0fd79351ceffdc83b891b744761a97e089749
|
[] |
no_license
|
httbb/bifang
|
8c8ac0cbd66f1e4b54554521bb7d77cfcc2bd4ef
|
91622ac6e55870c9dc829f4e4bcdd6120744693c
|
refs/heads/main
| 2023-03-24T00:54:45.458523
| 2021-03-12T02:47:24
| 2021-03-12T02:47:24
| 347,431,844
| 3
| 0
| null | 2021-03-13T17:16:16
| 2021-03-13T17:16:15
| null |
UTF-8
|
C++
| false
| false
| 1,877
|
h
|
endian_cpp.h
|
/**
* brief: 大小端转换文件
*/
#ifndef __BIFANG_ENDIAN_CPP_H
#define __BIFANG_ENDIAN_CPP_H
// BYTE_ORDER BIG_ENDIAN LITTLE_ENDIAN
#include <type_traits>
#include <stdint.h>
namespace bifang
{
#define BSWAP_8(x) ((x) & 0xff)
#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8))
#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16))
#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32))
// 8字节类型的字节序转化
template<typename T>
typename std::enable_if<sizeof(T) == sizeof(uint64_t), T>::type
byteswap(T value)
{
return (T)BSWAP_64((uint64_t)value);
}
// 4字节类型的字节序转化
template<typename T>
typename std::enable_if<sizeof(T) == sizeof(uint32_t), T>::type
byteswap(T value)
{
return (T)BSWAP_32((uint32_t)value);
}
// 2字节类型的字节序转化
template<typename T>
typename std::enable_if<sizeof(T) == sizeof(uint16_t), T>::type
byteswap(T value)
{
return (T)BSWAP_16((uint16_t)value);
}
// 1字节类型的字节序转化
template<typename T>
typename std::enable_if<sizeof(T) == sizeof(uint8_t), T>::type
byteswap(T value)
{
return (T)BSWAP_8((uint8_t)value);
}
#if BYTE_ORDER == BIG_ENDIAN
// 只在小端机器上执行byteswap, 在大端机器上什么都不做
template<class T>
T littleByteSwap(T t)
{
return t;
}
// 只在大端机器上执行byteswap, 在小端机器上什么都不做
template<class T>
T bigByteSwap(T t)
{
return byteswap(t);
}
#else
// 只在小端机器上执行byteswap, 在大端机器上什么都不做
template<class T>
T littleByteSwap(T t)
{
return byteswap(t);
}
// 只在大端机器上执行byteswap, 在小端机器上什么都不做
template<class T>
T bigByteSwap(T t)
{
return t;
}
#endif
}
#endif /*__BIFANG_ENDIAN_CPP_H*/
|
1be29f699b65f9119a119d5796ede2227aa76214
|
c3bbdbbbc5f47577e332a280f81bd905617423c9
|
/Source/AllProjects/DataUtils/CIDMData/CIDMData_ThisFacility.hpp
|
020bb1e61a1b0e146e28e5b45946abda7116d56d
|
[
"MIT"
] |
permissive
|
DeanRoddey/CIDLib
|
65850f56cb60b16a63bbe7d6d67e4fddd3ecce57
|
82014e064eef51cad998bf2c694ed9c1c8cceac6
|
refs/heads/develop
| 2023-03-11T03:08:59.207530
| 2021-11-06T16:40:44
| 2021-11-06T16:40:44
| 174,652,391
| 227
| 33
|
MIT
| 2020-09-16T11:33:26
| 2019-03-09T05:26:26
|
C++
|
UTF-8
|
C++
| false
| false
| 2,993
|
hpp
|
CIDMData_ThisFacility.hpp
|
//
// FILE NAME: CIDMData_ThisFacility.hpp
//
// AUTHOR: Dean Roddey
//
// CREATED: 11/03/2015
//
// COPYRIGHT: Charmed Quark Systems, Ltd @ 2019
//
// This software is copyrighted by 'Charmed Quark Systems, Ltd' and
// the author (Dean Roddey.) It is licensed under the MIT Open Source
// license:
//
// https://opensource.org/licenses/MIT
//
// DESCRIPTION:
//
// This is the header for the CIDMData_ThisFacility.cpp file. This file
// provides the facility class for this facility.
//
// CAVEATS/GOTCHAS:
//
// LOG:
//
// $_CIDLib_Log_$
//
#pragma once
#pragma CIDLIB_PACK(CIDLIBPACK)
// ---------------------------------------------------------------------------
// CLASS: TFacCIDMData
// PREFIX: fac
//
// This is the facility class for this facility.
// ---------------------------------------------------------------------------
class CIDMDATAEXP TFacCIDMData : public TFacility
{
public :
// -------------------------------------------------------------------
// Constructors and Destructor.
// -------------------------------------------------------------------
TFacCIDMData();
TFacCIDMData(const TFacCIDMData&) = delete;
TFacCIDMData(TFacCIDMData&&) = delete;
~TFacCIDMData();
// -------------------------------------------------------------------
// Public operators
// -------------------------------------------------------------------
TFacCIDMData& operator=(const TFacCIDMData&) = delete;
TFacCIDMData& operator=(TFacCIDMData&&) = delete;
// -------------------------------------------------------------------
// Public, non-virtual methods
// -------------------------------------------------------------------
tCIDLib::TVoid RemoveAttr
(
tCIDMData::TAttrList& colList
, const TString& strId
);
const TString& strBoolAttr
(
const tCIDLib::TBoolean bValue
) const;
tCIDLib::TVoid SetAttrEditType
(
tCIDMData::TAttrList& colList
, const TString& strId
, const tCIDMData::EAttrEdTypes eToSet
) const;
tCIDLib::TVoid SetAttrLimits
(
tCIDMData::TAttrList& colList
, const TString& strId
, const TString& strToSet
) const;
tCIDLib::TVoid SetAttrName
(
tCIDMData::TAttrList& colList
, const TString& strId
, const TString& strToSet
) const;
private :
// -------------------------------------------------------------------
// Do any needed magic macros
// -------------------------------------------------------------------
RTTIDefs(TFacCIDMData,TFacility)
};
#pragma CIDLIB_POPPACK
|
b79aa4e245e38c19d37cf7e7bb08397701bc79ad
|
b17f543b55a1f341f55f514fd3c861aa751fff11
|
/_Penguin.h
|
827b7b72c23af10ecbf945b0579bfa7d4e423d47
|
[] |
no_license
|
TheDizzyEgg/Santa-saves-the-dolphins
|
965dc5eae5093877c1ef4e20549ffca4f20f1755
|
7151ac6e49366e9c8346c8323dda5b4609908759
|
refs/heads/main
| 2023-02-07T03:08:45.116741
| 2021-01-04T14:50:38
| 2021-01-04T14:50:38
| 326,714,566
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,687
|
h
|
_Penguin.h
|
#ifndef _PENGUIN_H
#define _PENGUIN_H
#include "_Decls.h"
#define PENG_MAX_IDLE_FRAMES 3
#define PENG_MAX_RUNNING_FRAMES 4
class _Penguin
{
public:
_Penguin(float _x, float _y, float _endX, float _endY, int _moveClock, int _type);
virtual ~_Penguin();
enum States
{
stateIdle = 1,
stateRunning = 2,
};
enum CaughtStates
{
caughtStateSeen = 1,
caughtStateFootstep = 2,
};
float x;
float y;
float startX;
float startY;
float endX;
float endY;
float speedInc;
int idleTimer;
int idleFrame;
int runningTimer;
int runningFrame;
int animState;
int flipFlag;
int moveTimer;
int moveClock;
int moveState;
char stringLightX[32];
char stringLightY[32];
char stringLightPower[32];
char stringLightDiffuse[32];
char stringLightAlive[32];
void render(_Map *mapActive);
void update();
};
class _PenguinSystem
{
public:
_PenguinSystem();
virtual ~_PenguinSystem();
float caughtX, caughtY;
int caughtType;
ALLEGRO_BITMAP *imgIdle[PENG_MAX_IDLE_FRAMES];
ALLEGRO_BITMAP *imgRunning[PENG_MAX_RUNNING_FRAMES];
std::vector<_Penguin*> penguin;
void createPenguins(_Map *mapActive);
void renderPenguins(_Map *mapActive);
void updatePenguins();
bool checkFootsteps(_Santa *santaActive);
void resetPenguins();
};
#endif // _PENGUIN_H
|
d74bc2dfbb807e7238d31f6b2f2d7d753307f274
|
9a70726d94a8cc2cf98b9752bdf7ea96334fca6a
|
/student_download/vs/book_apps/ch09c_bonus_calculator/bonus_calculator/main.cpp
|
e13f02df12cfac75a603f6f1480dd97b7876df6e
|
[] |
no_license
|
isaiah-baker/murachcppStartFiles
|
84f5fa45970cb42e714cb09b7c2a5ede43fde3f8
|
e270e8a26be15d4ae4a18381828678b44ed2b261
|
refs/heads/master
| 2020-04-28T01:29:44.163882
| 2019-03-10T17:51:40
| 2019-03-10T17:51:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,199
|
cpp
|
main.cpp
|
#include <iostream>
using namespace std;
enum class Department { marketing = 1, it, sales, other };
// function prototypes
void show_menu();
Department get_department();
bool check_criteria(Department);
int main() {
cout << "The Monthly Bonus Calculator\n\n";
show_menu();
const double bonus_amt = 1000;
Department dept = get_department();
bool bonus = check_criteria(dept);
if (bonus) {
cout << "Congrats! You earned the $" << bonus_amt
<< " monthly bonus.\n\n";
}
else {
cout << "Sorry! No bonus for you this month :( Keep trying!\n\n";
}
return 0;
}
// function definitions
void show_menu() {
cout << "DEPARTMENTS\n"
<< static_cast<int>(Department::marketing) << " - Marketing\n"
<< static_cast<int>(Department::it) << " - IT\n"
<< static_cast<int>(Department::sales) << " - Sales\n"
<< static_cast<int>(Department::other) << " - Other\n\n";
}
Department get_department() {
cout << "Enter department number: ";
int choice = 0;
cin >> choice;
Department dept = static_cast<Department>(choice);
if (dept < Department::marketing || dept > Department::other) {
return Department::other;
}
else {
return dept;
}
}
bool check_criteria(Department dept) {
switch (dept) {
case Department::marketing:
int viral_campaigns;
cout << "How many of your campaigns went viral this month?: ";
cin >> viral_campaigns;
return viral_campaigns >= 4;
case Department::it:
int trouble_tickets;
cout << "How many trouble tickets did you close this month?: ";
cin >> trouble_tickets;
return trouble_tickets >= 10;
case Department::sales:
double sales;
cout << "What were your total sales this month?: ";
cin >> sales;
return sales >= 1000;
case Department::other:
char supervisor_grade;
cout << "What was your grade from your supervisor this month?: ";
cin >> supervisor_grade;
return tolower(supervisor_grade) == 'a';
}
}
|
8e8320421192151acb9088c5370bd6ccca7127e2
|
9a32178d3c2fdf377d84f65b55989264e67f40e9
|
/2002/ALL VC SAMPLES/ATLServer/PerfMon/PerformanceCounter/PerformanceCounterIsapi/PerfObjectManager.h
|
bfe0cc45a494a2cb8b30114d0579b7d2a7035087
|
[] |
no_license
|
philipwolfe/Samples
|
5e5cc1376575ac6361b62a3554c98626f153b694
|
7eb703287a6d07596a141c4557f271efe6c1666f
|
refs/heads/master
| 2021-12-25T12:52:52.616313
| 2021-12-19T04:26:29
| 2021-12-19T04:26:29
| 250,445,305
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,157
|
h
|
PerfObjectManager.h
|
// PerfObjectManager.h: interface for the PerfObjectManager class.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Classes Reference and related electronic
// documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft C++ Libraries products.
#pragma once
class CSamplePerformanceObject :
public CPerfObject
{
public:
DECLARE_PERF_OBJECT(CSamplePerformanceObject, 1, _T("PerformanceCounterSample"), _T("PerformanceObjectHelpStr"), -1);
BEGIN_COUNTER_MAP(CSamplePerformanceObject)
DEFINE_COUNTER(rateCount, _T("rate"), _T("rate at which counter is increased"), PERF_COUNTER_COUNTER, 1)
DEFINE_COUNTER(rawCount, _T("raw"), _T("raw counter value"), PERF_COUNTER_RAWCOUNT, 0)
END_COUNTER_MAP()
ULONG rateCount;
ULONG rawCount;
};
class CSamplePerformanceObjectManager :
public CPerfMon
{
public:
#define Perf_PerfObjMgr _T("Perf_PerformanceCounter")
BEGIN_PERF_MAP(Perf_PerfObjMgr)
CHAIN_PERF_OBJECT(CSamplePerformanceObject)
END_PERF_MAP()
};
PERFREG_ENTRY(CSamplePerformanceObjectManager);
|
0c314e6ec55b2f2a8942fae08a2650251b1efd31
|
bcf138c82fcba9acc7d7ce4d3a92618b06ebe7c7
|
/rdr2/0x58CB53DB63F84DEA.cpp
|
f4d61abdde23009de8589ca14e85604d72d7849a
|
[] |
no_license
|
DeepWolf413/additional-native-data
|
aded47e042f0feb30057e753910e0884c44121a0
|
e015b2500b52065252ffbe3c53865fe3cdd3e06c
|
refs/heads/main
| 2023-07-10T00:19:54.416083
| 2021-08-12T16:00:12
| 2021-08-12T16:00:12
| 395,340,507
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 301
|
cpp
|
0x58CB53DB63F84DEA.cpp
|
// abigail2_1.ysc @ L69535
int func_1954()
{
int iVar0;
int iVar1;
int iVar2;
iVar0 = 0;
while (iVar0 < 9)
{
iVar2 = func_2271(iVar0);
if (STATS::CHAL_GET_NUM_RANKS_COMPLETED(iVar2) >= STATS::CHAL_GET_MAX_RANKS(iVar2))
{
iVar1++;
}
iVar0++;
}
return iVar1;
}
|
f9d29efb317f635482362f503ceae4b5b897919d
|
a8ccdf4e5b2d4b7314fd98e4962bc7381104e89b
|
/generated/images/src/sw2_2-5.cpp
|
666d7aa39d69adcbca2a41a7b81f7468d91929bf
|
[] |
no_license
|
misstek/SmartHomePanel
|
d6e9948ec97655cff072bffcb13fc9b11b7bdd93
|
72a6498e9850533206a229407217dea05e641c12
|
refs/heads/master
| 2021-05-01T19:17:09.823698
| 2018-02-10T14:18:40
| 2018-02-10T14:18:40
| 121,018,424
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 36,859
|
cpp
|
sw2_2-5.cpp
|
// -alpha_dither yes -dither 2 -non_opaque_image_format ARGB8888 -opaque_image_format RGB565 0xc6cb7f13
// Generated by imageconverter. Please, do not edit!
#include <touchgfx/hal/Config.hpp>
LOCATION_EXTFLASH_PRAGMA
KEEP extern const unsigned char _sw2_2_5[] LOCATION_EXTFLASH_ATTRIBUTE = { // 70x26 ARGB8888 pixels.
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0xe4,0xe8,0x24,0xe8,0xe4,0xe8,0x61,0xe8,0xe4,0xe0,0x92,0xe8,0xe4,0xe0,0xb2,0xe0,0xe4,0xe0,0xc3,0xe8,0xe4,0xe0,0xc3,0xe8,0xe4,0xe0,0xbe,0xe0,0xe4,0xe0,0xc3,
0xe0,0xe4,0xe0,0xc3,0xe8,0xe4,0xe0,0xc3,0xe0,0xe0,0xe0,0xbe,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xbe,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xbe,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xbe,0xe0,0xe0,0xe0,0xc3,
0xe0,0xe0,0xe0,0xc3,0xe8,0xe4,0xe0,0xc3,0xe0,0xe4,0xe0,0xbe,0xe0,0xe4,0xe0,0xc3,0xe0,0xe4,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xe4,0xe0,0xc3,0xe8,0xe4,0xe0,0xbe,0xe0,0xe0,0xe0,0xc3,0xe0,0xe0,0xe0,0xc3,0xe0,0xdc,0xe0,0xc3,0xe0,0xdc,0xd8,0xbe,0xe0,0xdc,0xd8,0xc3,0xe0,0xdc,0xe0,0xc3,0xe0,0xdc,0xd8,0xc3,
0xe0,0xdc,0xd8,0xbe,0xe0,0xdc,0xe0,0xc3,0xe0,0xdc,0xd8,0xc3,0xe0,0xdc,0xd8,0xc3,0xe0,0xdc,0xe0,0xbe,0xe0,0xdc,0xd8,0xc3,0xe0,0xdc,0xd8,0xc3,0xe0,0xdc,0xe0,0xc3,0xe0,0xdc,0xd8,0xbe,0xe0,0xdc,0xd8,0xc3,0xe0,0xdc,0xe0,0xb2,0xe0,0xdc,0xd8,0x92,0xe0,0xdc,0xd8,0x65,0xe0,0xdc,0xe0,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0xe8,0xe8,0x41,0xe8,0xe8,0xe8,0xb2,0xe8,0xe4,0xe8,0xf7,0xe8,0xe8,0xe8,0xff,
0xe8,0xe8,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,
0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xd8,0xff,
0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,
0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xfb,0xe0,0xdc,0xd8,0xb6,0xe0,0xdc,0xe0,0x49,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xe8,0xe8,0xe8,0x0c,0xe8,0xe8,0xe8,0x9a,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,
0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe8,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,
0xe8,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,
0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xa2,0xe0,0xdc,0xd8,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0xec,0xe8,0x1c,0xe8,0xe8,0xe8,0xc7,0xf0,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xf4,0xe8,0xff,0xe8,0xe8,0xe0,0xff,0xd8,0xdc,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,
0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd4,0xd8,0xff,0xd8,0xd4,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd4,0xd8,0xff,0xd8,0xd4,0xd8,0xff,0xd8,0xd4,0xd0,0xff,0xd8,0xd4,0xd8,0xff,0xd0,0xd4,0xd0,0xff,
0xd0,0xd4,0xd0,0xff,0xd8,0xd4,0xd0,0xff,0xd0,0xd4,0xd0,0xff,0xd0,0xd0,0xd0,0xff,0xd0,0xd0,0xd0,0xff,0xd0,0xd4,0xd0,0xff,0xd0,0xd0,0xd0,0xff,0xd0,0xd0,0xd0,0xff,0xd0,0xd0,0xd0,0xff,0xd0,0xd0,0xd0,0xff,0xc8,0xc8,0xd0,0xff,0xc8,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,
0xc0,0xc4,0xc0,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc0,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc0,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc0,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xc0,0xc4,0xc8,0xff,0xd0,0xd0,0xd0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,
0xe0,0xdc,0xe0,0xff,0xd8,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xd3,0xd8,0xdc,0xd8,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xec,0xe8,0x14,0xf0,0xec,0xe8,0xd3,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf8,0xf4,0xe8,0xff,
0xd0,0xd0,0xd8,0xff,0x78,0x7c,0xa8,0xff,0x40,0x3c,0x88,0xff,0x28,0x28,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x28,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x78,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,
0x28,0x24,0x78,0xff,0x28,0x24,0x80,0xff,0x20,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x28,0x24,0x80,0xff,0x20,0x18,0x78,0xff,0x28,0x24,0x78,0xff,
0x50,0x54,0x88,0xff,0x90,0x90,0xb0,0xff,0xa8,0xac,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xa8,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xa8,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xa8,0xb0,0xc0,0xff,
0xb0,0xb0,0xc0,0xff,0xb0,0xb0,0xc0,0xff,0xa0,0xa4,0xb8,0xff,0x88,0x88,0xa8,0xff,0x88,0x88,0xa0,0xff,0xb8,0xb8,0xc0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xe0,0xe0,0xdb,0xe0,0xdc,0xd8,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xf0,0xec,0xf0,0xaa,0xe8,0xec,0xf0,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xec,0xe8,0xff,0x90,0x90,0xc0,0xff,0x28,0x24,0x98,0xff,0x10,0x0c,0x90,0xff,0x10,0x10,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x98,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x18,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,
0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x18,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x18,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,
0x18,0x14,0x90,0xff,0x18,0x14,0x90,0xff,0x18,0x14,0x98,0xff,0x10,0x0c,0x88,0xff,0x50,0x54,0x98,0xff,0xc8,0xc8,0xd8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xe0,0xe4,0xf0,0xff,0x98,0x9c,0xb8,0xff,0x88,0x8c,0xa8,0xff,0xd0,0xd4,0xd0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xdc,0xd8,0xff,
0xe0,0xdc,0xe0,0xff,0xd8,0xdc,0xd8,0xb6,0xe0,0xdc,0xe0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0,0x51,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xe8,0xf0,0xe8,0xff,0x70,0x6c,0xb8,0xff,0x10,0x10,0xa0,0xff,0x18,0x18,0xa0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,
0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,
0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x18,0x14,0x98,0xff,0x88,0x90,0xc0,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xd8,0xd8,0xe8,0xff,0x80,0x84,0xa8,0xff,0xd0,0xd0,0xd0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0x61,0x00,0x00,0x00,0x00,
0xf0,0xf0,0xf0,0x04,0xf0,0xf0,0xf0,0xcf,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf8,0xf8,0xe8,0xff,0x88,0x84,0xc0,0xff,
0x10,0x10,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,
0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xa8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x18,0x14,0xa0,0xff,0x80,0x84,0xb8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xf8,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xd8,0xdc,0xe8,0xff,0x88,0x8c,0xb0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xd7,0xe0,0xdc,0xd8,0x08,
0xf0,0xf0,0xf0,0x41,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf8,0xf8,0xf0,0xff,0xc8,0xc8,0xd8,0xff,0x20,0x20,0xb0,0xff,0x20,0x18,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xb8,0xff,0x20,0x1c,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x20,0x20,0xb0,0xff,0x20,0x20,0xb0,0xff,0x20,0x18,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x18,0xb0,0xff,
0x18,0x18,0xb0,0xff,0x18,0x14,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x20,0x20,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x14,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x18,0x18,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x14,0xb0,0xff,0x18,0x18,0xb0,0xff,0x20,0x20,0xb0,0xff,0x20,0x1c,0xb0,0xff,
0x20,0x1c,0xb0,0xff,0x20,0x1c,0xb0,0xff,0x18,0x18,0xa8,0xff,0x48,0x50,0xa0,0xff,0xf0,0xf0,0xf0,0xff,0xf8,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,
0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xb0,0xb8,0xd8,0xff,0xa8,0xa8,0xb8,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0x49,
0xf0,0xf4,0xf0,0x86,0xf0,0xf0,0xf0,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xf8,0xf0,0xff,0x70,0x74,0xc8,0xff,0x18,0x10,0xb8,0xff,0x20,0x20,0xb8,0xff,0x20,0x20,0xb8,0xff,0x20,0x20,0xb8,0xff,0x28,0x20,0xb8,0xff,
0x20,0x20,0xb8,0xff,0x20,0x1c,0xb8,0xff,0x20,0x18,0xb8,0xff,0x30,0x2c,0xc0,0xff,0xa0,0xa4,0xe0,0xff,0xe0,0xdc,0xf8,0xff,0xd0,0xd4,0xf0,0xff,0x78,0x7c,0xd8,0xff,0x18,0x14,0xb8,0xff,0x28,0x28,0xc0,0xff,0xb0,0xb0,0xe8,0xff,0xc8,0xc4,0xe8,0xff,0xc8,0xcc,0xf0,0xff,0xd0,0xcc,0xf0,0xff,0x40,0x3c,0xc0,0xff,0x88,0x88,0xd8,0xff,
0xc0,0xc0,0xe8,0xff,0xd0,0xcc,0xf0,0xff,0xd0,0xcc,0xf0,0xff,0x68,0x6c,0xd0,0xff,0x18,0x14,0xb8,0xff,0x20,0x20,0xb8,0xff,0x20,0x20,0xb8,0xff,0x20,0x1c,0xb8,0xff,0x18,0x1c,0xa0,0xff,0xa8,0xa8,0xc8,0xff,0xf8,0xfc,0xf0,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,
0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0x88,0x90,0xb8,0xff,0xd8,0xdc,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0x96,
0xf8,0xf4,0xf8,0xc3,0xf8,0xf4,0xf0,0xff,0xf8,0xf4,0xf8,0xff,0xe8,0xe8,0xe8,0xff,
0x40,0x3c,0xc0,0xff,0x20,0x18,0xc0,0xff,0x20,0x1c,0xc0,0xff,0x28,0x20,0xc0,0xff,0x28,0x1c,0xc0,0xff,0x20,0x1c,0xc0,0xff,0x28,0x20,0xc0,0xff,0x20,0x1c,0xc0,0xff,0x28,0x20,0xc0,0xff,0xd0,0xcc,0xf0,0xff,0xf8,0xf8,0xf8,0xff,0x88,0x88,0xe0,0xff,0xb0,0xb0,0xe8,0xff,0xf8,0xfc,0xf8,0xff,0x80,0x7c,0xd8,0xff,0x20,0x20,0xc0,0xff,
0xf8,0xf8,0xf8,0xff,0xd8,0xdc,0xf8,0xff,0x98,0x98,0xe0,0xff,0xa0,0x9c,0xe8,0xff,0x30,0x30,0xc8,0xff,0xc0,0xc4,0xf0,0xff,0xf8,0xfc,0xf8,0xff,0xa0,0x9c,0xe8,0xff,0x98,0x9c,0xe0,0xff,0x58,0x58,0xd0,0xff,0x20,0x14,0xc0,0xff,0x28,0x1c,0xc0,0xff,0x20,0x20,0xc0,0xff,0x20,0x20,0xb8,0xff,0x38,0x3c,0xa0,0xff,0xd8,0xdc,0xe0,0xff,
0xf0,0xec,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,
0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xa8,0xa8,0xd0,0xff,0xc0,0xc0,0xc8,0xff,0xe0,0xe4,0xe0,0xff,
0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xcb,
0xf8,0xf4,0xf8,0xe3,0xf0,0xf4,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xc8,0xc8,0xe0,0xff,0x20,0x24,0xc0,0xff,0x20,0x1c,0xc8,0xff,0x20,0x20,0xc8,0xff,0x20,0x20,0xc8,0xff,0x20,0x20,0xc8,0xff,0x20,0x20,0xc8,0xff,0x28,0x20,0xc8,0xff,0x18,0x14,0xc8,0xff,0x60,0x60,0xd8,0xff,0xf8,0xfc,0xf8,0xff,
0x78,0x78,0xe0,0xff,0x08,0x04,0xc0,0xff,0x18,0x14,0xc8,0xff,0xd8,0xd8,0xf0,0xff,0xe8,0xe4,0xf8,0xff,0x30,0x30,0xc8,0xff,0xf0,0xf4,0xf8,0xff,0xa0,0xa0,0xe8,0xff,0x10,0x10,0xc0,0xff,0x18,0x1c,0xc8,0xff,0x18,0x14,0xc8,0xff,0xc8,0xc8,0xf0,0xff,0xe0,0xe0,0xf8,0xff,0x20,0x1c,0xc8,0xff,0x18,0x1c,0xc8,0xff,0x20,0x1c,0xc8,0xff,
0x20,0x20,0xc8,0xff,0x20,0x20,0xc8,0xff,0x28,0x20,0xc8,0xff,0x18,0x20,0xb0,0xff,0x58,0x60,0xb0,0xff,0xf0,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,
0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf8,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb8,0xbc,0xd8,0xff,0xa8,0xa8,0xc0,0xff,0xe8,0xe8,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xdf,
0xf8,0xf4,0xf8,0xef,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xc0,0xc0,0xe0,0xff,0x20,0x1c,0xd0,0xff,0x20,0x1c,0xd0,0xff,0x28,0x20,0xd0,0xff,0x20,0x20,0xd0,0xff,
0x28,0x20,0xd0,0xff,0x20,0x20,0xd0,0xff,0x20,0x20,0xd0,0xff,0x18,0x10,0xd0,0xff,0x88,0x88,0xe8,0xff,0xf8,0xfc,0xf8,0xff,0x50,0x4c,0xd8,0xff,0x18,0x18,0xd0,0xff,0x18,0x10,0xd0,0xff,0xa0,0xa4,0xe8,0xff,0xf8,0xfc,0xf8,0xff,0x48,0x44,0xd8,0xff,0xe8,0xe4,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf0,0xf4,0xf8,0xff,0xe8,0xec,0xf8,0xff,
0x30,0x2c,0xd0,0xff,0xb8,0xb8,0xf0,0xff,0xf8,0xfc,0xf8,0xff,0xf0,0xf8,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0x60,0x60,0xe0,0xff,0x18,0x14,0xd0,0xff,0x20,0x20,0xd0,0xff,0x28,0x20,0xc8,0xff,0x18,0x20,0xb0,0xff,0x68,0x6c,0xb0,0xff,0xf0,0xec,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe0,0xff,0xe8,0xe4,0xe8,0xff,
0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf8,0xff,
0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xc0,0xc4,0xe0,0xff,0xa0,0x9c,0xc0,0xff,0xe8,0xe8,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xe7,
0xf8,0xf8,0xf8,0xe7,0xf8,0xf8,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xc8,0xc4,0xe0,0xff,0x20,0x20,0xd8,0xff,0x20,0x1c,0xd8,0xff,0x20,0x20,0xd8,0xff,0x28,0x1c,0xd8,0xff,0x20,0x1c,0xd8,0xff,0x28,0x20,0xd8,0xff,0x20,0x20,0xd8,0xff,0x18,0x10,0xd8,0xff,0x78,0x78,0xe8,0xff,0xf8,0xfc,0xf8,0xff,0x60,0x5c,0xe0,0xff,0x10,0x0c,0xd8,0xff,0x10,0x10,0xd8,0xff,0xc0,0xc0,0xf0,0xff,
0xf0,0xf0,0xf8,0xff,0x38,0x38,0xe0,0xff,0xf0,0xf0,0xf8,0xff,0xc0,0xc0,0xf8,0xff,0x60,0x60,0xe8,0xff,0x68,0x64,0xe8,0xff,0x20,0x1c,0xd8,0xff,0xc0,0xc4,0xf0,0xff,0xe8,0xe8,0xf8,0xff,0x70,0x68,0xe8,0xff,0x68,0x68,0xe8,0xff,0x38,0x34,0xd8,0xff,0x20,0x1c,0xd8,0xff,0x28,0x1c,0xd8,0xff,0x28,0x20,0xd0,0xff,0x20,0x20,0xb0,0xff,
0x60,0x64,0xb8,0xff,0xe8,0xe8,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,
0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb8,0xbc,0xe0,0xff,
0xa0,0xa4,0xc0,0xff,0xe8,0xec,0xe0,0xff,0xe8,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xe3,
0xf8,0xf8,0xf8,0xcf,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xe0,0xe4,0xe8,0xff,0x30,0x30,0xd8,0xff,0x20,0x18,0xe0,0xff,0x20,0x20,0xe0,0xff,0x20,0x20,0xe0,0xff,0x28,0x20,0xe0,0xff,0x20,0x20,0xe0,0xff,0x20,0x1c,0xe0,0xff,0x20,0x18,0xe0,0xff,
0x38,0x38,0xe0,0xff,0xf8,0xf8,0xf8,0xff,0xd0,0xd0,0xf8,0xff,0x40,0x3c,0xe0,0xff,0x70,0x70,0xe8,0xff,0xf8,0xfc,0xf8,0xff,0xa0,0xa0,0xf0,0xff,0x20,0x20,0xe0,0xff,0xf8,0xfc,0xf8,0xff,0xa0,0xa0,0xf0,0xff,0x08,0x08,0xd8,0xff,0x18,0x14,0xe0,0xff,0x18,0x14,0xe0,0xff,0xc8,0xc8,0xf8,0xff,0xe0,0xe0,0xf8,0xff,0x18,0x14,0xe0,0xff,
0x18,0x14,0xe0,0xff,0x20,0x1c,0xe0,0xff,0x20,0x20,0xe0,0xff,0x20,0x1c,0xe0,0xff,0x20,0x24,0xd8,0xff,0x20,0x28,0xc0,0xff,0x40,0x48,0xb0,0xff,0xd8,0xdc,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,
0xe8,0xe4,0xe0,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,
0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xfc,0xf8,0xff,0xa8,0xac,0xd0,0xff,0xb8,0xbc,0xc8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xd3,
0xf8,0xf8,0xf8,0x9a,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf0,0xff,0x60,0x60,0xe0,0xff,0x18,0x14,0xe8,0xff,
0x28,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xe8,0xff,0x18,0x14,0xe8,0xff,0x60,0x64,0xf0,0xff,0xe8,0xe8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb8,0xb8,0xf8,0xff,0x28,0x24,0xe8,0xff,0x28,0x28,0xe8,0xff,0xe8,0xec,0xf8,0xff,0xa0,0x9c,0xf8,0xff,
0x18,0x14,0xe8,0xff,0x20,0x20,0xe8,0xff,0x18,0x18,0xe8,0xff,0xc0,0xc0,0xf8,0xff,0xd8,0xd8,0xf8,0xff,0x20,0x20,0xe8,0xff,0x20,0x1c,0xe8,0xff,0x28,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xe0,0xff,0x28,0x2c,0xc8,0xff,0x20,0x2c,0xb0,0xff,0xb0,0xb4,0xd0,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xdc,0xd8,0xff,
0xe0,0xdc,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,
0xe8,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf8,0xff,0x90,0x98,0xc8,0xff,0xd8,0xdc,0xd8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xaa,
0xf8,0xf8,0xf8,0x55,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb8,0xb8,0xe8,0xff,0x18,0x18,0xe8,0xff,0x20,0x1c,0xf0,0xff,0x28,0x20,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x20,0xf0,0xff,0x28,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x18,0x14,0xe8,0xff,0x28,0x28,0xf0,0xff,0x48,0x44,0xf0,0xff,
0x38,0x38,0xf0,0xff,0x20,0x18,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x28,0x20,0xf0,0xff,0x38,0x34,0xf0,0xff,0x30,0x2c,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x30,0x30,0xf0,0xff,0x38,0x30,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x28,0x20,0xf0,0xff,
0x28,0x20,0xe8,0xff,0x28,0x28,0xd0,0xff,0x20,0x28,0xb8,0xff,0x60,0x6c,0xc0,0xff,0xe8,0xe8,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,
0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf8,0xf8,0xf0,0xff,
0xc0,0xc4,0xe0,0xff,0xa0,0xa4,0xc0,0xff,0xf0,0xec,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe4,0xe8,0x61,
0xf8,0xf8,0xf8,0x10,0xf8,0xfc,0xf8,0xe7,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf0,0xff,0x68,0x64,0xe0,0xff,0x18,0x10,0xf0,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x28,0x1c,0xe8,0xff,
0x20,0x20,0xf0,0xff,0x28,0x20,0xe8,0xff,0x28,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x18,0xf0,0xff,0x20,0x18,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xe8,0xff,0x28,0x20,0xf0,0xff,0x20,0x1c,0xe8,0xff,
0x20,0x1c,0xf0,0xff,0x20,0x20,0xf0,0xff,0x28,0x20,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xf0,0xff,0x28,0x28,0xe0,0xff,0x28,0x2c,0xc0,0xff,0x20,0x2c,0xb0,0xff,0xa0,0xa4,0xd0,0xff,0xf0,0xec,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,
0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe8,0xff,0xe8,0xe8,0xe8,0xff,
0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xf0,0xf0,0xe8,0xff,0xe8,0xe4,0xe8,0xff,0x88,0x8c,0xc0,0xff,0xe0,0xdc,0xe0,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xeb,0xe8,0xec,0xe8,0x14,
0x00,0x00,0x00,0x00,0xf8,0xf8,0xf8,0x79,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xe0,0xe4,0xe8,0xff,0x48,0x48,0xe8,0xff,0x18,0x10,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x28,0x1c,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,
0x20,0x20,0xf0,0xff,0x28,0x20,0xf0,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x20,0xe8,0xff,0x28,0x20,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xe8,0xff,0x20,0x20,0xf0,0xff,0x28,0x24,0xe8,0xff,0x28,0x28,0xd0,0xff,0x28,0x28,0xc0,0xff,
0x30,0x38,0xb0,0xff,0xb0,0xb4,0xd0,0xff,0xe8,0xec,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xd8,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xdc,0xe0,0xff,0xe0,0xe0,0xe0,0xff,
0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xe0,0xe0,0xe8,0xff,0x88,0x90,0xc0,0xff,0xc8,0xc8,0xd0,0xff,0xf0,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xff,
0xf0,0xec,0xe8,0x8a,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xf8,0xf4,0xf0,0x0c,0xf8,0xf8,0xf8,0xd7,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xe0,0xe4,0xe8,0xff,0x58,0x58,0xe0,0xff,0x18,0x14,0xf0,0xff,0x18,0x14,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x20,0xf0,0xff,
0x20,0x1c,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x1c,0xf0,0xff,0x28,0x1c,0xf0,0xff,0x28,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x20,0x1c,0xe8,0xff,0x20,0x1c,0xf0,0xff,0x28,0x1c,0xf0,0xff,
0x20,0x1c,0xf0,0xff,0x20,0x1c,0xf0,0xff,0x28,0x1c,0xf0,0xff,0x20,0x20,0xe8,0xff,0x20,0x24,0xe0,0xff,0x28,0x2c,0xd0,0xff,0x20,0x28,0xc0,0xff,0x28,0x34,0xb0,0xff,0x90,0x94,0xc8,0xff,0xe0,0xdc,0xd8,0xff,0xe8,0xe8,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,
0xe0,0xe4,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe0,0xe0,0xff,0xe0,0xe4,0xd8,0xff,0xe0,0xe4,0xe0,0xff,0xe0,0xe0,0xd8,0xff,0xe0,0xe0,0xe0,0xff,0xe8,0xe0,0xe0,0xff,0xe0,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xe4,0xe0,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xb8,0xc0,0xd8,0xff,
0x78,0x84,0xb8,0xff,0xc0,0xc4,0xd0,0xff,0xf0,0xf0,0xf0,0xff,0xe8,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xff,0xe8,0xe8,0xe8,0xe3,0xf0,0xf0,0xf0,0x14,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf4,0xf0,0x3c,0xf8,0xf8,0xf8,0xf7,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf0,0xff,
0xb0,0xac,0xe0,0xff,0x58,0x54,0xe0,0xff,0x28,0x24,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x18,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,
0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x20,0x18,0xe8,0xff,0x18,0x18,0xf0,0xff,0x20,0x18,0xe8,0xff,0x20,0x20,0xe0,0xff,0x20,0x24,0xd0,0xff,0x20,0x24,0xc0,0xff,0x18,0x20,0xb0,0xff,0x38,0x44,0xb8,0xff,
0x78,0x80,0xc0,0xff,0xa0,0xa8,0xc8,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,
0xb8,0xbc,0xd0,0xff,0xb8,0xbc,0xd0,0xff,0xb0,0xb4,0xd0,0xff,0x98,0x9c,0xc8,0xff,0x80,0x84,0xb0,0xff,0x90,0x94,0xb8,0xff,0xe0,0xdc,0xe0,0xff,0xf8,0xf0,0xf0,0xff,0xe8,0xec,0xe8,0xff,0xf0,0xec,0xe8,0xff,0xe8,0xe8,0xe8,0xfb,0xf0,0xf0,0xf0,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xf0,0xf4,0xf0,0x51,0xf8,0xf8,0xf8,0xf3,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf0,0xff,0xd8,0xd8,0xe8,0xff,0xc0,0xbc,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb8,0xe8,0xff,0xb8,0xb4,0xe8,0xff,
0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb8,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb0,0xb4,0xe8,0xff,0xb0,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb8,0xb4,0xe8,0xff,0xb0,0xb4,0xe8,0xff,
0xb8,0xb4,0xe0,0xff,0xb8,0xb4,0xe0,0xff,0xa8,0xb0,0xd8,0xff,0xa0,0xa4,0xc8,0xff,0x98,0x9c,0xc0,0xff,0x90,0x90,0xb8,0xff,0x88,0x88,0xb0,0xff,0x88,0x88,0xa8,0xff,0x88,0x8c,0xb0,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xb0,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,
0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x88,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x88,0x8c,0xa8,0xff,0x98,0x9c,0xb0,0xff,0xd0,0xcc,0xd0,0xff,0xf0,0xf0,0xe8,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xec,0xe8,0xff,0xf0,0xec,0xf0,0xff,0xf0,0xec,0xe8,0xf7,
0xf0,0xec,0xf0,0x5d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf4,0xf0,0x3c,0xf8,0xf8,0xf8,0xd7,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf0,0xff,0xf0,0xf0,0xe8,0xff,0xe8,0xe4,0xe0,0xff,0xe0,0xe0,0xd8,0xff,0xd8,0xdc,0xd8,0xff,0xe0,0xdc,0xd8,0xff,0xe0,0xd8,0xd8,0xff,
0xe0,0xd8,0xd8,0xff,0xd8,0xdc,0xd8,0xff,0xe0,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xd8,0xd8,0xd0,0xff,0xd8,0xd4,0xd8,0xff,0xd8,0xd8,0xd8,0xff,0xe8,0xe4,0xe0,0xff,0xf0,0xf0,0xf0,0xff,
0xf0,0xf4,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xe8,0xec,0xe8,0xdf,0xf0,0xf0,0xf0,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0,0x10,
0xf8,0xf4,0xf8,0x8a,0xf8,0xf8,0xf8,0xeb,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,
0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,
0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf8,0xf8,0xff,0xf0,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xf4,0xf0,0xff,0xf8,0xf4,0xf8,0xff,0xf8,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,
0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf4,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xff,0xf0,0xf0,0xf0,0xef,0xf0,0xf0,0xf0,0x92,0xf0,0xf0,0xf0,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xf0,0xf0,0x14,0xf8,0xf4,0xf0,0x6d,0xf8,0xf8,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,
0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,
0xf8,0xfc,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,0xf8,0xfc,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,0xf8,0xf8,0xf8,0x9e,
0xf8,0xf4,0xf8,0x9e,0xf8,0xf4,0xf8,0x9e,0xf0,0xf4,0xf8,0x9e,0xf8,0xf4,0xf8,0x9e,0xf8,0xf4,0xf0,0x9e,0xf8,0xf4,0xf0,0x9e,0xf8,0xf4,0xf8,0x9e,0xf8,0xf4,0xf0,0x9e,0xf8,0xf4,0xf0,0x9e,0xf8,0xf4,0xf8,0x9e,0xf0,0xf0,0xf0,0x9e,0xf0,0xf0,0xf0,0x9e,0xf0,0xf0,0xf0,0x9e,0xf0,0xf0,0xf0,0x9e,0xf0,0xf0,0xe8,0x71,0xf0,0xec,0xf0,0x14,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
|
1e07d8f544b2e8a6ad62e4dbe7504e8e733f14ed
|
bd36e6a9b7fff372d1c883fea28fde479e04c531
|
/Source/Oscillator.cpp
|
9abc8c06693fd6338124660151f80fa98e1f82ae
|
[] |
no_license
|
CharlesThaCat/JuceSynth
|
0be791826118bc628ddc43d3a42c21c6937c5aa3
|
c19d89caa4dd27be99d3b48a96e002a188b709b9
|
refs/heads/master
| 2022-12-11T20:12:43.369900
| 2020-09-15T01:12:21
| 2020-09-15T01:12:21
| 293,124,301
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,573
|
cpp
|
Oscillator.cpp
|
/*
==============================================================================
Oscillator.cpp
Created: 3 Sep 2020 11:12:49am
Author: bhxxl
==============================================================================
*/
#include <JuceHeader.h>
#include "Oscillator.h"
//==============================================================================
Oscillator::Oscillator(SynthFrameworkAudioProcessor& p) : audioProcessor(p)
{
// In your constructor, you should add any child components, and
// initialise any special settings that your component needs.
setSize(200, 200); // set the size of oscillator window
oscMenu.addItem("Sine", 1);
oscMenu.addItem("Saw", 2);
oscMenu.addItem("Square", 3);
oscMenu.setJustificationType(juce::Justification::centred);
addAndMakeVisible(oscMenu);
oscSelection = new juce::AudioProcessorValueTreeState::ComboBoxAttachment(audioProcessor.tree, "wavetype", oscMenu);
}
Oscillator::~Oscillator()
{
}
void Oscillator::paint (juce::Graphics& g)
{
juce::Rectangle<int> titleArea(0, 10, getWidth(), 20);
g.setColour(juce::Colours::white);
g.drawText("Oscillator 1", titleArea, juce::Justification::centredTop);
}
void Oscillator::resized()
{
// This method is where you should set the bounds of any child
// components that your component contains..
// Code in this function all related to the (200, 200) oscillator window
juce::Rectangle<int> area = getLocalBounds().reduced(40);
oscMenu.setBounds(area.removeFromTop(20));
}
|
8a204f5937610e96253869b97199af286b683d7e
|
278d7d5f54265612bed9b0257e951a10cd920779
|
/filling_diamonds.cpp
|
664d1a966930436473dfee95ddc0c3e0b8f3e01b
|
[] |
no_license
|
zhiz-m/Competitive-Programming
|
dcabe9262ae5899708910392ebd730b2fd7ba1a4
|
f99ba4390b2f0f092c204c96ad18f86cb79f1bd1
|
refs/heads/master
| 2023-04-23T23:38:17.458594
| 2021-05-08T06:33:34
| 2021-05-08T06:33:34
| 365,436,077
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 564
|
cpp
|
filling_diamonds.cpp
|
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define fi first
#define se second
#define SZ(x) (int)(x).size()
#define rep(i,a,b) for (int i=a;i<b;i++)
#define per(i,a,b) for (int i=b-1;i>=a;i--)
#define DEBUG(x) cerr<<'<'<<#x<<": "<<x<<'\n'
#define nl '\n'
typedef vector<int> VI;
typedef pair<int,int> PII;
typedef long long ll;
void upgrade(){ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);}
int main(){
upgrade();
int t;cin>>t;
while(t--){
int n;cin>>n;cout<<n<<nl;
}
}
|
745204b5403fbce4340f587fdb839eaa00d0f699
|
7c8a9d06a324511b583ed8441c3879dd1ad33bb4
|
/engine/math/NXMath.h
|
a6793ad97d39aa17ad2f02c3e2205499b967acfa
|
[] |
no_license
|
15831944/NXEngine
|
57f03471da704272cb979f301985796e78eae3b8
|
5729fd996f552a53f39671e7db4f4142fe5ff610
|
refs/heads/master
| 2021-06-17T01:45:59.105473
| 2017-05-04T07:18:21
| 2017-05-04T07:18:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 7,025
|
h
|
NXMath.h
|
/*
* File: math.h
* author: 张雄
* date: 2016_02_26
* purpose: 基本的数学库函数
*/
//写一些sin,cos之类的快速计算函数
#ifndef __ZX_NXENGINE_MATH_H__
#define __ZX_NXENGINE_MATH_H__
#include "NXNumeric.h"
#include "../common/NXCore.h"
namespace NX {
template<typename T, int Scale>
class vector;
template<typename T, int Row, int Col>
class Matrix;
void InitNXMath();
template<typename T>
inline float DG2RD(const T angle);
inline double DG2RD(const double angle);
template<typename T>
inline float RD2DG(const T angle);
inline double RD2DG(const double angle);
/**
* 返回acos和asin值,若value超出[-1, 1],则返回边界上的最大值
*/
float SafeACos(const float value);
float SafeASin(const float value);
std::pair<double, double> GetSinAndCos(const double radian);
void GetSinAndCos(const double radian, double * const pSinvalue, double * const pCosValue);
void QuickGetSinAndCos(const double radian, double * const pSinValue, double * const pCosValue);
std::pair<double, double> QuickGetSinAndCos(const double radian);
double QuickCosWithAngle(const double Angle);
double QuickSinWithAngle(const double Angle);
double QuickCosWithRadian(const double Radian);
double QuickSinWithRadian(const double Radian);
float QuickCosWithAngle(const float Angle);
float QuickSinWithAngle(const float Angle);
float QuickCosWithRadian(const float Radian);
float QuickSinWithRadian(const float Radian);
inline float QuickCosWithAngle(const int Angle);
inline float QuickSinWithAngle(const int Angle);
inline float QuickCosWithRadian(const int Radian);
inline float QuickSinWithRadian(const int Radian);
inline int RandInt();
inline int RandIntInRange(int left, int right);
inline float RandUnitFloat();//rand float with (0,1)
inline float RandFloatInRange(float left, float right);
//ComparedValue >= NewValue
template<typename T, typename U>
T ClampFloor(T& ComparedValue, const U NewValue);
//ComparedValue <= NewValue
template<typename T, typename U>
T ClampCeil(T& ComparedValue, const U NewValue);
//FloorValue <= CompraedValue <= CeilValue
template<typename T, typename U, typename X>
T Clamp(T& ComparedValue, const U FloorValue, const X CeilValue);
//以mode为单位,将value变换到[-mode, mode]之间,返回变换之前的value, mode > 0 is required
template<typename T, typename U>
T Wrap(T &value, const U mode);
//以mode为单位,将value变换到[0, mode)之间,返回变换之前的value, mode > 0 is required
template<typename T, typename U>
T Mode(T &value, const U mode);
template<typename T>
T NXAbs(const T value);
template<typename T, typename U>
T NXMin(const T l, const U r);
template<typename T, typename U>
T NXMax(const T l, const U r);
template<typename T>
void NXSwap(T& lhs, T &rhs);
template<typename T>
T NXSign(const T v);
template<typename T>
T NXQuickPow(const T base, const int exp);
double NXQuickKSquare(const double base, const int k, const double Delta = NX::Epsilon<double>::m_Epsilon);
double NXKSquare(const double base, const int k);
inline bool EqualZero(const float v, const float Delta = Epsilon<float>::m_Epsilon){
return v >= -Delta && v <= Delta;
}
inline bool EqualZero(const double v, const double Delta = Epsilon<double>::m_Epsilon){
return v >= -Delta && v <= Delta;
}
//============================================begin float comparsion macro==========================================
#ifndef DECLARE_EQUAL_TYPE
#define DECLARE_EQUAL_TYPE(type) \
inline bool Equal##type(const type va, const type vb){\
return (va == vb) || (NX::NXAbs(va - vb) <= NX::Epsilon<type>::m_Epsilon);\
}
#endif
DECLARE_EQUAL_TYPE(float)
DECLARE_EQUAL_TYPE(double)
#undef DECLARE_EQUAL_TYPE
#ifndef DECLARE_EQUAL_TYPE_WITH_TOLERANCE
#define DECLARE_EQUAL_TYPE_WITH_TOLERANCE(type) \
inline bool Equal##type##WithDelta(const type va, const type vb, const type delta = NX::Epsilon<type>::m_Epsilon){\
return NX::NXAbs(va - vb) <= delta;\
}
#endif
DECLARE_EQUAL_TYPE_WITH_TOLERANCE(float)
DECLARE_EQUAL_TYPE_WITH_TOLERANCE(double)
#undef DECLARE_EQUAL_TYPE_WITH_TOLERANCE
//=================================================end float comparsion macro=======================================
//===================================================解方程==========================================================
class Complex;
/**
* ax + b = 0
*/
std::vector<NX::Complex> SolveEquation(const float a, const float b);
std::vector<float> SolveEquationWithOnlyRealResult(const float a, const float b);
/**
* axx + bx + c = 0
*/
std::vector<NX::Complex> SolveEquation(const float a, const float b, const float c);
std::vector<float> SolveEquationWithOnlyRealResult(const float a, const float b, const float c);
/**
* axxx + bxx + cx + d = 0
*/
std::vector<NX::Complex> SolveEquation(const float a, const float b, const float c, const float d);
std::vector<float> SolveEquationWithOnlyRealResult(const float a, const float b, const float c, const float d);
/**
* axxxx + bxxx + cxx + dx + e = 0
*/
std::vector<NX::Complex> SolveEquation(const float a, const float b, const float c, const float d, const float e);
std::vector<float> SolveEquationWithOnlyRealResult(const float a, const float b, const float c, const float d, const float e);
std::pair<bool, NX::vector<float, 2> > SolveEquation(const NX::Matrix<float, 2, 2> &M, const NX::vector<float, 2> &V);
//==================================================================================================================
//==================================================begin of get eigenvalue=========================================
std::vector<float> GetEigenValueOfSymmetricMatrix(const NX::Matrix<float, 3, 3> &M);
std::vector<NX::vector<float, 3> > GetEigenVectorOfSymmetricMatrix(const NX::Matrix<float, 3, 3> &M);
//==================================================end of get eigenvalue===========================================
//===============================================begin string hash==================================================
unsigned int NXBKDRHash(const char *str);
unsigned int NXBKDRHash(const std::string &str);
//=================================================end string hash==================================================
unsigned int NXUpperPow2(unsigned int x);
unsigned int NXLowerPow2(unsigned int x);
NXUInt64 NXUpperPow2(NXUInt64 x);
NXUInt64 NXLowerPow2(NXUInt64 x);
#include "NXMath.inl"
}
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.