blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
5
146
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
7
license_type
stringclasses
2 values
repo_name
stringlengths
6
79
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
4 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.07k
426M
star_events_count
int64
0
27
fork_events_count
int64
0
12
gha_license_id
stringclasses
3 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
6 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
1 class
length_bytes
int64
20
6.28M
extension
stringclasses
20 values
content
stringlengths
20
6.28M
authors
sequencelengths
1
16
author_lines
sequencelengths
1
16
6faea5cbf8336cc54ea96ffde758e2afda245297
28a5dacf5e1a5a2d0d3fdf89bdc12a88dd897f86
/FP_Attendance.h
f77b3a1af35923c274c6e3a124859e3d58f770d3
[]
no_license
yogengg6/fp_attendance
3f4cababbe33d03e519341a6312015e5cb365a63
574338e53717ff2fbc62c57f14fa749a3a84a53a
refs/heads/master
2020-04-07T20:02:06.843808
2011-07-20T13:09:12
2011-07-20T13:09:12
158,672,408
0
0
null
null
null
null
GB18030
C++
false
false
816
h
/** * Project Name : FP_Attendance * description : a fingerprint based attendance(work with moodle attendanc * e module) * Copyleft : This program is published under GPL * Author : Yusuke([email protected]) * Date : 2011-5-11 20:29 */ // FP_Attendance.h : PROJECT_NAME 应用程序的主头文件 // #pragma once #ifndef __AFXWIN_H__ #error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件" #endif #include "resource.h" // 主符号 // CFP_AttendanceApp: // 有关此类的实现,请参阅 FP_Attendance.cpp // class CFP_AttendanceApp : public CWinApp { public: CFP_AttendanceApp(); // 重写 public: virtual BOOL InitInstance(); // 实现 DECLARE_MESSAGE_MAP() }; extern CFP_AttendanceApp theApp;
[ "yusuke2000@e4a03d97-ca6b-4887-8e5f-4c51e936fd37" ]
[ [ [ 1, 39 ] ] ]
b70a9458d2b928eb0c73557e37edbf60f2c459ce
c8ed24ead5c7b3b3323e140a2b5a6cde9f2528a2
/src/Wall.h
4eb13e12c951aa3da050359fdae4949987810ff8
[]
no_license
linfenpipi/Augmented-Reality-Pong
7d2128f40e32b45431c1cb3025741d1e735f8c6e
2a3a74fad3d013691a7f00d6724e3561a04428c3
refs/heads/master
2020-04-13T14:08:40.213188
2011-12-04T23:36:42
2011-12-04T23:36:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,066
h
#include "ofMain.h" #include "ofxBox2d.h" /* =============================================================== Walls (upper and lower) ================================================================= */ class Wall : public ofxBox2dRect { public: Wall() {} ofColor colour; void draw() { b2Shape* s = body->GetShapeList(); const b2XForm& xf = body->GetXForm(); b2PolygonShape* poly = (b2PolygonShape*)s; int count = poly->GetVertexCount(); const b2Vec2* localVertices = poly->GetVertices(); b2Assert(count <= b2_maxPolygonVertices); b2Vec2 verts[b2_maxPolygonVertices]; for(int32 i=0; i<count; ++i) { verts[i] = b2Mul(xf, localVertices[i]); } ofSetColor(colour.r, colour.g, colour.b, 0); ofFill(); ofBeginShape(); for (int32 i = 0; i <count; i++) { ofVertex(verts[i].x*OFX_BOX2D_SCALE, verts[i].y*OFX_BOX2D_SCALE); } ofEndShape(); ofEndShape(true); } };
[ [ [ 1, 38 ] ] ]
cd78e0ee5f52be12a9dac08affa64f35d36b8124
97f1be9ac088e1c9d3fd73d76c63fc2c4e28749a
/3dc/avp/win95/jsndsup.cpp
e1fd81324d6ac8a9a22ce6c85a03b3b043f2c03d
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
SR-dude/AvP-Wine
2875f7fd6b7914d03d7f58e8f0ec4793f971ad23
41a9c69a45aacc2c345570ba0e37ec3dc89f4efa
refs/heads/master
2021-01-23T02:54:33.593334
2011-09-17T11:10:07
2011-09-17T11:10:07
2,375,686
1
0
null
null
null
null
UTF-8
C++
false
false
3,593
cpp
#include "3dc.h" #include "inline.h" #include "module.h" #define UseLocalAssert Yes #include "ourasert.h" #include "psndplat.h" #include "list_tem.hpp" #include "jsndsup.h" extern "C" { extern LPDIRECTSOUND DSObject; extern int SoundSwitchedOn; // Pat sets this up }; List <LOADED_SOUND *> loaded_sounds; void LoseSound (LOADED_SOUND const * ls) { LOADED_SOUND ** ucls_p = (LOADED_SOUND **) &ls; LOADED_SOUND * ucls = *ucls_p; if (loaded_sounds.contains (ucls)) { LOADED_SOUND * ls_in_list = loaded_sounds.similar_entry (ucls); ls_in_list->num_attached --; if (ls_in_list->permanent == 1) { if (ls_in_list->num_attached <= 0) { loaded_sounds.delete_entry (ls_in_list); DeallocateMem (ls_in_list->wavname); DeallocateMem (ls_in_list); } return; } if (ls_in_list->num_attached <= 0) { PlatEndGameSound ((SOUNDINDEX)ls_in_list->sound_num); loaded_sounds.delete_entry (ls_in_list); DeallocateMem (ls_in_list->wavname); DeallocateMem (ls_in_list); } } else { GLOBALASSERT (0); } } void LoseAllNonCommonSounds() { LOADED_SOUND* ls; while(loaded_sounds.size()) { ls=loaded_sounds.first_entry(); loaded_sounds.delete_first_entry(); if(!ls->permanent) { PlatEndGameSound ((SOUNDINDEX)ls->sound_num); } DeallocateMem (ls->wavname); DeallocateMem (ls); } } static int find_empty_game_sound() { if(!SoundSwitchedOn) return (-1); for (int i=SID_STARTOF_LOADSLOTS; i<=SID_ENDOF_LOADSLOTS; i++) { if (GameSounds[i].loaded == 0) { return(i); } } return(-1); } static int find_permanent_game_sound(char * wavname) { if(!SoundSwitchedOn) return (-1); for (int i=0; i<SID_MAXIMUM; i++) { if (GameSounds[i].wavName) { if (!(_stricmp( GameSounds[i].wavName, wavname))) { return(i); } } } return(-1); } LOADED_SOUND const * GetSound (char const * fname) { if(!SoundSwitchedOn) return (0); char * wavname = strrchr (fname, '\\'); if (wavname) { wavname ++; } else { wavname = (char *)fname; } // check if wavname already loaded for (LIF<LOADED_SOUND *> lsi(&loaded_sounds); !lsi.done(); lsi.next()) { if (!_stricmp (lsi()->wavname, wavname)) { lsi()->num_attached ++; return(lsi()); } } LOADED_SOUND * ls = 0; int perm_snum = find_permanent_game_sound (wavname); if (perm_snum != -1) { ls = (LOADED_SOUND *) AllocateMem(sizeof (LOADED_SOUND)); ls->sound_num = perm_snum; ls->wavname = (char *) AllocateMem(sizeof (char) * (strlen (wavname)+1)); strcpy (ls->wavname, wavname); ls->num_attached = 1; ls->permanent = 1; loaded_sounds.add_entry (ls); return (ls); } // not loaded, so try and load it int soundNum = find_empty_game_sound(); if (soundNum == -1) { GLOBALASSERT(0=="Run out of sound slots"); return(0); } int ok = FindAndLoadWavFile (soundNum, (char *)fname); if (ok) { GameSounds[soundNum].loaded = 1; GameSounds[soundNum].activeInstances = 0;; GameSounds[soundNum].volume = VOLUME_DEFAULT; GameSounds[soundNum].pitch = 0; InitialiseBaseFrequency((SOUNDINDEX)soundNum); ls = (LOADED_SOUND *) AllocateMem(sizeof (LOADED_SOUND)); ls->sound_num = soundNum; ls->wavname = (char *)AllocateMem(sizeof (char) * (strlen (wavname)+1)); strcpy (ls->wavname, wavname); ls->num_attached = 1; ls->permanent = 0; loaded_sounds.add_entry (ls); } return(ls); }
[ "a_jagers@ANTHONYJ.(none)" ]
[ [ [ 1, 184 ] ] ]
d40f6631a1e855de3b4b7797573578b3f5f2de80
49b6646167284329aa8644c8cf01abc3d92338bd
/SEP2_M6/HAL/HALCore.h
06c8bc108a092d8a787311cc71a742d95f8c4906
[]
no_license
StiggyB/javacodecollection
9d017b87b68f8d46e09dcf64650bd7034c442533
bdce3ddb7a56265b4df2202d24bf86a06ecfee2e
refs/heads/master
2020-08-08T22:45:47.779049
2011-10-24T12:10:08
2011-10-24T12:10:08
32,143,796
0
0
null
null
null
null
UTF-8
C++
false
false
15,636
h
#ifndef HALCore_H_ #define HALCore_H_ #include <iostream> #include <unistd.h> #include <stdlib.h> #include <vector> #include "HWaccess.h" #include "../Thread/Mutex.h" #include "../Thread/HAWThread.h" #include "../Thread/Semaphor.h" #include "../Thread/Condition.h" #include "../Thread/Singleton_T.h" #include "../Timer/Timer.h" #include "../Functor/CallBackThrower.h" #define CONDOR //#define SEMAP /** * Delete a bit */ #define BIT_DELETE (false) /** * Set a bit */ #define BIT_SET (true) /** * BASE ADDRESS for Digital IO */ #define D_IOBASE 0x300 // start address Ports /** * BASE ADDRESS for Analog IO */ #define A_IOBASE 0x320 /** * tolerance range plane and normal work piece */ #define TOLERANCE_NORMAL 75 /** * tolerance range work piece with a pocket */ #define TOLERANCE_POCKET 100 /** * 12Bit-Mask for the height measure */ #define HEIGHT_MASK 0xFFF /** * PORT A: */ enum PortA { BIT_ENGINE_RIGHT = (1 << 0), BIT_ENGINE_LEFT = (1 << 1), BIT_ENGINE_SLOW = (1 << 2), BIT_ENGINE_STOP = (1 << 3), BIT_SWITCH = (1 << 4), BIT_LIGHT_GREEN = (1 << 5), BIT_LIGHT_YELLOW = (1 << 6), BIT_LIGHT_RED = (1 << 7), BIT_ENGINE_S_L = (0x06), BIT_ENGINE_S_R = (0x05), BIT_LIGHT_OFF = (0x00), BIT_LIGHTS_ON = (0xE0) }; /** * PORT B: */ enum PortB { BIT_WP_OUT = 0, BIT_WP_RUN_IN = (1 << 0), BIT_WP_IN_HEIGHT = (1 << 1), BIT_HEIGHT_1 = (1 << 2), BIT_WP_IN_SWITCH = (1 << 3), BIT_WP_METAL = (1 << 4), BIT_SWITCH_STATUS = (1 << 5), BIT_WP_IN_SLIDE = (1 << 6), BIT_WP_OUTLET = (1 << 7) }; /** * PORT B Bits: */ enum PortB_Bit{ WP_RUN_IN = 0,WP_IN_HEIGHT = 1,WP_HEIGHT_STATUS = 2,WP_IN_SWITCH = 3, WP_METAL = 4,WP_WITCH_STATUS = 5, WP_IN_SLIDE = 6, WP_OUTLET = 7 }; /** * PORT C: */ enum PortC { BIT_LED_START = (1 << 0), BIT_LED_RESET = (1 << 1), BIT_LED_Q1 = (1 << 2), BIT_LED_Q2 = (1 << 3), BIT_START = (1 << 4), BIT_STOP = (1 << 5), BIT_RESET = (1 << 6), BIT_E_STOP = (1 << 7), BIT_LEDS_ON = (0x0F) }; /** * Bits for PORT C */ enum PortC_Bit{ WP_LED_START=0, WP_LED_RESET=1, WP_LED_Q1=2, WP_LED_Q2=3, WP_START=4, WP_STOP=5, WP_RESET=6, WP_E_STOP=7 }; /** * PORT ADDRESS: */ enum PortAdress { PORT_A = (D_IOBASE + 0x00), PORT_B = (D_IOBASE + 0x01), PORT_C = (D_IOBASE + 0x02), PORT_CNTRL = (D_IOBASE + 0x03) }; /** * CONTROLBITS: */ enum ControlBits { BIT_PORT_A = (1 << 4), BIT_PORT_B = (1 << 1), BIT_PORT_C = ((1 << 0) + (1 << 3)), BIT_PORT_C_LOW = (1 << 0), BIT_PORT_C_HIGH = (1 << 3), BIT_CNTRLS = (0x8A) }; /** * Height Measures */ enum Height { HEIGHT_MEASURE_STATUS = (A_IOBASE + 0x00), HEIGHT_REGISTER_PART1 = (A_IOBASE + 0x02), HEIGHT_REGISTER_PART2 = (A_IOBASE + 0x03), HEIGHT_START_CODE = (0x10) }; /** * */ enum WPHeight{ PLANE_WP = 0xa9b , NORMAL_WP = 0x9a8, POCKET_WP = 0xdba }; /** * Enumeration for Colors */ enum Color { RED, GREEN, YELLOW, OFF }; /** * Enumeration for LEDS */ enum LEDS { START_LED, RESET_LED, Q1_LED, Q2_LED, LEDS_OFF, LEDS_ON }; /** * interrupts */ enum Interrupts_D { INTERRUPT_D_PORT_A = (1 << 0), INTERRUPT_D_PORT_B = (1 << 1), INTERRUPT_D_PORT_C = (1 << 2), INTERRUPT_D_PORT_C_HIGH = (1 << 3), INTERRUPT_D_SERIAL = (1 << 4), INTERRUPT_VECTOR_NUMMER_A = 14, INTERRUPT_VECTOR_NUMMER_D = 11, INTERRUPT_SET_ADRESS_D = (D_IOBASE + 0xB), INTERRUPT_RESET_ADRESS_D = (D_IOBASE + 0xF), PORT_IRE = (D_IOBASE + 0xB), PORT_IRQ = (D_IOBASE + 0xF), PORT_IRQ_AND_RESET = (D_IOBASE + 0x18), IIR_MASK_D = 0xF }; /** * Index to pointer to functions WRITE and RESET */ enum Function{ WRITE=0,RESET=1 }; /** * PULS Codes */ enum PULSE_CODE { LICHTSCHRANKE, HEIGHT }; /** * Interrupt Service Routine */ extern const struct sigevent * ISR(void *arg, int id); /** * Port A: contains the byte of Port A */ extern volatile int portA; /** * Port B: contains the byte of Port B */ extern volatile int portB; /** * Port C: contains the byte of Port C */ extern volatile int portC; /** * Port IRE: contains the byte of Port IRE */ extern volatile int portIRE; /** * Port IRQ: contains the byte of Port IRQ */ extern volatile int portIRQ; /** * Port ControlBits: contains the byte of Port ControlBits */ extern volatile int controlBits; /** * Emergency Stop pushed! */ extern volatile bool emstopped; /** * Hardware Abstraction Layer for Aktorik and Sensorik. * * SE2 (+ SY and PL) Project SoSe 2011 * * Milestone 2: HAL Aktorik * Milestone 3: HAL Sensorik * * Authors: Rico Flaegel, * Tell Mueller-Pettenpohl, * Torsten Krane, * Jan Quenzel * * Capsulates many functions for the direct * in- and output from and to the Festo Transfersystem and * with Interrupts using Pulse Messages. * * Inherits: IHAL.h */ class HALCore: public thread::HAWThread, public CallBackThrower, public Singleton_T<HALCore>{ friend class Singleton_T<HALCore>; public: /** * Retrieve the running status of the engine. * \returns an bool, true if engine is running. */ bool isEngineRunning(); /** * Reads from a port. * \param dir an integer, specifying the Port. * \return an integer, the value read. */ int read(int dir); /** * Checks if a port is set to Input. * \param dir an integer, specifying the Port. * \return true if port is set to Input. */ bool isInput(int dir); /** * Checks if a port is set to Output. * \param dir an integer, specifying the Port. * \return true if port is set to Output. */ bool isOutput(int dir); /** * Writing to a port. * \param dir an integer, specifying the port. * \param value an integer. The position, where the bits will be set to one. * \return an integer, the actual value of the port. */ void write(int dir, int value); void write(void *ptr); /** * Reseting specified bit position on a port. * \param dir an integer, specifying the port. * \param value an integer. The position, where the bits will be reset to zero. * \return an integer, the actual value of the port. */ void reset(int dir, int value); void reset(void *ptr); /** * Starting the Engine into a given direction. * \param direction an integer, specifying the direction (LEFT (BIT_ENGINE_LEFT), * RIGHT (BIT_ENGINE_RIGHT)). * \return a bool, true if engine started. */ void engineStart(int direction); /** * Opens the Switch. * \return a bool, true if switch is open. */ void openSwitch(); /** * Closes the Switch. * \return a bool, true if switch is closed. */ void closeSwitch(); /** * Sets the Switch to open or closed. * \param dir a bool, * \return a bool, true action succeeded. */ void setSwitchDirection(bool dir); /** * Resets the engine. (Resetting port A Bit 0 to 3) * \return a bool, true action succeeded. */ void engineReset(); /** * Stops the engine through setting the stopbit. * \return a bool, true action succeeded. */ void engineStop(); /** * Continues the engine through resetting the stopbit. * \return a bool, true action succeeded. */ void engineContinue(); /** * Sets the engine direction to the right, if not stopped. * \return a bool, true action succeeded. */ void engineRight(); /** * Sets the engine direction to the left, if not stopped. * \return a bool, true action succeeded. */ void engineLeft(); /** * Sets the engine to slow speed. * \return a bool, true action succeeded. */ void engineSlowSpeed(); /** * Sets the engine to slow speed. * \param dir an integer, BIT_ENGINE_LEFT, BIT_ENGINE_S_L, else it will be slowed. * \return a bool, true action succeeded. */ void engineSlowSpeed(int dir);/** * Sets the engine to normal speed. * \return a bool, true action succeeded. */ void engineNormalSpeed(); /** * Retrieves if the engine has stopped (stop bit set). * \return a bool, true if stop bit set. */ bool engineStopped(); /** * Sets the engine to slow speed. * \param slow a bool. If true, the engine will be set to slow speed, * false will continue. * \return a bool, true action succeeded. */ void engineSpeed(bool slow); /** * Sets the engine to slow speed and left direction. * \return a bool, true action succeeded. */ void engineSlowLeft(); /** * Sets the engine to slow speed and right direction. * \return a bool, true action succeeded. */ void engineSlowRight(); /** * Retrieves the set interrupts. * \return an integer, set interrupts */ int getSetInterrupt(); /** * Retrieves the triggered interrupts. * \return an integer, triggered interrupts */ int getInterrupt(); /** * activates the Interrupt to a certain * \param port an integer, specifying the Port. * \return a bool, true if action was successful, false if not. */ void activateInterrupt(int port); /** * deactivates the Interrupt to a certain port * \param port an integer, specifying the Port. * \return a bool, true if action was successful, false if not. */ void deactivateInterrupt(int port); /** * Resets all bits from Port A. * \return a bool, true action succeeded. */ void resetAllOutPut(); /** * Removes a certain light. * \param col specifies the color of the light. */ void removeLight(Color col); /** * Adds a certain light. * \param col specifies the color of the light. * \return a bool, true action succeeded. */ void addLight(Color col); /** * Adds a certain light. * Equals void addLight(Color col); * \param col specifies the color of the light. * \return a bool, true action succeeded. */ void shine(Color col); /** * Removes a certain light. * \param led specifies the color of the light. */ void removeLED(LEDS led); /** * Adds a certain LED. * \param led specifies the color of the light. * \return a bool, true action succeeded. */ void addLED(LEDS led); /** * Adds a certain light. * Equals void addLED(LEDS led); * \param led specifies the color of the light. * \return a bool, true action succeeded. */ void shineLED(LEDS led); /*! * returns a Pointer to the threadsafe Singleton Instance of the Hardware Abstraction Layer (HAL) * \return a Pointer to HAL. */ //static HALCore* getInstance(); /** * deletes the Instance */ //static void deleteInstance(); /** * activates the light specified by color * \param color an integer, specifying the color. * \return a bool, true if action was successful, false if not. */ void shine(int color); /** * activates the LED specified by led * \param led an integer, specifying the Led which should be activated. * \return a bool, true if action was successful, false if not. */ void shineLED(int led); /** * Stops all processes * *reserved for future* * do not use! */ void stopProcess(); /** * Performes an emergency stop. */ void emergencyStop(); /** * Stops the machine. */ void stopMachine(); /** * Restarts the machine. */ void restart(); /** * Resets all hardware and software. */ void resetAll(); /** * Identifies the height of a work piece and * categorize in defined enum types. * \return a integer, the height of the work piece. */ int identifyHeight(); /** * Callback function for identifyHeight * which interrupts the DAC busy waiting. */ void checkTimeIdentifyHeight(); /** * Checks the sensor b(6) on the slide. * \return a bool, true if there is a work piece. */ bool checkSlide(); /** * Returns if there is metal under the metal detector. * \return a bool, true if there is metal. */ bool isMetal(); protected: void execute(void*); void shutdown(); /** * functionpointer on HALCore functions */ typedef void (HALCore::*FP)(void*); typedef struct val { int value1; int value2; bool value3; } __attribute__((__packed__)) VAL; typedef struct f { FP func; VAL* v; } __attribute__((__packed__)) Functions; private: /** * Writes to the transfersystem. * \param dir an integer representing the port address * \param value an integer, the bits which should be written or deleted * \param overwrite a bool that indicates if the given bits from value should be overwritten or not. * \returns the new value from the port */ int write(int dir, int value, bool overwrite); /** * Sets ports direction to the specified value. * \param cb an integer, the new status for the ControlBit-Register */ void setPortsTo(int cb); /** * Reset the all ports direction. */ void resetPortsDirection(); /** * Set the Ports to Output direction. * \param bits an integer, whose bits will be set to Output direction. * \return an integer */ int setPortToOutput(int bits); /** * Set the Ports to Input direction. * \param bits an integer, whose bits will be set to Input direction. * \return an integer, true. */ int setPortToInput(int bits); /** * Retrieve the Value of the specified port. * \param dir an integer, the ports Address. * \return an integer, the Value of the port. */ int getValueFromAdress(int dir); /** * Calculate the bit for the specified port. * \param dir an integer, the ports Address. * \return an integer, the bits to the address. */ int getBitsToAdress(int dir); /** * Checks the Value, which will be written, for problems with other bits. * \param dir an integer, port which will be written to. * \param value an integer, bits which will be changed. * \param set a bool, overwrite or not. * \return an integer, the bits which will need to change. */ int checkVal(int dir, int value, bool set); /** * Calculate the bit mask for the Color. * \param col of enumtype Color, Color whose mask will be returned. * \return an integer, the bit mask. */ int getColorCode(Color col); /** * Calculate the bit mask for LED. * \param led of enumtype LED, LED whose mask will be returned. * \return an integer, the bit mask. */ int getLEDCode(LEDS led); HALCore(); ~HALCore(); /** * for Singleton */ HALCore(const HALCore&); HALCore& operator=(const HALCore&); /** * Pointer for singleton HALCore */ //static HALCore* pInstance; /** * Pointer for Mutex to keep singleton threadsafe */ //static Mutex singleton; /** * Mutex to ensure threadsafety */ //static Mutex mutEx; /** * Stop pushed! */ bool stopped; /** * Timeout flag for identifyHeight loop. */ bool timeout; /** * Wakeup the thread */ void wakeup(); /** * function pointer array */ FP funcArray[2]; /** * sets the function pointer array */ void setFPArray(); /** * List of function pointers which should worked up */ vector<Functions *> lst; /** * Pointer to Timer. */ Timer *timer; #ifdef CONDOR Condition condvar; Mutex mut; Mutex changedMutex; bool requested; #endif #ifdef SEMAP /** * Semaphore to wakeup the thread */ Semaphor sem; #endif Functions * buildFunctions(FP f, int val1, int val2); Functions * buildFunctions(FP f, bool val3); Functions * buildFunctions(FP f, int val1); Functions * buildFunctions(FP f, int val1, int val2, bool val3); }; #endif /* HALCore_H_ */
[ "[email protected]@72d44fe2-11f0-84eb-49d3-ba3949d4c1b1", "[email protected]@72d44fe2-11f0-84eb-49d3-ba3949d4c1b1" ]
[ [ [ 1, 35 ], [ 37, 39 ], [ 41, 43 ], [ 45, 104 ], [ 106, 106 ], [ 108, 181 ], [ 183, 183 ], [ 185, 224 ], [ 226, 251 ], [ 253, 254 ], [ 256, 459 ], [ 461, 463 ], [ 465, 654 ] ], [ [ 36, 36 ], [ 40, 40 ], [ 44, 44 ], [ 105, 105 ], [ 107, 107 ], [ 182, 182 ], [ 184, 184 ], [ 225, 225 ], [ 252, 252 ], [ 255, 255 ], [ 460, 460 ], [ 464, 464 ] ] ]
a751d8fdb50cd2fbca91c93d7cf2a9176fe32c66
5ac13fa1746046451f1989b5b8734f40d6445322
/minimangalore/Nebula2/code/mangalore/application/guistatehandler.h
4429be1d4660afbaf30cffbce8031d23c722ff3d
[]
no_license
moltenguy1/minimangalore
9f2edf7901e7392490cc22486a7cf13c1790008d
4d849672a6f25d8e441245d374b6bde4b59cbd48
refs/heads/master
2020-04-23T08:57:16.492734
2009-08-01T09:13:33
2009-08-01T09:13:33
35,933,330
0
0
null
null
null
null
UTF-8
C++
false
false
1,985
h
#ifndef APPLICATION_GUISTATEHANDLER_H #define APPLICATION_GUISTATEHANDLER_H //------------------------------------------------------------------------------ /** A state handler which displays and manages an UI subsystem user interface. (C) 2005 Radon Labs GmbH */ #include "application/statehandler.h" #include "ui/event.h" #include "ui/window.h" #include "application/guieventhandler.h" //------------------------------------------------------------------------------ namespace Application { class GuiStateHandler : public StateHandler { DeclareRtti; DeclareFactory(GuiStateHandler); public: /// constructor GuiStateHandler(); /// destructor virtual ~GuiStateHandler(); /// set name of gui resource void SetGuiResource(const nString& res); /// get name of gui resource const nString& GetGuiResource() const; /// handle an user interface event virtual void OnEvent(UI::Event* event); /// called when the state represented by this state handler is entered virtual void OnStateEnter(const nString& prevState); /// called when the state represented by this state handler is left virtual void OnStateLeave(const nString& nextState); /// called each frame as long as state is current, return new state virtual nString OnFrame(); private: nString resName; Ptr<UI::Window> window; Ptr<GuiEventHandler> eventHandler; }; RegisterFactory(GuiStateHandler); //------------------------------------------------------------------------------ /** */ inline void GuiStateHandler::SetGuiResource(const nString& n) { this->resName = n; } //------------------------------------------------------------------------------ /** */ inline const nString& GuiStateHandler::GetGuiResource() const { return this->resName; } } // namespace Application //------------------------------------------------------------------------------ #endif
[ "BawooiT@d1c0eb94-fc07-11dd-a7be-4b3ef3b0700c" ]
[ [ [ 1, 70 ] ] ]
addcd366577ae87c66fb01112c3cbe45c9ab1411
ad6a37b326227901f75bad781f2cbf357b42544f
/Effects/SimpleDoF.h
460a265002da061d7a1be2bb3983c60cbf85e885
[]
no_license
OpenEngineDK/branches-PostProcessingEffects
83b4e1dc1a390b66357bed6bc94d4cab16ef756a
c4f4585cbdbb905d382499bf12fd8bfe7d27812c
refs/heads/master
2021-01-01T05:43:32.564360
2009-04-20T14:50:03
2009-04-20T14:50:03
58,077,144
1
0
null
null
null
null
UTF-8
C++
false
false
891
h
#ifndef __SIMPLEDOF_H__ #define __SIMPLEDOF_H__ #include <PostProcessing/OpenGL/PostProcessingEffect.h> #include <PostProcessing/IPostProcessingPass.h> #include <Display/Viewport.h> #include <Core/IEngine.h> #include <vector> #include <stdio.h> using namespace OpenEngine::PostProcessing; class SimpleDoF : public PostProcessingEffect { private: IPostProcessingPass* pass1; // xblur IPostProcessingPass* pass2; // yblur IPostProcessingPass* pass3; // simple DoF vector<float> znear; vector<float> zfar; vector<float> zsharp; vector<float> zfarblur; static const int NUM_SAMPLES = 20; float blurweights[NUM_SAMPLES]; float g(float x); void calcBlurWeightArray(); public: SimpleDoF(Viewport* viewport, IEngine& engine); void Setup(); void PerFrame(const float deltaTime); }; #endif
[ [ [ 1, 6 ], [ 8, 33 ], [ 35, 39 ] ], [ [ 7, 7 ], [ 34, 34 ] ] ]
015380fa89a491008208b2f690be69203334c38c
1585c7e187eec165138edbc5f1b5f01d3343232f
/СПиОС/actix/actix/actixCtrl.h
c67e9e37a2f6545d90fdb5f840b4dc9c9a85d901
[]
no_license
a-27m/vssdb
c8885f479a709dd59adbb888267a03fb3b0c3afb
d86944d4d93fd722e9c27cb134256da16842f279
refs/heads/master
2022-08-05T06:50:12.743300
2011-06-23T08:35:44
2011-06-23T08:35:44
82,612,001
1
0
null
2021-03-29T08:05:33
2017-02-20T23:07:03
C#
UTF-8
C++
false
false
1,406
h
#pragma once // actixCtrl.h : Declaration of the CactixCtrl ActiveX Control class. #include "Graph.h" // CactixCtrl : See actixCtrl.cpp for implementation. class CactixCtrl : public COleControl { DECLARE_DYNCREATE(CactixCtrl) CGraph* m_graph; CGraph* m_t_graph; protected: CPoint button_down_point; bool dijkstra_mode; public: CGraph* GetGraph() { return m_graph;} CGraph* GetTempGraph() { return m_t_graph;} // Constructor public: CactixCtrl(); // Overrides public: virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid); virtual void DoPropExchange(CPropExchange* pPX); virtual void OnResetState(); // Implementation protected: ~CactixCtrl(); DECLARE_OLECREATE_EX(CactixCtrl) // Class factory and guid DECLARE_OLETYPELIB(CactixCtrl) // GetTypeInfo DECLARE_PROPPAGEIDS(CactixCtrl) // Property page IDs DECLARE_OLECTLTYPE(CactixCtrl) // Type name and misc status // Message maps DECLARE_MESSAGE_MAP() // Dispatch maps DECLARE_DISPATCH_MAP() // Event maps DECLARE_EVENT_MAP() // Dispatch and event IDs public: enum { }; public: afx_msg void OnLButtonDown(UINT nFlags, CPoint point); public: afx_msg void OnLButtonUp(UINT nFlags, CPoint point); public: afx_msg void OnRButtonDown(UINT nFlags, CPoint point); public: afx_msg void OnRButtonUp(UINT nFlags, CPoint point); };
[ "Axell@bf672a44-3a04-1d4a-850b-c2a239875c8c" ]
[ [ [ 1, 62 ] ] ]
0a834d818611d1f0d21994ff92e75aee8871f829
cd0987589d3815de1dea8529a7705caac479e7e9
/webkit/WebKit2/WebProcess/InjectedBundle/InjectedBundleScriptWorld.h
a996450b7ed61283edf3c431e656ac667ea8286b
[]
no_license
azrul2202/WebKit-Smartphone
0aab1ff641d74f15c0623f00c56806dbc9b59fc1
023d6fe819445369134dee793b69de36748e71d7
refs/heads/master
2021-01-15T09:24:31.288774
2011-07-11T11:12:44
2011-07-11T11:12:44
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,281
h
/* * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef InjectedBundleScriptWorld_h #define InjectedBundleScriptWorld_h #include "APIObject.h" #include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> namespace WebCore { class DOMWrapperWorld; } namespace WebKit { class InjectedBundleScriptWorld : public APIObject { public: static const Type APIType = TypeBundleScriptWorld; static PassRefPtr<InjectedBundleScriptWorld> create(); static PassRefPtr<InjectedBundleScriptWorld> getOrCreate(WebCore::DOMWrapperWorld*); static InjectedBundleScriptWorld* normalWorld(); ~InjectedBundleScriptWorld(); WebCore::DOMWrapperWorld* coreWorld() const; private: InjectedBundleScriptWorld(PassRefPtr<WebCore::DOMWrapperWorld>); virtual Type type() const { return APIType; } RefPtr<WebCore::DOMWrapperWorld> m_world; }; } // namespace WebKit #endif // InjectedBundleScriptWorld_h
[ [ [ 1, 61 ] ] ]
739ec46bbb418e4a2dc30ab740f1f2a49b12e19f
57be15ccf8458cdc18ed9ddc425260a380c80ebf
/MatchingBackend/network/Sockette.cpp
7d545e178fca46a084b6ae5a04c1530a40f2d54f
[]
no_license
lkn/MatchingBackend
9fe7687e0dcfb109c8ef16507ec5b88cafa1b612
7e4039c594dadc94843db605b36648681171d2d0
refs/heads/master
2021-01-01T18:27:29.084638
2011-06-06T20:36:03
2011-06-06T20:36:03
1,797,326
0
0
null
null
null
null
UTF-8
C++
false
false
4,845
cpp
#include <algorithm> #include <iostream> #include <winsock2.h> #include "Sockette.h" // Create the socket (ex. server) Sockette::Sockette(u_short port) : port_(port) { Create(); } // Wrap a socket (ex. one that was returned from accept()) Sockette::Sockette(SOCKET s) { handle_ = s; SOCKADDR_IN sadi; int size = sizeof(sadi); if (getpeername(handle_, (SOCKADDR *) &sadi, &size) == SOCKET_ERROR) { std::cerr << "Error constructing Sockette from SOCKET!!\n"; switch (WSAGetLastError()) { // Something went wrong, and we can't construct case WSANOTINITIALISED: std::cerr << "->1\n"; break; case WSAENETDOWN: std::cerr << "->2\n"; break; case WSAEFAULT: std::cerr << "->3\n"; break; case WSAEINPROGRESS: std::cerr << "->4\n"; break; case WSAENOTCONN: std::cerr << "->5\n"; break; case WSAENOTSOCK: std::cerr << "->6\n"; break; } WSACleanup(); system("PAUSE"); } address_ = ntohl(inet_addr((char *) sadi.sin_addr.S_un.S_addr)); port_ = sadi.sin_port; int tru = 1; // disable Nagle setsockopt(handle_, IPPROTO_TCP, TCP_NODELAY, (char *) &tru, sizeof(tru)); } // Creates and binds to socket void Sockette::Create() { handle_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (handle_ == INVALID_SOCKET) { std::cout << "Socket creation failed.\n"; WSACleanup(); system("PAUSE"); } } void Sockette::StartListening() { SOCKADDR_IN serverInf; serverInf.sin_family = AF_INET; serverInf.sin_addr.s_addr = INADDR_ANY; serverInf.sin_port = htons(port_); if (bind(handle_, (SOCKADDR *) (&serverInf), sizeof(serverInf)) == SOCKET_ERROR) { std::cout << "Unable to bind socket!\n"; WSACleanup(); system("PAUSE"); } listen(handle_, 5); // TODO: make configurable } // first 3 bytes is header. // Expects that whoever is sending data is using the first 4 bytes // to encode how many bytes we should expect to receive. // next byte is the type of request // Whoever sent in 'data' must deallocate it (this function allocates it) bool Sockette::Listen(unsigned char *cmd, char **data) { std::cout << "Listening...." << std::endl; unsigned char * tmp = (unsigned char *) calloc(5, sizeof(unsigned char)); if (tmp == NULL) std::cerr << "calloc returned NULL"; // get expected size of data int expectedSize = 0; while (true) { int n = recv(handle_, (char *) tmp, 5, 0); std::cout << "Received data from client!" << std::endl; std::cout << "error: " << WSAGetLastError() << std::endl; if (n == SOCKET_ERROR) { if (WSAGetLastError() == WSAEWOULDBLOCK) continue; std::cerr << "Error getting packet size: " << WSAGetLastError() << std::endl; return false; } std::cout << "header size: " << n << std::endl; expectedSize = tmp[0] << 24 | tmp[1] << 16 | tmp[2] << 8 | tmp[3]; // assuming big endian std::cout << "Expected size of data: " << expectedSize << std::endl; if (expectedSize <= 0) { std::cerr << "Something funny with client... we expect 0 bytes. Ignoring and quitting." << std::endl; return false; } *cmd = tmp[4]; std::cout << "cmd = " << *cmd << std::endl; break; } *data = new char[expectedSize]; // specifically this to keep OpenCV happy int numBytesRead = 0; while (numBytesRead < expectedSize) { int r = recv(handle_, (char *) (*data + numBytesRead), expectedSize - numBytesRead, 0); if (r == SOCKET_ERROR) { if (WSAGetLastError() == WSAEWOULDBLOCK) continue; std::cerr << "Couldn't receive, error: " << WSAGetLastError() << std::endl; return false; } numBytesRead += r; } std::cout << "Actually read " << numBytesRead << std::endl; delete tmp; // something funky happened, we'll just assume client is in some weird state if (numBytesRead == 0) { std::cerr << "Something funny with client... we read 0 bytes. Ignoring and quitting." << std::endl; return false; } return true; } // TODO: make it work for large amounts of data bool Sockette::Send(std::string data) { std::cout << "Sending " << data << std::endl; if (data.empty()) { std::cerr << "why you tryna send an empty string?\n"; return false; } // TODO: hack... remove newlines in data sent in // also.. we just add a new line since its easy for java client since it uses in.readLine() data.erase(std::remove(data.begin(), data.end(), '\n'), data.end()); data.append("\n"); int sent = send(handle_, data.c_str(), data.length(), 0); if (sent == SOCKET_ERROR) { std::cerr << "Error sending packet! " << WSAGetLastError() << std::endl; return false; } std::cout << "Number of bytes sent to client: " << sent << std::endl; return true; } Sockette::~Sockette() { // TODO shutdown(handle_); closesocket(handle_); }
[ [ [ 1, 157 ] ] ]
5788e894ce8713eeedead283acca0d75092f20e5
116e286b7d451d30fd5d9a3ce9b3013b8d2c1a0c
/mapui/RoboMapUI.h
c33c54e38c3f7e874da02b27899acd43aafd2866
[]
no_license
savfod/robolang
649f2db0f773e3ad5be58c433920dff7aadfafd0
f97446db5405d3e17b29947fc5b61ab05ef1fa24
refs/heads/master
2021-01-10T04:07:06.895016
2009-11-17T19:54:23
2009-11-17T19:54:23
48,452,157
0
0
null
null
null
null
UTF-8
C++
false
false
1,232
h
// MapUI.h: interface for the CMapUI class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_MAPUI_H__0B3F765C_1712_4B73_BB42_05887E40ADBE__INCLUDED_) #define AFX_MAPUI_H__0B3F765C_1712_4B73_BB42_05887E40ADBE__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class IRoboMapWindow { public: // interface for map window virtual void updateMap() = 0; }; typedef enum { CHANGETYPE_UNKNOWN = 0, TYPE_FILL = 1, TYPE_ERASE = 2, TYPE_INVERT = 3 } ChangeType; class CRoboMapUI { public: COLORREF stdColor; COLORREF black; CRoboMapUI( IRoboMapWindow *mw ); virtual ~CRoboMapUI(); void onViewCellChanged( int indexX, int indexY, ChangeType change ); void onViewWallVChanged( int indexX, int indexY, ChangeType change ); void onViewWallHChanged( int indexX, int indexY, ChangeType change ); void onViewClearCell(); //fill all cells if all are cleared void onViewClearWall(); //set all walls if all are removed void onViewRandomCell(); void onViewRandomWall(); void onMapChanged(); private: IRoboMapWindow *iw; }; #endif // !defined(AFX_MAPUI_H__0B3F765C_1712_4B73_BB42_05887E40ADBE__INCLUDED_)
[ "SAVsmail@11fe8b10-5191-11de-bc8f-bda5044519d4" ]
[ [ [ 1, 52 ] ] ]
bc8742cc449adeb2ad9b037ab836fa03696ee1a0
3d7fc34309dae695a17e693741a07cbf7ee26d6a
/shared/src/InputParameters.h
1ffc74d8f5b7283b231d69a7b55043966ba602ca
[ "LicenseRef-scancode-public-domain" ]
permissive
nist-ionstorage/ionizer
f42706207c4fb962061796dbbc1afbff19026e09
70b52abfdee19e3fb7acdf6b4709deea29d25b15
refs/heads/master
2021-01-16T21:45:36.502297
2010-05-14T01:05:09
2010-05-14T01:05:09
20,006,050
5
0
null
null
null
null
UTF-8
C++
false
false
6,878
h
/* ___ |R */ #pragma once #include <map> #include "CriticalSection.h" #include <string_func.h> #include <iostream> #include <string> #include <stdexcept> #include <ctime> //parameter data represented as a string in the back-end DB class ip_data { public: ip_data() : was_touched(false), revision(0), tChanged(0) { } std::string value; bool was_touched; int revision; time_t tChanged; }; //a string-to-string map that serves as a simple parameter database //the data can be written to an ostream and recovered from an istream. class InputParameters : protected std::map<std::string, ip_data> { public: //constructor for istream text source InputParameters(std::ifstream* p_is); virtual ~InputParameters(); //data access functions are protected by a critical section to ensure thread safety //Updates the "value" associate with the "key". //If the new value is different from the stored one the revision number is incremented. bool UpdatePair(const std::string& key, const std::string& value, int new_revision, bool touch=true, time_t tChanged=0); //Returns the value associated with the "key" std::string GetValue(const std::string& key); int GetRevision(const std::string& key); //save data to an ostream void SaveState(std::ostream* p_os); //returns whether or not the map contains at least one non-empty value bool HasValidData(); virtual std::string Name() { return ""; } protected: //process line to extract name/value pair bool processOld(const std::string& sLine, std::string& sName, std::string& sValue); bool processNew(const std::string& sLine, std::string& sName, std::string& sValue, time_t& tChanged); //for thread safety only allow one data operation at a time. NamedCriticalSection cs; }; //a non-volatile derivative of "InputParameters: that uses text files to store the data class TxtParameters : public InputParameters { public: //constructor for text file input TxtParameters(const std::string& sTxtFileName); virtual ~TxtParameters(); void SaveState(const std::string& Directory); std::string Name() const { return sFileName; } protected: std::string sFileName; }; class Parameter_Base { public: Parameter_Base(const std::string& name) : revision(-1), name(name), fpga_name(name) { } virtual ~Parameter_Base() { } virtual bool IsInitialized() = 0; int Revision() const { return revision; } void set_revision(int r) { revision = r; } //"display label" is to allow different DB names w/ the same display label; void set_display_label(const std::string& l) { display_label = l; } const std::string& getPrefixedName() const { return IGetName(); } const std::string& get_display_label() const { if (display_label == "") return IGetName(); else return display_label; } //"FPGA name" is to allow linking to new names w/ for the same FPGA param; //this name can't be changed after initialization const std::string& get_fpga_name() const { if (fpga_name == "") return IGetName(); else return fpga_name; } protected: virtual const std::string& IGetName() const { return name; } virtual bool ISetName(const std::string& name); void SetRevision(int i) { revision = i; } int revision; private: std::string name; std::string display_label; const std::string fpga_name; }; template<class T> class Parameter : public virtual Parameter_Base { public: Parameter(const std::string& name) : Parameter_Base(name) { } virtual ~Parameter() { }; operator T(){ return Value(); } T Value() { UpdateValueFromBackend(); //std::cout << IGetName() << " = " << value << std::endl; return value; } virtual bool SetValue(const T& v) { if (value != v) { revision++; value = v; return true; } else return false; } protected: virtual void UpdateValueFromBackend() { } T value; }; class Uninitialized { public: Uninitialized(const std::string& name) : Name(name) { }; std::string Name; }; std::ostream& operator<<(std::ostream& o, const Uninitialized& u); template <class T> class InputParameter : public Parameter<T> { public: InputParameter(const std::string& sName, InputParameters* pIPs, const std::string& sDefault = "") : Parameter_Base(sName), Parameter<T>(sName), m_pIPs(pIPs) { SetDefault(sDefault); UpdateValueFromBackend(); } virtual ~InputParameter() { } void SetDefault(const std::string& sDefault) { if (!IsInitialized()) m_pIPs->UpdatePair(Parameter_Base::IGetName(), sDefault, 0); } virtual bool SetValue(const T& v) { if (Parameter<T>::SetValue(v)) { m_pIPs->UpdatePair(Parameter_Base::IGetName(), to_string<T>(v), -1); //Parameter_Base::Revision()); // std::cerr << "[SetValue][" << m_pIPs->Name() << "] : " << IGetName() << " = " << v << std::endl; return true; } else return false; } int getBackendRevision() { return m_pIPs->GetRevision(Parameter_Base::IGetName()); } virtual void UpdateValueFromBackend() { int backend_revision = getBackendRevision(); if (backend_revision > Parameter_Base::Revision()) { std::string s = m_pIPs->GetValue(Parameter_Base::IGetName()); if (!s.length()) std::cerr << Parameter_Base::IGetName() << " is uninitialized." << std::endl; Parameter<T>::SetValue(from_string<T>(s)); Parameter_Base::SetRevision( backend_revision ); } } virtual bool IsInitialized() { return m_pIPs->GetValue(Parameter_Base::IGetName()).length() > 0; } virtual bool LinkTo(InputParameter<T>* pIP) { if (!pIP) return false; if (m_pIPs == pIP->m_pIPs) if (Parameter_Base::IGetName() == pIP->IGetName()) return false; Parameter_Base::SetRevision(-1); m_pIPs = pIP->m_pIPs; ISetName(pIP->IGetName()); UpdateValueFromBackend(); return true; } virtual bool LinkTo(InputParameters* pIPs, const std::string& sName) { if (!pIPs) { std::cerr << "[InputParameter_Base::LinkTo] error: pIPs == 0" << std::endl; throw std::runtime_error("[InputParameter_Base::LinkTo] error: pIPs == 0"); } if (m_pIPs == pIPs && Parameter_Base::IGetName() == sName) return false; Parameter_Base::SetRevision(-1); m_pIPs = pIPs; Parameter_Base::ISetName(sName); UpdateValueFromBackend(); return true; } protected: InputParameters* m_pIPs; }; typedef InputParameter<std::string> param_string; typedef InputParameter<double> param_double; typedef InputParameter<int> param_int; template <class T> bool operator==(const T& t, InputParameter<T>& p) { return t == static_cast<T>(p); } template <class T> bool operator==(InputParameter<T>& p, const T& t) { return t == p; } template <class T> std::ostream& operator<<(std::ostream& o, InputParameter<T>& p) { return o << static_cast<T>(p); }
[ "trosen@814e38a0-0077-4020-8740-4f49b76d3b44" ]
[ [ [ 1, 335 ] ] ]
b1c9671b1dc6359f9546e7a274d8b6ac7c372b07
fb4cf44e2c146b26ddde6350180cc420611fe17a
/SDK/CvSelectionGroup.cpp
5626c7f787c8138cec4ccfdba4e2a355df0524f6
[]
no_license
dharkness/civ4bullai
93e0685ef53e404ac4ffa5c1aecf4edaf61acd61
e56c8a4f1172e2d2b15eb87eaa78adb9d357fae6
refs/heads/master
2022-09-15T23:31:55.030351
2010-11-13T07:23:13
2010-11-13T07:23:13
267,723,017
0
0
null
null
null
null
UTF-8
C++
false
false
134,820
cpp
// selectionGroup.cpp #include "CvGameCoreDLL.h" #include "CvGlobals.h" #include "CvSelectionGroup.h" #include "CvGameAI.h" #include "CvPlayerAI.h" #include "CvTeamAI.h" #include "CvUnit.h" #include "CvGameCoreUtils.h" #include "CvMap.h" #include "CvPlot.h" #include "CvDLLEntityIFaceBase.h" #include "CvDLLInterfaceIFaceBase.h" #include "CvDLLFAStarIFaceBase.h" #include "FAStarNode.h" #include "CvInfos.h" #include "FProfiler.h" #include "CyPlot.h" #include "CySelectionGroup.h" #include "CyArgsList.h" #include "CvDLLPythonIFaceBase.h" #include <set> #include "CvEventReporter.h" // BUG - start #include "CvBugOptions.h" // BUG - end /************************************************************************************************/ /* BETTER_BTS_AI_MOD 03/30/10 jdog5000 */ /* */ /* AI Logging */ /************************************************************************************************/ #include "BetterBTSAI.h" /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ // Public Functions... CvSelectionGroup::CvSelectionGroup() { reset(0, NO_PLAYER, true); } CvSelectionGroup::~CvSelectionGroup() { uninit(); } void CvSelectionGroup::init(int iID, PlayerTypes eOwner) { //-------------------------------- // Init saved data reset(iID, eOwner); //-------------------------------- // Init non-saved data //-------------------------------- // Init other game data AI_init(); } void CvSelectionGroup::uninit() { m_units.clear(); m_missionQueue.clear(); } // FUNCTION: reset() // Initializes data members that are serialized. void CvSelectionGroup::reset(int iID, PlayerTypes eOwner, bool bConstructorCall) { //-------------------------------- // Uninit class uninit(); m_iID = iID; m_iMissionTimer = 0; m_bForceUpdate = false; m_eOwner = eOwner; m_eActivityType = ACTIVITY_AWAKE; m_eAutomateType = NO_AUTOMATE; m_bIsBusyCache = false; /************************************************************************************************/ /* BETTER_BTS_AI_MOD 08/19/09 jdog5000 */ /* */ /* General AI */ /************************************************************************************************/ m_bIsStrandedCache = false; m_bIsStrandedCacheValid = false; /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ // BUG - Safe Move - start m_bLastPathPlotChecked = false; m_bLastPlotVisible = false; m_bLastPlotRevealed = false; // BUG - Safe Move - end if (!bConstructorCall) { AI_reset(); } } void CvSelectionGroup::kill() { FAssert(getOwnerINLINE() != NO_PLAYER); FAssertMsg(getID() != FFreeList::INVALID_INDEX, "getID() is not expected to be equal with FFreeList::INVALID_INDEX"); FAssertMsg(getNumUnits() == 0, "The number of units is expected to be 0"); GET_PLAYER(getOwnerINLINE()).removeGroupCycle(getID()); GET_PLAYER(getOwnerINLINE()).deleteSelectionGroup(getID()); } bool CvSelectionGroup::sentryAlert() const { CvUnit* pHeadUnit = NULL; int iMaxRange = 0; CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); int iRange = pLoopUnit->visibilityRange() + 1; if (iRange > iMaxRange) { iMaxRange = iRange; pHeadUnit = pLoopUnit; } } if (NULL != pHeadUnit) { for (int iX = -iMaxRange; iX <= iMaxRange; ++iX) { for (int iY = -iMaxRange; iY <= iMaxRange; ++iY) { CvPlot* pPlot = ::plotXY(pHeadUnit->getX_INLINE(), pHeadUnit->getY_INLINE(), iX, iY); if (NULL != pPlot) { if (pHeadUnit->plot()->canSeePlot(pPlot, pHeadUnit->getTeam(), iMaxRange - 1, NO_DIRECTION)) { if (pPlot->isVisibleEnemyUnit(pHeadUnit)) { return true; } } } } } } return false; } // BUG - Sentry Actions - start #ifdef _MOD_SENTRY /* * Similar to sentryAlert() except only checks water/land plots based on the domain type of the head unit. */ bool CvSelectionGroup::sentryAlertSameDomainType() const { int iMaxRange = 0; CLLNode<IDInfo>* pUnitNode = headUnitNode(); int iIndex = -1; while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); int iRange = pLoopUnit->visibilityRange() + 1; if (iRange > iMaxRange) { iMaxRange = iRange; iIndex = getUnitIndex(pLoopUnit); } } CvUnit* pHeadUnit = ((iIndex == -1) ? NULL : getUnitAt(iIndex)); if (NULL != pHeadUnit) { for (int iX = -iMaxRange; iX <= iMaxRange; ++iX) { for (int iY = -iMaxRange; iY <= iMaxRange; ++iY) { CvPlot* pPlot = ::plotXY(pHeadUnit->getX_INLINE(), pHeadUnit->getY_INLINE(), iX, iY); if (NULL != pPlot) { if (pHeadUnit->plot()->canSeePlot(pPlot, pHeadUnit->getTeam(), iMaxRange - 1, NO_DIRECTION)) { if (pPlot->isVisibleEnemyUnit(pHeadUnit)) { if ((getDomainType() == DOMAIN_SEA) && (pPlot->isWater())) { return true; } else if ((getDomainType() == DOMAIN_LAND) && (!(pPlot->isWater()))) { return true; } } } } } } } return false; } #endif // BUG - Sentry Actions - end void CvSelectionGroup::doTurn() { PROFILE("CvSelectionGroup::doTurn()") CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; int iWaitTurns; int iBestWaitTurns; FAssert(getOwnerINLINE() != NO_PLAYER); if (getNumUnits() > 0) { /************************************************************************************************/ /* BETTER_BTS_AI_MOD 08/19/09 jdog5000 */ /* */ /* General AI */ /************************************************************************************************/ invalidateIsStrandedCache(); /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ bool bHurt = false; // do unit's turns (checking for damage) pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); /************************************************************************************************/ /* Afforess Start 07/30/10 */ /************************************************************************************************/ FAssertMsg((pLoopUnit->plot() == plot()), "Selectiongroup is not on the same tile!"); /************************************************************************************************/ /* Afforess END */ /************************************************************************************************/ pLoopUnit->doTurn(); if (pLoopUnit->isHurt()) { bHurt = true; } } ActivityTypes eActivityType = getActivityType(); // wake unit if skipped last turn // or healing and automated or no longer hurt (automated healing is one turn at a time) // or on sentry and there is danger if ((eActivityType == ACTIVITY_HOLD) || ((eActivityType == ACTIVITY_HEAL) && (AI_isControlled() || !bHurt)) || ((eActivityType == ACTIVITY_SENTRY) && (sentryAlert()))) { setActivityType(ACTIVITY_AWAKE); } // BUG - Sentry Healing and Explorering Units - start if (isHuman()) { // BUG - Sentry Actions - start #ifdef _MOD_SENTRY if (((eActivityType == ACTIVITY_SENTRY_NAVAL_UNITS) && (sentryAlertSameDomainType())) || ((eActivityType == ACTIVITY_SENTRY_LAND_UNITS) && (sentryAlertSameDomainType())) || ((eActivityType == ACTIVITY_SENTRY_WHILE_HEAL) && (sentryAlertSameDomainType() || AI_isControlled() || !bHurt))) { setActivityType(ACTIVITY_AWAKE); } #endif // BUG - Sentry Actions - end // BUG - Sentry Exploring Units - start if (isAutomated() && getAutomateType() == AUTOMATE_EXPLORE && getBugOptionBOOL("Actions__SentryHealing", true, "BUG_SENTRY_HEALING") && sentryAlert()) { if (!(getBugOptionBOOL("Actions__SentryHealingOnlyNeutral", true, "BUG_SENTRY_HEALING_ONLY_NEUTRAL") && plot()->isOwned())) { setActivityType(ACTIVITY_AWAKE); } } // BUG - Sentry Exploring Units - end // BUG - Sentry Healing Units - start if (eActivityType == ACTIVITY_HEAL && getBugOptionBOOL("Actions__SentryHealing", true, "BUG_SENTRY_HEALING") && sentryAlert()) { if (!(getBugOptionBOOL("Actions__SentryHealingOnlyNeutral", true, "BUG_SENTRY_HEALING_ONLY_NEUTRAL") && plot()->isOwned())) { setActivityType(ACTIVITY_AWAKE); } } } // BUG - Sentry Healing and Explorering Units - end /************************************************************************************************/ /* BETTER_BTS_AI_MOD 09/21/08 jdog5000 */ /* */ /* Air AI */ /************************************************************************************************/ // with improvements to launching air patrols, now can wake every turn if ( (eActivityType == ACTIVITY_INTERCEPT) && !isHuman() ) { setActivityType(ACTIVITY_AWAKE); } /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ if (AI_isControlled()) { /************************************************************************************************/ /* BETTER_BTS_AI_MOD 08/20/09 jdog5000 */ /* */ /* Unit AI, Efficiency */ /************************************************************************************************/ //if ((getActivityType() != ACTIVITY_MISSION) || (!canFight() && (GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(plot(), 2) > 0))) if ((getActivityType() != ACTIVITY_MISSION) || (!canFight() && (GET_PLAYER(getOwnerINLINE()).AI_getAnyPlotDanger(plot(), 2)))) /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ { setForceUpdate(true); } } else { if (getActivityType() == ACTIVITY_MISSION) { bool bNonSpy = false; for (CLLNode<IDInfo>* pUnitNode = headUnitNode(); pUnitNode != NULL; pUnitNode = nextUnitNode(pUnitNode)) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); if (!pLoopUnit->isSpy()) { bNonSpy = true; break; } } /************************************************************************************************/ /* BETTER_BTS_AI_MOD 08/20/09 jdog5000 */ /* */ /* Unit AI, Efficiency */ /************************************************************************************************/ //if (bNonSpy && GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(plot(), 2) > 0) if (bNonSpy && GET_PLAYER(getOwnerINLINE()).AI_getAnyPlotDanger(plot(), 2)) /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ { clearMissionQueue(); } } } if (isHuman()) { if (GC.getGameINLINE().isMPOption(MPOPTION_SIMULTANEOUS_TURNS)) { iBestWaitTurns = 0; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); iWaitTurns = (GC.getDefineINT("MIN_TIMER_UNIT_DOUBLE_MOVES") - (GC.getGameINLINE().getTurnSlice() - pLoopUnit->getLastMoveTurn())); if (iWaitTurns > iBestWaitTurns) { iBestWaitTurns = iWaitTurns; } } setMissionTimer(std::max(iBestWaitTurns, getMissionTimer())); if (iBestWaitTurns > 0) { // Cycle selection if the current group is selected CvUnit* pSelectedUnit = gDLL->getInterfaceIFace()->getHeadSelectedUnit(); if (pSelectedUnit && pSelectedUnit->getGroup() == this) { gDLL->getInterfaceIFace()->selectGroup(pSelectedUnit, false, false, false); } } } } } doDelayedDeath(); } bool CvSelectionGroup::showMoves() const { if (GC.getGameINLINE().isMPOption(MPOPTION_SIMULTANEOUS_TURNS) || GC.getGameINLINE().isSimultaneousTeamTurns()) { return false; } for (int iI = 0; iI < MAX_CIV_PLAYERS; iI++) { CvPlayer& kLoopPlayer = GET_PLAYER((PlayerTypes)iI); if (kLoopPlayer.isAlive()) { if (kLoopPlayer.isHuman()) { CvUnit* pHeadUnit = getHeadUnit(); if (NULL != pHeadUnit) { if (pHeadUnit->isEnemy(kLoopPlayer.getTeam())) { if (kLoopPlayer.isOption(PLAYEROPTION_SHOW_ENEMY_MOVES)) { return true; } } else { if (kLoopPlayer.isOption(PLAYEROPTION_SHOW_FRIENDLY_MOVES)) { return true; } } } } } } return false; } void CvSelectionGroup::updateTimers() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; bool bCombat; FAssert(getOwnerINLINE() != NO_PLAYER); if (getNumUnits() > 0) { bCombat = false; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->isCombat()) { if (pLoopUnit->isAirCombat()) { pLoopUnit->updateAirCombat(); } else { pLoopUnit->updateCombat(); } bCombat = true; break; } } if (!bCombat) { updateMission(); } } doDelayedDeath(); } // Returns true if group was killed... bool CvSelectionGroup::doDelayedDeath() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; FAssert(getOwnerINLINE() != NO_PLAYER); if (isBusy()) { return false; } pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); pLoopUnit->doDelayedDeath(); } if (getNumUnits() == 0) { kill(); return true; } return false; } void CvSelectionGroup::playActionSound() { // Pitboss should not be playing sounds! #ifndef PITBOSS CvUnit *pHeadUnit; int iScriptId = -1; pHeadUnit = getHeadUnit(); if ( pHeadUnit ) { iScriptId = pHeadUnit->getArtInfo(0, GET_PLAYER(getOwnerINLINE()).getCurrentEra())->getActionSoundScriptId(); } if ( (iScriptId == -1) && pHeadUnit ) { CvCivilizationInfo *pCivInfo; pCivInfo = &GC.getCivilizationInfo( pHeadUnit->getCivilizationType() ); if ( pCivInfo ) { iScriptId = pCivInfo->getActionSoundScriptId(); } } if ( (iScriptId != -1) && pHeadUnit ) { CvPlot *pPlot = GC.getMapINLINE().plotINLINE(pHeadUnit->getX_INLINE(),pHeadUnit->getY_INLINE()); if ( pPlot ) { gDLL->Do3DSound( iScriptId, pPlot->getPoint() ); } } #endif // n PITBOSS } void CvSelectionGroup::pushMission(MissionTypes eMission, int iData1, int iData2, int iFlags, bool bAppend, bool bManual, MissionAITypes eMissionAI, CvPlot* pMissionAIPlot, CvUnit* pMissionAIUnit) { PROFILE_FUNC(); MissionData mission; FAssert(getOwnerINLINE() != NO_PLAYER); if (!bAppend) { if (isBusy()) { return; } clearMissionQueue(); } if (bManual) { setAutomateType(NO_AUTOMATE); } mission.eMissionType = eMission; mission.iData1 = iData1; mission.iData2 = iData2; mission.iFlags = iFlags; mission.iPushTurn = GC.getGameINLINE().getGameTurn(); AI_setMissionAI(eMissionAI, pMissionAIPlot, pMissionAIUnit); insertAtEndMissionQueue(mission, !bAppend); if (bManual) { if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (isBusy() && GC.getMissionInfo(eMission).isSound()) { playActionSound(); } gDLL->getInterfaceIFace()->setHasMovedUnit(true); } CvEventReporter::getInstance().selectionGroupPushMission(this, eMission); doDelayedDeath(); } } void CvSelectionGroup::popMission() { CLLNode<MissionData>* pTailNode; FAssert(getOwnerINLINE() != NO_PLAYER); pTailNode = tailMissionQueueNode(); if (pTailNode != NULL) { deleteMissionQueueNode(pTailNode); } } void CvSelectionGroup::autoMission() { FAssert(getOwnerINLINE() != NO_PLAYER); if (getNumUnits() > 0) { if (headMissionQueueNode() != NULL) { if (!isBusy()) { bool bVisibleHuman = false; if (isHuman()) { for (CLLNode<IDInfo>* pUnitNode = headUnitNode(); pUnitNode != NULL; pUnitNode = nextUnitNode(pUnitNode)) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); if (!pLoopUnit->alwaysInvisible()) { bVisibleHuman = true; break; } } } /************************************************************************************************/ /* BETTER_BTS_AI_MOD 08/20/09 jdog5000 */ /* */ /* Unit AI, Efficiency */ /************************************************************************************************/ //if (bVisibleHuman && GET_PLAYER(getOwnerINLINE()).AI_getPlotDanger(plot(), 1) > 0) if (bVisibleHuman && GET_PLAYER(getOwnerINLINE()).AI_getAnyPlotDanger(plot(), 1)) /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ { clearMissionQueue(); } else { if (getActivityType() == ACTIVITY_MISSION) { continueMission(); } else { startMission(); } } } } } doDelayedDeath(); } void CvSelectionGroup::updateMission() { FAssert(getOwnerINLINE() != NO_PLAYER); if (getMissionTimer() > 0) { changeMissionTimer(-1); if (getMissionTimer() == 0) { if (getActivityType() == ACTIVITY_MISSION) { continueMission(); } else { if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (gDLL->getInterfaceIFace()->getHeadSelectedUnit() == NULL) { gDLL->getInterfaceIFace()->changeCycleSelectionCounter(1); } } } } } } CvPlot* CvSelectionGroup::lastMissionPlot() { CLLNode<MissionData>* pMissionNode; CvUnit* pTargetUnit; pMissionNode = tailMissionQueueNode(); while (pMissionNode != NULL) { switch (pMissionNode->m_data.eMissionType) { case MISSION_MOVE_TO: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_MOVE_TO_SENTRY: #endif // BUG - Sentry Actions - end case MISSION_ROUTE_TO: return GC.getMapINLINE().plotINLINE(pMissionNode->m_data.iData1, pMissionNode->m_data.iData2); break; case MISSION_MOVE_TO_UNIT: pTargetUnit = GET_PLAYER((PlayerTypes)pMissionNode->m_data.iData1).getUnit(pMissionNode->m_data.iData2); if (pTargetUnit != NULL) { return pTargetUnit->plot(); } break; case MISSION_SKIP: case MISSION_SLEEP: case MISSION_FORTIFY: case MISSION_PLUNDER: case MISSION_AIRPATROL: case MISSION_SEAPATROL: case MISSION_HEAL: case MISSION_SENTRY: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_SENTRY_WHILE_HEAL: case MISSION_SENTRY_NAVAL_UNITS: case MISSION_SENTRY_LAND_UNITS: #endif // BUG - Sentry Actions - end case MISSION_AIRLIFT: case MISSION_NUKE: case MISSION_RECON: case MISSION_PARADROP: case MISSION_AIRBOMB: case MISSION_BOMBARD: case MISSION_RANGE_ATTACK: case MISSION_PILLAGE: case MISSION_SABOTAGE: case MISSION_DESTROY: case MISSION_STEAL_PLANS: case MISSION_FOUND: case MISSION_SPREAD: case MISSION_SPREAD_CORPORATION: case MISSION_JOIN: case MISSION_CONSTRUCT: case MISSION_DISCOVER: case MISSION_HURRY: case MISSION_TRADE: case MISSION_GREAT_WORK: case MISSION_INFILTRATE: case MISSION_GOLDEN_AGE: case MISSION_BUILD: case MISSION_LEAD: case MISSION_ESPIONAGE: case MISSION_DIE_ANIMATION: break; default: FAssert(false); break; } pMissionNode = prevMissionQueueNode(pMissionNode); } return plot(); } bool CvSelectionGroup::canStartMission(int iMission, int iData1, int iData2, CvPlot* pPlot, bool bTestVisible, bool bUseCache) { //PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pTargetUnit; CvUnit* pLoopUnit; //cache isBusy if(bUseCache) { if(m_bIsBusyCache) { return false; } } else { if (isBusy()) { return false; } } if (pPlot == NULL) { pPlot = plot(); } pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); switch (iMission) { // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_MOVE_TO_SENTRY: if (!pLoopUnit->canSentry(NULL)) { return false; } // fall through to next case #endif // BUG - Sentry Actions - end case MISSION_MOVE_TO: if (!(pPlot->at(iData1, iData2))) { return true; } break; case MISSION_ROUTE_TO: if (!(pPlot->at(iData1, iData2)) || (getBestBuildRoute(pPlot) != NO_ROUTE)) { return true; } break; case MISSION_MOVE_TO_UNIT: FAssertMsg(iData1 != NO_PLAYER, "iData1 should be a valid Player"); pTargetUnit = GET_PLAYER((PlayerTypes)iData1).getUnit(iData2); if ((pTargetUnit != NULL) && !(pTargetUnit->atPlot(pPlot))) { return true; } break; case MISSION_SKIP: if (pLoopUnit->canHold(pPlot)) { return true; } break; case MISSION_SLEEP: if (pLoopUnit->canSleep(pPlot)) { return true; } break; case MISSION_FORTIFY: if (pLoopUnit->canFortify(pPlot)) { return true; } break; case MISSION_AIRPATROL: if (pLoopUnit->canAirPatrol(pPlot)) { return true; } break; case MISSION_SEAPATROL: if (pLoopUnit->canSeaPatrol(pPlot)) { return true; } break; case MISSION_HEAL: if (pLoopUnit->canHeal(pPlot)) { return true; } break; case MISSION_SENTRY: if (pLoopUnit->canSentry(pPlot)) { return true; } break; // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_SENTRY_WHILE_HEAL: if ((pLoopUnit->canSentry(pPlot)) && (pLoopUnit->canHeal(pPlot))) { return true; } break; case MISSION_SENTRY_NAVAL_UNITS: if ((getDomainType() == DOMAIN_SEA) && (pLoopUnit->canSentry(pPlot))) { return true; } break; case MISSION_SENTRY_LAND_UNITS: if ((getDomainType() == DOMAIN_LAND) && (pLoopUnit->canSentry(pPlot))) { return true; } break; #endif // BUG - Sentry Actions - end case MISSION_AIRLIFT: if (pLoopUnit->canAirliftAt(pPlot, iData1, iData2)) { return true; } break; case MISSION_NUKE: if (pLoopUnit->canNukeAt(pPlot, iData1, iData2)) { return true; } break; case MISSION_RECON: if (pLoopUnit->canReconAt(pPlot, iData1, iData2)) { return true; } break; case MISSION_PARADROP: if (pLoopUnit->canParadropAt(pPlot, iData1, iData2)) { return true; } break; case MISSION_AIRBOMB: if (pLoopUnit->canAirBombAt(pPlot, iData1, iData2)) { return true; } break; case MISSION_BOMBARD: if (pLoopUnit->canBombard(pPlot)) { return true; } break; case MISSION_RANGE_ATTACK: if (pLoopUnit->canRangeStrikeAt(pPlot, iData1, iData2)) { return true; } break; case MISSION_PLUNDER: if (pLoopUnit->canPlunder(pPlot, bTestVisible)) { return true; } break; case MISSION_PILLAGE: if (pLoopUnit->canPillage(pPlot)) { return true; } break; case MISSION_SABOTAGE: if (pLoopUnit->canSabotage(pPlot, bTestVisible)) { return true; } break; case MISSION_DESTROY: if (pLoopUnit->canDestroy(pPlot, bTestVisible)) { return true; } break; case MISSION_STEAL_PLANS: if (pLoopUnit->canStealPlans(pPlot, bTestVisible)) { return true; } break; case MISSION_FOUND: if (pLoopUnit->canFound(pPlot, bTestVisible)) { return true; } break; case MISSION_SPREAD: if (pLoopUnit->canSpread(pPlot, ((ReligionTypes)iData1), bTestVisible)) { return true; } break; case MISSION_SPREAD_CORPORATION: if (pLoopUnit->canSpreadCorporation(pPlot, ((CorporationTypes)iData1), bTestVisible)) { return true; } break; case MISSION_JOIN: if (pLoopUnit->canJoin(pPlot, ((SpecialistTypes)iData1))) { return true; } break; case MISSION_CONSTRUCT: if (pLoopUnit->canConstruct(pPlot, ((BuildingTypes)iData1), bTestVisible)) { return true; } break; case MISSION_DISCOVER: if (pLoopUnit->canDiscover(pPlot)) { return true; } break; case MISSION_HURRY: if (pLoopUnit->canHurry(pPlot, bTestVisible)) { return true; } break; case MISSION_TRADE: if (pLoopUnit->canTrade(pPlot, bTestVisible)) { return true; } break; case MISSION_GREAT_WORK: if (pLoopUnit->canGreatWork(pPlot)) { return true; } break; case MISSION_INFILTRATE: if (pLoopUnit->canInfiltrate(pPlot, bTestVisible)) { return true; } break; case MISSION_GOLDEN_AGE: //this means to play the animation only if (iData1 != -1) { return true; } if (pLoopUnit->canGoldenAge(pPlot, bTestVisible)) { return true; } break; case MISSION_BUILD: FAssertMsg(((BuildTypes)iData1) < GC.getNumBuildInfos(), "Invalid Build"); if (pLoopUnit->canBuild(pPlot, ((BuildTypes)iData1), bTestVisible)) { return true; } break; case MISSION_LEAD: if (pLoopUnit->canLead(pPlot, iData1)) { return true; } break; case MISSION_ESPIONAGE: if (pLoopUnit->canEspionage(pPlot, bTestVisible)) { return true; } break; case MISSION_DIE_ANIMATION: return false; break; case MISSION_BEGIN_COMBAT: case MISSION_END_COMBAT: case MISSION_AIRSTRIKE: case MISSION_SURRENDER: case MISSION_IDLE: case MISSION_DIE: case MISSION_DAMAGE: case MISSION_MULTI_SELECT: case MISSION_MULTI_DESELECT: break; default: FAssert(false); break; } } return false; } void CvSelectionGroup::startMission() { //PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; bool bDelete; bool bAction; bool bNuke; bool bNotify; FAssert(!isBusy()); FAssert(getOwnerINLINE() != NO_PLAYER); FAssert(headMissionQueueNode() != NULL); if (!GC.getGameINLINE().isMPOption(MPOPTION_SIMULTANEOUS_TURNS)) { if (!GET_PLAYER(getOwnerINLINE()).isTurnActive()) { if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (IsSelected()) { gDLL->getInterfaceIFace()->changeCycleSelectionCounter(1); } } return; } } if (canAllMove()) { setActivityType(ACTIVITY_MISSION); } else { setActivityType(ACTIVITY_HOLD); } bDelete = false; bAction = false; bNuke = false; bNotify = false; if (!canStartMission(headMissionQueueNode()->m_data.eMissionType, headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, plot())) { bDelete = true; } else { FAssertMsg(GET_PLAYER(getOwnerINLINE()).isTurnActive() || GET_PLAYER(getOwnerINLINE()).isHuman(), "It's expected that either the turn is active for this player or the player is human"); switch (headMissionQueueNode()->m_data.eMissionType) { case MISSION_MOVE_TO: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_MOVE_TO_SENTRY: #endif // BUG - Sentry Actions - end // BUG - Safe Move - start // if player is human, save the visibility and reveal state of the last plot of the move path from the initial plot if (isHuman()) { checkLastPathPlot(GC.getMapINLINE().plotINLINE(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)); } break; // BUG - Safe Move - end case MISSION_ROUTE_TO: case MISSION_MOVE_TO_UNIT: break; case MISSION_SKIP: setActivityType(ACTIVITY_HOLD); bDelete = true; break; case MISSION_SLEEP: setActivityType(ACTIVITY_SLEEP); bNotify = true; bDelete = true; break; case MISSION_FORTIFY: setActivityType(ACTIVITY_SLEEP); bNotify = true; bDelete = true; break; case MISSION_PLUNDER: setActivityType(ACTIVITY_PLUNDER); bNotify = true; bDelete = true; break; case MISSION_AIRPATROL: setActivityType(ACTIVITY_INTERCEPT); bDelete = true; break; case MISSION_SEAPATROL: setActivityType(ACTIVITY_PATROL); bDelete = true; break; case MISSION_HEAL: setActivityType(ACTIVITY_HEAL); bNotify = true; bDelete = true; break; case MISSION_SENTRY: setActivityType(ACTIVITY_SENTRY); bNotify = true; bDelete = true; break; // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_SENTRY_WHILE_HEAL: setActivityType(ACTIVITY_SENTRY_WHILE_HEAL); bNotify = true; bDelete = true; break; case MISSION_SENTRY_NAVAL_UNITS: setActivityType(ACTIVITY_SENTRY_NAVAL_UNITS); bNotify = true; bDelete = true; break; case MISSION_SENTRY_LAND_UNITS: setActivityType(ACTIVITY_SENTRY_LAND_UNITS); bNotify = true; bDelete = true; break; #endif // BUG - Sentry Actions - end case MISSION_AIRLIFT: case MISSION_NUKE: case MISSION_RECON: case MISSION_PARADROP: case MISSION_AIRBOMB: case MISSION_BOMBARD: case MISSION_RANGE_ATTACK: case MISSION_PILLAGE: case MISSION_SABOTAGE: case MISSION_DESTROY: case MISSION_STEAL_PLANS: case MISSION_FOUND: case MISSION_SPREAD: case MISSION_SPREAD_CORPORATION: case MISSION_JOIN: case MISSION_CONSTRUCT: case MISSION_DISCOVER: case MISSION_HURRY: case MISSION_TRADE: case MISSION_GREAT_WORK: case MISSION_INFILTRATE: case MISSION_GOLDEN_AGE: case MISSION_BUILD: case MISSION_LEAD: case MISSION_ESPIONAGE: case MISSION_DIE_ANIMATION: break; default: FAssert(false); break; } if ( bNotify ) { NotifyEntity( headMissionQueueNode()->m_data.eMissionType ); } /************************************************************************************************/ /* BETTER_BTS_AI_MOD 03/30/10 jdog5000 */ /* */ /* War tactics AI */ /************************************************************************************************/ if( headMissionQueueNode()->m_data.eMissionType == MISSION_PILLAGE ) { // Fast units pillage first pUnitNode = headUnitNode(); int iMaxMovesLeft = 0; while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if( pLoopUnit->canMove() && pLoopUnit->canPillage(pLoopUnit->plot()) ) { int iMovesLeft = pLoopUnit->movesLeft(); if( pLoopUnit->bombardRate() > 0 ) { iMovesLeft /= 2; } iMovesLeft *= pLoopUnit->currHitPoints(); iMovesLeft /= std::max(1, pLoopUnit->maxHitPoints()); iMaxMovesLeft = std::max( iMaxMovesLeft, iMovesLeft ); } } bool bDidPillage = false; while( iMaxMovesLeft > 0 && !bDidPillage ) { pUnitNode = headUnitNode(); int iNextMaxMovesLeft = 0; while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if( pLoopUnit->canMove() && pLoopUnit->canPillage(pLoopUnit->plot()) ) { int iMovesLeft = pLoopUnit->movesLeft(); if( pLoopUnit->bombardRate() > 0 ) { iMovesLeft /= 2; } iMovesLeft *= pLoopUnit->currHitPoints(); iMovesLeft /= std::max(1, pLoopUnit->maxHitPoints()); if( iMovesLeft >= iMaxMovesLeft ) { if (pLoopUnit->pillage()) { bAction = true; if( isHuman() || canAllMove() ) { bDidPillage = true; break; } } } iNextMaxMovesLeft = std::max( iNextMaxMovesLeft, iMovesLeft ); } } iMaxMovesLeft = iNextMaxMovesLeft; } } else { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canMove()) { switch (headMissionQueueNode()->m_data.eMissionType) { case MISSION_MOVE_TO: case MISSION_ROUTE_TO: case MISSION_MOVE_TO_UNIT: case MISSION_SKIP: case MISSION_SLEEP: case MISSION_FORTIFY: case MISSION_AIRPATROL: case MISSION_SEAPATROL: case MISSION_HEAL: case MISSION_SENTRY: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_MOVE_TO_SENTRY: case MISSION_SENTRY_WHILE_HEAL: case MISSION_SENTRY_NAVAL_UNITS: case MISSION_SENTRY_LAND_UNITS: #endif // BUG - Sentry Actions - end break; case MISSION_AIRLIFT: if (pLoopUnit->airlift(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; } break; case MISSION_NUKE: if (pLoopUnit->nuke(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; if (GC.getMapINLINE().plotINLINE(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)->isVisibleToWatchingHuman()) { bNuke = true; } } break; case MISSION_RECON: if (pLoopUnit->recon(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; } break; case MISSION_PARADROP: if (pLoopUnit->paradrop(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; } break; case MISSION_AIRBOMB: if (pLoopUnit->airBomb(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; } break; case MISSION_BOMBARD: if (pLoopUnit->bombard()) { bAction = true; } break; case MISSION_RANGE_ATTACK: if (pLoopUnit->rangeStrike(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; } break; case MISSION_PILLAGE: if (pLoopUnit->pillage()) { bAction = true; } break; case MISSION_PLUNDER: if (pLoopUnit->plunder()) { bAction = true; } break; case MISSION_SABOTAGE: if (pLoopUnit->sabotage()) { bAction = true; } break; case MISSION_DESTROY: if (pLoopUnit->destroy()) { bAction = true; } break; case MISSION_STEAL_PLANS: if (pLoopUnit->stealPlans()) { bAction = true; } break; case MISSION_FOUND: if (pLoopUnit->found()) { bAction = true; } break; case MISSION_SPREAD: if (pLoopUnit->spread((ReligionTypes)(headMissionQueueNode()->m_data.iData1))) { bAction = true; } break; case MISSION_SPREAD_CORPORATION: if (pLoopUnit->spreadCorporation((CorporationTypes)(headMissionQueueNode()->m_data.iData1))) { bAction = true; } break; case MISSION_JOIN: if (pLoopUnit->join((SpecialistTypes)(headMissionQueueNode()->m_data.iData1))) { bAction = true; } break; case MISSION_CONSTRUCT: if (pLoopUnit->construct((BuildingTypes)(headMissionQueueNode()->m_data.iData1))) { bAction = true; } break; case MISSION_DISCOVER: if (pLoopUnit->discover()) { bAction = true; } break; case MISSION_HURRY: if (pLoopUnit->hurry()) { bAction = true; } break; case MISSION_TRADE: if (pLoopUnit->trade()) { bAction = true; } break; case MISSION_GREAT_WORK: if (pLoopUnit->greatWork()) { bAction = true; } break; case MISSION_INFILTRATE: if (pLoopUnit->infiltrate()) { bAction = true; } break; case MISSION_GOLDEN_AGE: //just play animation, not golden age - JW if (headMissionQueueNode()->m_data.iData1 != -1) { CvMissionDefinition kMission; kMission.setMissionTime(GC.getMissionInfo(MISSION_GOLDEN_AGE).getTime() * gDLL->getSecsPerTurn()); kMission.setUnit(BATTLE_UNIT_ATTACKER, pLoopUnit); kMission.setUnit(BATTLE_UNIT_DEFENDER, NULL); kMission.setPlot(pLoopUnit->plot()); kMission.setMissionType(MISSION_GOLDEN_AGE); gDLL->getEntityIFace()->AddMission(&kMission); pLoopUnit->NotifyEntity(MISSION_GOLDEN_AGE); bAction = true; } else { if (pLoopUnit->goldenAge()) { bAction = true; } } break; case MISSION_BUILD: break; case MISSION_LEAD: if (pLoopUnit->lead(headMissionQueueNode()->m_data.iData1)) { bAction = true; } break; case MISSION_ESPIONAGE: if (pLoopUnit->espionage((EspionageMissionTypes)headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { bAction = true; } pUnitNode = NULL; // allow one unit at a time to do espionage break; case MISSION_DIE_ANIMATION: bAction = true; break; default: FAssert(false); break; } if (getNumUnits() == 0) { break; } if (headMissionQueueNode() == NULL) { break; } } } } } /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ if ((getNumUnits() > 0) && (headMissionQueueNode() != NULL)) { if (bAction) { if (isHuman()) { if (plot()->isVisibleToWatchingHuman()) { updateMissionTimer(); } } } if (bNuke) { setMissionTimer(GC.getMissionInfo(MISSION_NUKE).getTime()); } if (!isBusy()) { if (bDelete) { if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (IsSelected()) { gDLL->getInterfaceIFace()->changeCycleSelectionCounter((GET_PLAYER(getOwnerINLINE()).isOption(PLAYEROPTION_QUICK_MOVES)) ? 1 : 2); } } deleteMissionQueueNode(headMissionQueueNode()); } else if (getActivityType() == ACTIVITY_MISSION) { continueMission(); } } } } void CvSelectionGroup::continueMission(int iSteps) { CvUnit* pTargetUnit; bool bDone; bool bAction; FAssert(!isBusy()); FAssert(headMissionQueueNode() != NULL); FAssert(getOwnerINLINE() != NO_PLAYER); FAssert(getActivityType() == ACTIVITY_MISSION); if (headMissionQueueNode() == NULL) { // just in case... setActivityType(ACTIVITY_AWAKE); return; } bDone = false; bAction = false; if (headMissionQueueNode()->m_data.iPushTurn == GC.getGameINLINE().getGameTurn() || (headMissionQueueNode()->m_data.iFlags & MOVE_THROUGH_ENEMY)) { if (headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO) { bool bFailedAlreadyFighting; if (groupAttack(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, headMissionQueueNode()->m_data.iFlags, bFailedAlreadyFighting)) { bDone = true; } } } // extra crash protection, should never happen (but a previous bug in groupAttack was causing a NULL here) // while that bug is fixed, no reason to not be a little more careful if (headMissionQueueNode() == NULL) { setActivityType(ACTIVITY_AWAKE); return; } if (!bDone) { if (getNumUnits() > 0) { if (canAllMove()) { switch (headMissionQueueNode()->m_data.eMissionType) { case MISSION_MOVE_TO: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_MOVE_TO_SENTRY: #endif // BUG - Sentry Actions - end // BUG - Safe Move - start // if player is human, save the visibility and reveal state of the last plot of the move path from the initial plot // if it hasn't been saved already to handle units in motion when loading a game if (isHuman() && !isLastPathPlotChecked()) { checkLastPathPlot(GC.getMapINLINE().plotINLINE(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)); } // BUG - Safe Move - end if (getDomainType() == DOMAIN_AIR) { groupPathTo(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, headMissionQueueNode()->m_data.iFlags); bDone = true; } else if (groupPathTo(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, headMissionQueueNode()->m_data.iFlags)) { bAction = true; if (getNumUnits() > 0) { if (!canAllMove()) { if (headMissionQueueNode() != NULL) { if (groupAmphibMove(GC.getMapINLINE().plotINLINE(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2), headMissionQueueNode()->m_data.iFlags)) { bAction = false; bDone = true; } } } } } else { bDone = true; } break; case MISSION_ROUTE_TO: if (groupRoadTo(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2, headMissionQueueNode()->m_data.iFlags)) { bAction = true; } else { bDone = true; } break; case MISSION_MOVE_TO_UNIT: if ((getHeadUnitAI() == UNITAI_CITY_DEFENSE) && plot()->isCity() && (plot()->getTeam() == getTeam())) { if (plot()->getBestDefender(getOwnerINLINE())->getGroup() == this) { bAction = false; bDone = true; break; } } pTargetUnit = GET_PLAYER((PlayerTypes)headMissionQueueNode()->m_data.iData1).getUnit(headMissionQueueNode()->m_data.iData2); if (pTargetUnit != NULL) { /************************************************************************************************/ /* BETTER_BTS_AI_MOD 12/07/08 jdog5000 */ /* */ /* General AI */ /************************************************************************************************/ // Handling for mission to retrieve a unit if( AI_getMissionAIType() == MISSIONAI_PICKUP ) { if( !(pTargetUnit->getGroup()->isStranded()) || isFull() || (pTargetUnit->plot() == NULL) ) { bDone = true; bAction = false; break; } CvPlot* pPickupPlot = NULL; CvPlot* pAdjacentPlot = NULL; int iPathTurns; int iBestPathTurns = MAX_INT; /************************************************************************************************/ /* BETTER_BTS_AI_MOD 08/08/09 Maniac & jdog5000 */ /* */ /* General AI */ /************************************************************************************************/ /* original bts code if( (pTargetUnit->plot()->isWater() || pTargetUnit->plot()->isFriendlyCity(*getHeadUnit(), true)) && generatePath(plot(), pTargetUnit->plot(), 0, false, &iPathTurns) ) */ if( (canMoveAllTerrain() || pTargetUnit->plot()->isWater() || pTargetUnit->plot()->isFriendlyCity(*getHeadUnit(), true)) && generatePath(plot(), pTargetUnit->plot(), 0, false, &iPathTurns) ) /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ { pPickupPlot = pTargetUnit->plot(); } else { for (int iI = 0; iI < NUM_DIRECTION_TYPES; iI++) { pAdjacentPlot = plotDirection(pTargetUnit->plot()->getX_INLINE(), pTargetUnit->plot()->getY_INLINE(), ((DirectionTypes)iI)); if (pAdjacentPlot != NULL) { if( atPlot(pAdjacentPlot) ) { pPickupPlot = pAdjacentPlot; break; } if( pAdjacentPlot->isWater() || pAdjacentPlot->isFriendlyCity(*getHeadUnit(), true) ) { if( generatePath(plot(), pAdjacentPlot, 0, true, &iPathTurns) ) { if( iPathTurns < iBestPathTurns ) { pPickupPlot = pAdjacentPlot; iBestPathTurns = iPathTurns; } } } } } } if( pPickupPlot != NULL ) { if( atPlot(pPickupPlot) ) { CLLNode<IDInfo>* pEntityNode; CvUnit* pLoopUnit; pEntityNode = headUnitNode(); while (pEntityNode != NULL) { pLoopUnit = ::getUnit(pEntityNode->m_data); pEntityNode = nextUnitNode(pEntityNode); if( !(pLoopUnit->isFull()) ) { pTargetUnit->getGroup()->setRemoteTransportUnit(pLoopUnit); } } bAction = true; bDone = true; } else { if (groupPathTo(pPickupPlot->getX_INLINE(), pPickupPlot->getY_INLINE(), headMissionQueueNode()->m_data.iFlags)) { bAction = true; } else { bDone = true; } } } else { bDone = true; } break; } /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ if (AI_getMissionAIType() != MISSIONAI_SHADOW && AI_getMissionAIType() != MISSIONAI_GROUP) { if (!plot()->isOwned() || plot()->getOwnerINLINE() == getOwnerINLINE()) { CvPlot* pMissionPlot = pTargetUnit->getGroup()->AI_getMissionAIPlot(); if (pMissionPlot != NULL && NO_TEAM != pMissionPlot->getTeam()) { if (pMissionPlot->isOwned() && pTargetUnit->isPotentialEnemy(pMissionPlot->getTeam(), pMissionPlot)) { bAction = false; bDone = true; break; } } } } if (groupPathTo(pTargetUnit->getX_INLINE(), pTargetUnit->getY_INLINE(), headMissionQueueNode()->m_data.iFlags)) { bAction = true; } else { bDone = true; } } else { bDone = true; } break; case MISSION_SKIP: case MISSION_SLEEP: case MISSION_FORTIFY: case MISSION_PLUNDER: case MISSION_AIRPATROL: case MISSION_SEAPATROL: case MISSION_HEAL: case MISSION_SENTRY: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_SENTRY_WHILE_HEAL: case MISSION_SENTRY_NAVAL_UNITS: case MISSION_SENTRY_LAND_UNITS: #endif // BUG - Sentry Actions - end FAssert(false); break; case MISSION_AIRLIFT: case MISSION_NUKE: case MISSION_RECON: case MISSION_PARADROP: case MISSION_AIRBOMB: case MISSION_BOMBARD: case MISSION_RANGE_ATTACK: case MISSION_PILLAGE: case MISSION_SABOTAGE: case MISSION_DESTROY: case MISSION_STEAL_PLANS: case MISSION_FOUND: case MISSION_SPREAD: case MISSION_SPREAD_CORPORATION: case MISSION_JOIN: case MISSION_CONSTRUCT: case MISSION_DISCOVER: case MISSION_HURRY: case MISSION_TRADE: case MISSION_GREAT_WORK: case MISSION_INFILTRATE: case MISSION_GOLDEN_AGE: case MISSION_LEAD: case MISSION_ESPIONAGE: case MISSION_DIE_ANIMATION: break; case MISSION_BUILD: if (!groupBuild((BuildTypes)(headMissionQueueNode()->m_data.iData1))) { bDone = true; } break; default: FAssert(false); break; } } } } if ((getNumUnits() > 0) && (headMissionQueueNode() != NULL)) { if (!bDone) { switch (headMissionQueueNode()->m_data.eMissionType) { case MISSION_MOVE_TO: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_MOVE_TO_SENTRY: #endif // BUG - Sentry Actions - end if (at(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { // BUG - Safe Move - start clearLastPathPlot(); // BUG - Safe Move - end bDone = true; } break; case MISSION_ROUTE_TO: if (at(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2)) { if (getBestBuildRoute(plot()) == NO_ROUTE) { bDone = true; } } break; case MISSION_MOVE_TO_UNIT: pTargetUnit = GET_PLAYER((PlayerTypes)headMissionQueueNode()->m_data.iData1).getUnit(headMissionQueueNode()->m_data.iData2); if ((pTargetUnit == NULL) || atPlot(pTargetUnit->plot())) { bDone = true; } break; case MISSION_SKIP: case MISSION_SLEEP: case MISSION_FORTIFY: case MISSION_PLUNDER: case MISSION_AIRPATROL: case MISSION_SEAPATROL: case MISSION_HEAL: case MISSION_SENTRY: // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case MISSION_SENTRY_WHILE_HEAL: case MISSION_SENTRY_NAVAL_UNITS: case MISSION_SENTRY_LAND_UNITS: #endif // BUG - Sentry Actions - end FAssert(false); break; case MISSION_AIRLIFT: case MISSION_NUKE: case MISSION_RECON: case MISSION_PARADROP: case MISSION_AIRBOMB: case MISSION_BOMBARD: case MISSION_RANGE_ATTACK: case MISSION_PILLAGE: case MISSION_SABOTAGE: case MISSION_DESTROY: case MISSION_STEAL_PLANS: case MISSION_FOUND: case MISSION_SPREAD: case MISSION_SPREAD_CORPORATION: case MISSION_JOIN: case MISSION_CONSTRUCT: case MISSION_DISCOVER: case MISSION_HURRY: case MISSION_TRADE: case MISSION_GREAT_WORK: case MISSION_INFILTRATE: case MISSION_GOLDEN_AGE: case MISSION_LEAD: case MISSION_ESPIONAGE: case MISSION_DIE_ANIMATION: bDone = true; break; case MISSION_BUILD: // XXX what happens if two separate worker groups are both building the mine... /*if (plot()->getBuildType() != ((BuildTypes)(headMissionQueueNode()->m_data.iData1))) { bDone = true; }*/ break; default: FAssert(false); break; } } } if ((getNumUnits() > 0) && (headMissionQueueNode() != NULL)) { if (bAction) { if (bDone || !canAllMove()) { if (plot()->isVisibleToWatchingHuman()) { updateMissionTimer(iSteps); if (showMoves()) { if (GC.getGameINLINE().getActivePlayer() != NO_PLAYER) { if (getOwnerINLINE() != GC.getGameINLINE().getActivePlayer()) { if (plot()->isActiveVisible(false) && !isInvisible(GC.getGameINLINE().getActiveTeam())) { gDLL->getInterfaceIFace()->lookAt(plot()->getPoint(), CAMERALOOKAT_NORMAL); } } } } } } } if (bDone) { if (!isBusy()) { if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (IsSelected()) { if ((headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO) || // BUG - Sentry Actions - start #ifdef _MOD_SENTRY (headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO_SENTRY) || #endif // BUG - Sentry Actions - end (headMissionQueueNode()->m_data.eMissionType == MISSION_ROUTE_TO) || (headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO_UNIT)) { gDLL->getInterfaceIFace()->changeCycleSelectionCounter((GET_PLAYER(getOwnerINLINE()).isOption(PLAYEROPTION_QUICK_MOVES)) ? 1 : 2); } } } /************************************************************************************************/ /* UNOFFICIAL_PATCH 08/04/09 jdog5000 */ /* */ /* Player interface */ /************************************************************************************************/ /* original bts code deleteMissionQueueNode(headMissionQueueNode()); */ if (!isHuman() || (headMissionQueueNode()->m_data.eMissionType != MISSION_MOVE_TO)) { deleteMissionQueueNode(headMissionQueueNode()); } else { if (canAllMove() || (nextMissionQueueNode(headMissionQueueNode()) == NULL)) { deleteMissionQueueNode(headMissionQueueNode()); } } /************************************************************************************************/ /* UNOFFICIAL_PATCH END */ /************************************************************************************************/ } } else { if (canAllMove()) { continueMission(iSteps + 1); } else if (!isBusy()) { if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (IsSelected()) { gDLL->getInterfaceIFace()->changeCycleSelectionCounter(1); } } } } } } bool CvSelectionGroup::canDoCommand(CommandTypes eCommand, int iData1, int iData2, bool bTestVisible, bool bUseCache) { PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; //cache isBusy if(bUseCache) { if(m_bIsBusyCache) { return false; } } else { if (isBusy()) { return false; } } if(!canEverDoCommand(eCommand, iData1, iData2, bTestVisible, bUseCache)) return false; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canDoCommand(eCommand, iData1, iData2, bTestVisible, false)) { return true; } } return false; } bool CvSelectionGroup::canEverDoCommand(CommandTypes eCommand, int iData1, int iData2, bool bTestVisible, bool bUseCache) { if(eCommand == COMMAND_LOAD) { CLLNode<IDInfo>* pUnitNode = plot()->headUnitNode(); while (pUnitNode != NULL) { CvUnit *pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = plot()->nextUnitNode(pUnitNode); if (!pLoopUnit->isFull()) { return true; } } //no cargo space on this plot return false; } else if(eCommand == COMMAND_UNLOAD) { CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit *pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->isCargo()) { return true; } } //no loaded unit return false; } else if(eCommand == COMMAND_UPGRADE) { if(bUseCache) { //see if any of the different units can upgrade to this unit type for(int i=0;i<(int)m_aDifferentUnitCache.size();i++) { CvUnit *unit = m_aDifferentUnitCache[i]; if(unit->canDoCommand(eCommand, iData1, iData2, bTestVisible, false)) return true; } return false; } } return true; } void CvSelectionGroup::setupActionCache() { //cache busy calculation m_bIsBusyCache = isBusy(); //cache different unit types m_aDifferentUnitCache.erase(m_aDifferentUnitCache.begin(), m_aDifferentUnitCache.end()); CLLNode<IDInfo> *pUnitNode = headUnitNode(); while(pUnitNode != NULL) { CvUnit *unit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if(unit->isReadyForUpgrade()) { UnitTypes unitType = unit->getUnitType(); bool bFound = false; for(int i=0;i<(int)m_aDifferentUnitCache.size();i++) { if(unitType == m_aDifferentUnitCache[i]->getUnitType()) { bFound = true; break; } } if(!bFound) m_aDifferentUnitCache.push_back(unit); } } } // Returns true if one of the units can support the interface mode... bool CvSelectionGroup::canDoInterfaceMode(InterfaceModeTypes eInterfaceMode) { PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; FAssertMsg(eInterfaceMode != NO_INTERFACEMODE, "InterfaceMode is not assigned a valid value"); if (isBusy()) { return false; } pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); switch (eInterfaceMode) { // BUG - Sentry Actions - start #ifdef _MOD_SENTRY case INTERFACEMODE_GO_TO_SENTRY: if (sentryAlertSameDomainType()) { return false; } // fall through to next case #endif // BUG - Sentry Actions - end case INTERFACEMODE_GO_TO: if ((getDomainType() != DOMAIN_AIR) && (getDomainType() != DOMAIN_IMMOBILE)) { return true; } break; case INTERFACEMODE_GO_TO_TYPE: if ((getDomainType() != DOMAIN_AIR) && (getDomainType() != DOMAIN_IMMOBILE)) { if (pLoopUnit->plot()->plotCount(PUF_isUnitType, pLoopUnit->getUnitType(), -1, pLoopUnit->getOwnerINLINE()) > 1) { return true; } } break; case INTERFACEMODE_GO_TO_ALL: if ((getDomainType() != DOMAIN_AIR) && (getDomainType() != DOMAIN_IMMOBILE)) { if (pLoopUnit->plot()->plotCount(NULL, -1, -1, pLoopUnit->getOwnerINLINE()) > 1) { return true; } } break; case INTERFACEMODE_ROUTE_TO: if (pLoopUnit->AI_getUnitAIType() == UNITAI_WORKER) { if (pLoopUnit->canBuildRoute()) { return true; } } break; case INTERFACEMODE_AIRLIFT: if (pLoopUnit->canAirlift(pLoopUnit->plot())) { return true; } break; case INTERFACEMODE_NUKE: if (pLoopUnit->canNuke(pLoopUnit->plot())) { return true; } break; case INTERFACEMODE_RECON: if (pLoopUnit->canRecon(pLoopUnit->plot())) { return true; } break; case INTERFACEMODE_PARADROP: if (pLoopUnit->canParadrop(pLoopUnit->plot())) { return true; } break; case INTERFACEMODE_AIRBOMB: if (pLoopUnit->canAirBomb(pLoopUnit->plot())) { return true; } break; case INTERFACEMODE_RANGE_ATTACK: if (pLoopUnit->canRangeStrike()) { return true; } break; case INTERFACEMODE_AIRSTRIKE: if (pLoopUnit->getDomainType() == DOMAIN_AIR) { if (pLoopUnit->canAirAttack()) { return true; } } break; case INTERFACEMODE_REBASE: if (pLoopUnit->getDomainType() == DOMAIN_AIR) { return true; } break; } pUnitNode = nextUnitNode(pUnitNode); } return false; } // Returns true if one of the units can execute the interface mode at the specified plot... bool CvSelectionGroup::canDoInterfaceModeAt(InterfaceModeTypes eInterfaceMode, CvPlot* pPlot) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; FAssertMsg(eInterfaceMode != NO_INTERFACEMODE, "InterfaceMode is not assigned a valid value"); pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); switch (eInterfaceMode) { case INTERFACEMODE_AIRLIFT: if (pLoopUnit != NULL) { if (pLoopUnit->canAirliftAt(pLoopUnit->plot(), pPlot->getX_INLINE(), pPlot->getY_INLINE())) { return true; } } break; case INTERFACEMODE_NUKE: if (pLoopUnit != NULL) { if (pLoopUnit->canNukeAt(pLoopUnit->plot(), pPlot->getX_INLINE(), pPlot->getY_INLINE())) { return true; } } break; case INTERFACEMODE_RECON: if (pLoopUnit != NULL) { if (pLoopUnit->canReconAt(pLoopUnit->plot(), pPlot->getX_INLINE(), pPlot->getY_INLINE())) { return true; } } break; case INTERFACEMODE_PARADROP: if (pLoopUnit != NULL) { if (pLoopUnit->canParadropAt(pLoopUnit->plot(), pPlot->getX_INLINE(), pPlot->getY_INLINE())) { return true; } } break; case INTERFACEMODE_AIRBOMB: if (pLoopUnit != NULL) { if (pLoopUnit->canAirBombAt(pLoopUnit->plot(), pPlot->getX_INLINE(), pPlot->getY_INLINE())) { return true; } } break; case INTERFACEMODE_RANGE_ATTACK: if (pLoopUnit != NULL) { if (pLoopUnit->canRangeStrikeAt(pLoopUnit->plot(), pPlot->getX_INLINE(), pPlot->getY_INLINE())) { return true; } } break; case INTERFACEMODE_AIRSTRIKE: if (pLoopUnit != NULL) { if (pLoopUnit->canMoveInto(pPlot, true)) { return true; } } break; case INTERFACEMODE_REBASE: if (pLoopUnit != NULL) { if (pLoopUnit->canMoveInto(pPlot)) { return true; } } break; default: return true; break; } pUnitNode = nextUnitNode(pUnitNode); } return false; } bool CvSelectionGroup::isHuman() { if (getOwnerINLINE() != NO_PLAYER) { return GET_PLAYER(getOwnerINLINE()).isHuman(); } return true; } bool CvSelectionGroup::isBusy() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; CvPlot* pPlot; if (getNumUnits() == 0) { return false; } if (getMissionTimer() > 0) { return true; } pPlot = plot(); pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL) { if (pLoopUnit->isCombat()) { return true; } } } return false; } bool CvSelectionGroup::isCargoBusy() { CLLNode<IDInfo>* pUnitNode1; CLLNode<IDInfo>* pUnitNode2; CvUnit* pLoopUnit1; CvUnit* pLoopUnit2; CvPlot* pPlot; if (getNumUnits() == 0) { return false; } pPlot = plot(); pUnitNode1 = headUnitNode(); while (pUnitNode1 != NULL) { pLoopUnit1 = ::getUnit(pUnitNode1->m_data); pUnitNode1 = nextUnitNode(pUnitNode1); if (pLoopUnit1 != NULL) { if (pLoopUnit1->getCargo() > 0) { pUnitNode2 = pPlot->headUnitNode(); while (pUnitNode2 != NULL) { pLoopUnit2 = ::getUnit(pUnitNode2->m_data); pUnitNode2 = pPlot->nextUnitNode(pUnitNode2); if (pLoopUnit2->getTransportUnit() == pLoopUnit1) { if (pLoopUnit2->getGroup()->isBusy()) { return true; } } } } } } return false; } int CvSelectionGroup::baseMoves() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; int iValue; int iBestValue; iBestValue = MAX_INT; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); iValue = pLoopUnit->baseMoves(); if (iValue < iBestValue) { iBestValue = iValue; } } return iBestValue; } bool CvSelectionGroup::isWaiting() const { return ((getActivityType() == ACTIVITY_HOLD) || (getActivityType() == ACTIVITY_SLEEP) || (getActivityType() == ACTIVITY_HEAL) || (getActivityType() == ACTIVITY_SENTRY) || // BUG - Sentry Actions - start #ifdef _MOD_SENTRY (getActivityType() == ACTIVITY_SENTRY_WHILE_HEAL) || (getActivityType() == ACTIVITY_SENTRY_NAVAL_UNITS) || (getActivityType() == ACTIVITY_SENTRY_LAND_UNITS) || #endif // BUG - Sentry Actions - end (getActivityType() == ACTIVITY_PATROL) || (getActivityType() == ACTIVITY_PLUNDER) || (getActivityType() == ACTIVITY_INTERCEPT)); } bool CvSelectionGroup::isFull() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { // do two passes, the first pass, we ignore units with speical cargo int iSpecialCargoCount = 0; int iCargoCount = 0; // first pass, count but ignore special cargo units pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->cargoSpace() > 0) { iCargoCount++; } if (pLoopUnit->specialCargo() != NO_SPECIALUNIT) { iSpecialCargoCount++; } else if (!(pLoopUnit->isFull())) { return false; } } // if every unit in the group has special cargo, then check those, otherwise, consider ourselves full if (iSpecialCargoCount >= iCargoCount) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!(pLoopUnit->isFull())) { return false; } } } return true; } return false; } bool CvSelectionGroup::hasCargo() { CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->hasCargo()) { return true; } } return false; } int CvSelectionGroup::getCargo() const { int iCargoCount = 0; CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); iCargoCount += pLoopUnit->getCargo(); } return iCargoCount; } bool CvSelectionGroup::canAllMove() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); FAssertMsg(pLoopUnit != NULL, "existing node, but NULL unit"); if (pLoopUnit != NULL && !(pLoopUnit->canMove())) { return false; } } return true; } return false; } bool CvSelectionGroup::canAnyMove() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canMove()) { return true; } } return false; } bool CvSelectionGroup::hasMoved() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->hasMoved()) { return true; } } return false; } bool CvSelectionGroup::canEnterTerritory(TeamTypes eTeam, bool bIgnoreRightOfPassage) const { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!(pLoopUnit->canEnterTerritory(eTeam, bIgnoreRightOfPassage))) { return false; } } return true; } return false; } bool CvSelectionGroup::canEnterArea(TeamTypes eTeam, const CvArea* pArea, bool bIgnoreRightOfPassage) const { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!(pLoopUnit->canEnterArea(eTeam, pArea, bIgnoreRightOfPassage))) { return false; } } return true; } return false; } bool CvSelectionGroup::canMoveInto(CvPlot* pPlot, bool bAttack) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canMoveInto(pPlot, bAttack)) { return true; } } } return false; } bool CvSelectionGroup::canMoveOrAttackInto(CvPlot* pPlot, bool bDeclareWar) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canMoveOrAttackInto(pPlot, bDeclareWar)) { return true; } } } return false; } bool CvSelectionGroup::canMoveThrough(CvPlot* pPlot) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!(pLoopUnit->canMoveThrough(pPlot))) { return false; } } return true; } return false; } bool CvSelectionGroup::canFight() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canFight()) { return true; } } return false; } bool CvSelectionGroup::canDefend() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canDefend()) { return true; } } return false; } bool CvSelectionGroup::canBombard(const CvPlot* pPlot) { CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->canBombard(pPlot)) { return true; } } return false; } bool CvSelectionGroup::visibilityRange() { int iMaxRange = 0; CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); int iRange = pLoopUnit->visibilityRange(); if (iRange > iMaxRange) { iMaxRange = iRange; } } return iMaxRange; } /************************************************************************************************/ /* BETTER_BTS_AI_MOD 03/30/10 jdog5000 */ /* */ /* General AI */ /************************************************************************************************/ // // Approximate how many turns this group would take to reduce pCity's defense modifier to zero // int CvSelectionGroup::getBombardTurns(CvCity* pCity) { PROFILE_FUNC(); bool bHasBomber = (getOwnerINLINE() != NO_PLAYER ? (GET_PLAYER(getOwnerINLINE()).AI_calculateTotalBombard(DOMAIN_AIR) > 0) : false); bool bIgnoreBuildingDefense = bHasBomber; int iTotalBombardRate = (bHasBomber ? 16 : 0); int iUnitBombardRate = 0; CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if( pLoopUnit->bombardRate() > 0 ) { iUnitBombardRate = pLoopUnit->bombardRate(); if( pLoopUnit->ignoreBuildingDefense() ) { bIgnoreBuildingDefense = true; } else { iUnitBombardRate *= std::max(25, (100 - pCity->getBuildingBombardDefense())); iUnitBombardRate /= 100; } iTotalBombardRate += iUnitBombardRate; } } if( pCity->getTotalDefense(bIgnoreBuildingDefense) == 0 ) { return 0; } int iBombardTurns = pCity->getTotalDefense(bIgnoreBuildingDefense); if( iTotalBombardRate > 0 ) { iBombardTurns = (GC.getMAX_CITY_DEFENSE_DAMAGE() - pCity->getDefenseDamage()); iBombardTurns *= pCity->getTotalDefense(false); iBombardTurns += (GC.getMAX_CITY_DEFENSE_DAMAGE() * iTotalBombardRate) - 1; iBombardTurns /= std::max(1, (GC.getMAX_CITY_DEFENSE_DAMAGE() * iTotalBombardRate)); } //if( gUnitLogLevel > 2 ) logBBAI(" Bombard of %S will take %d turns at rate %d and current damage %d with bombard def %d", pCity->getName().GetCString(), iBombardTurns, iTotalBombardRate, pCity->getDefenseDamage(), (bIgnoreBuildingDefense ? 0 : pCity->getBuildingBombardDefense())); return iBombardTurns; } bool CvSelectionGroup::isHasPathToAreaPlayerCity( PlayerTypes ePlayer, int iFlags, int iMaxPathTurns ) { PROFILE_FUNC(); CvCity* pLoopCity = NULL; int iLoop; int iPathTurns; for (pLoopCity = GET_PLAYER(ePlayer).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER(ePlayer).nextCity(&iLoop)) { if( pLoopCity->area() == area() ) { if( generatePath(plot(), pLoopCity->plot(), iFlags, true, &iPathTurns) ) { if( (iMaxPathTurns < 0) || (iPathTurns <= iMaxPathTurns) ) { return true; } } } } return false; } bool CvSelectionGroup::isHasPathToAreaEnemyCity( bool bIgnoreMinors, int iFlags, int iMaxPathTurns ) { PROFILE_FUNC(); int iI; int iPass = 0; for( iI = 0; iI < MAX_PLAYERS; iI++ ) { if (GET_PLAYER((PlayerTypes)iI).isAlive() && isPotentialEnemy(getTeam(), GET_PLAYER((PlayerTypes)iI).getTeam()) ) { if( !bIgnoreMinors || (!GET_PLAYER((PlayerTypes)iI).isBarbarian() && !GET_PLAYER((PlayerTypes)iI).isMinorCiv()) ) { if( isHasPathToAreaPlayerCity((PlayerTypes)iI, iFlags, iMaxPathTurns) ) { return true; } } } } return false; } bool CvSelectionGroup::isStranded() { PROFILE_FUNC(); if( !(m_bIsStrandedCacheValid) ) { m_bIsStrandedCache = calculateIsStranded(); m_bIsStrandedCacheValid = true; } return m_bIsStrandedCache; } void CvSelectionGroup::invalidateIsStrandedCache() { m_bIsStrandedCacheValid = false; } bool CvSelectionGroup::calculateIsStranded() { PROFILE_FUNC(); if( getNumUnits() <= 0 ) { return false; } if( plot() == NULL ) { return false; } if( getDomainType() != DOMAIN_LAND ) { return false; } if( (getActivityType() != ACTIVITY_AWAKE) && (getActivityType() != ACTIVITY_HOLD) ) { return false; } if( AI_getMissionAIType() != NO_MISSIONAI ) { return false; } if( getLengthMissionQueue() > 0 ) { return false; } if( !canAllMove() ) { return false; } if( getHeadUnit()->isCargo() ) { return false; } if( plot()->area()->getNumUnrevealedTiles(getTeam()) > 0 ) { if( (getHeadUnitAI() == UNITAI_ATTACK) || (getHeadUnitAI() == UNITAI_EXPLORE) ) { return false; } } int iBestValue; if( (getHeadUnitAI() == UNITAI_SETTLE) && (GET_PLAYER(getOwner()).AI_getNumAreaCitySites(getArea(), iBestValue) > 0) ) { return false; } if( plot()->area()->getCitiesPerPlayer(getOwner()) == 0 ) { int iBestValue; if( (plot()->area()->getNumAIUnits(getOwner(),UNITAI_SETTLE) > 0) && (GET_PLAYER(getOwner()).AI_getNumAreaCitySites(getArea(), iBestValue) > 0) ) { return false; } } if( plot()->area()->getNumCities() > 0 ) { if( getHeadUnit()->AI_getUnitAIType() == UNITAI_SPY ) { return false; } if( plot()->getImprovementType() != NO_IMPROVEMENT ) { if( GC.getImprovementInfo(plot()->getImprovementType()).isActsAsCity() && canDefend() ) { return false; } } if( plot()->isCity() && (plot()->getOwner() == getOwner()) ) { return false; } if( isHasPathToAreaPlayerCity(getOwner()) ) { return false; } if( isHasPathToAreaEnemyCity(false) ) { return false; } } return true; } bool CvSelectionGroup::canMoveAllTerrain() const { PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!(pLoopUnit->canMoveAllTerrain())) { return false; } } return true; } /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ void CvSelectionGroup::unloadAll() { CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL) { pLoopUnit->unloadAll(); } } } bool CvSelectionGroup::alwaysInvisible() const { PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!(pLoopUnit->alwaysInvisible())) { return false; } } return true; } return false; } bool CvSelectionGroup::isInvisible(TeamTypes eTeam) const { if (getNumUnits() > 0) { CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (!pLoopUnit->isInvisible(eTeam, false)) { return false; } } return true; } return false; } int CvSelectionGroup::countNumUnitAIType(UnitAITypes eUnitAI) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; int iCount; FAssertMsg(headUnitNode() != NULL, "headUnitNode() is not expected to be equal with NULL"); iCount = 0; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); // count all units if NO_UNITAI passed in if (NO_UNITAI == eUnitAI || pLoopUnit->AI_getUnitAIType() == eUnitAI) { iCount++; } } return iCount; } bool CvSelectionGroup::hasWorker() { return ((countNumUnitAIType(UNITAI_WORKER) > 0) || (countNumUnitAIType(UNITAI_WORKER_SEA) > 0)); } bool CvSelectionGroup::IsSelected() { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->IsSelected()) { return true; } } return false; } void CvSelectionGroup::NotifyEntity(MissionTypes eMission) { CLLNode<IDInfo>* pUnitNode; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { ::getUnit(pUnitNode->m_data)->NotifyEntity(eMission); pUnitNode = nextUnitNode(pUnitNode); } } void CvSelectionGroup::airCircle(bool bStart) { CLLNode<IDInfo>* pUnitNode; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { ::getUnit(pUnitNode->m_data)->airCircle(bStart); pUnitNode = nextUnitNode(pUnitNode); } } void CvSelectionGroup::setBlockading(bool bStart) { CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { ::getUnit(pUnitNode->m_data)->setBlockading(bStart); pUnitNode = nextUnitNode(pUnitNode); } } int CvSelectionGroup::getX() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return getHeadUnit()->getX_INLINE(); } else { return INVALID_PLOT_COORD; } } int CvSelectionGroup::getY() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return getHeadUnit()->getY_INLINE(); } else { return INVALID_PLOT_COORD; } } bool CvSelectionGroup::at(int iX, int iY) const { return((getX() == iX) && (getY() == iY)); } bool CvSelectionGroup::atPlot( const CvPlot* pPlot) const { return (plot() == pPlot); } CvPlot* CvSelectionGroup::plot() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return getHeadUnit()->plot(); } else { return NULL; } } int CvSelectionGroup::getArea() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return getHeadUnit()->getArea(); } else { return NULL; } } CvArea* CvSelectionGroup::area() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return getHeadUnit()->area(); } else { return NULL; } } DomainTypes CvSelectionGroup::getDomainType() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return getHeadUnit()->getDomainType(); } else { return NO_DOMAIN; } } RouteTypes CvSelectionGroup::getBestBuildRoute(CvPlot* pPlot, BuildTypes* peBestBuild) const { PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; RouteTypes eRoute; RouteTypes eBestRoute; int iValue; int iBestValue; int iI; if (peBestBuild != NULL) { *peBestBuild = NO_BUILD; } iBestValue = 0; eBestRoute = NO_ROUTE; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); for (iI = 0; iI < GC.getNumBuildInfos(); iI++) { eRoute = ((RouteTypes)(GC.getBuildInfo((BuildTypes) iI).getRoute())); if (eRoute != NO_ROUTE) { if (pLoopUnit->canBuild(pPlot, ((BuildTypes)iI))) { iValue = GC.getRouteInfo(eRoute).getValue(); if (iValue > iBestValue) { iBestValue = iValue; eBestRoute = eRoute; if (peBestBuild != NULL) { *peBestBuild = ((BuildTypes)iI); } } } } } } return eBestRoute; } // Returns true if group was bumped... bool CvSelectionGroup::groupDeclareWar(CvPlot* pPlot, bool bForce) { CvTeamAI& kTeam = GET_TEAM(getTeam()); TeamTypes ePlotTeam = pPlot->getTeam(); if (!AI_isDeclareWar(pPlot)) { return false; } int iNumUnits = getNumUnits(); if (bForce || !canEnterArea(ePlotTeam, pPlot->area(), true)) { if (ePlotTeam != NO_TEAM && kTeam.AI_isSneakAttackReady(ePlotTeam)) { if (kTeam.canDeclareWar(ePlotTeam)) { kTeam.declareWar(ePlotTeam, true, NO_WARPLAN); } } } return (iNumUnits != getNumUnits()); } // Returns true if attack was made... bool CvSelectionGroup::groupAttack(int iX, int iY, int iFlags, bool& bFailedAlreadyFighting) { PROFILE_FUNC(); CvPlot* pDestPlot = GC.getMapINLINE().plotINLINE(iX, iY); if (iFlags & MOVE_THROUGH_ENEMY) { if (generatePath(plot(), pDestPlot, iFlags)) { pDestPlot = getPathFirstPlot(); } } FAssertMsg(pDestPlot != NULL, "DestPlot is not assigned a valid value"); bool bStack = (isHuman() && ((getDomainType() == DOMAIN_AIR) || GET_PLAYER(getOwnerINLINE()).isOption(PLAYEROPTION_STACK_ATTACK))); bool bAttack = false; bFailedAlreadyFighting = false; if (getNumUnits() > 0) { if ((getDomainType() == DOMAIN_AIR) || (stepDistance(getX(), getY(), pDestPlot->getX_INLINE(), pDestPlot->getY_INLINE()) == 1)) { if ((iFlags & MOVE_DIRECT_ATTACK) || (getDomainType() == DOMAIN_AIR) || (iFlags & MOVE_THROUGH_ENEMY) || (generatePath(plot(), pDestPlot, iFlags) && (getPathFirstPlot() == pDestPlot))) { int iAttackOdds; CvUnit* pBestAttackUnit = AI_getBestGroupAttacker(pDestPlot, true, iAttackOdds); if (pBestAttackUnit) { // if there are no defenders, do not attack /************************************************************************************************/ /* BETTER_BTS_AI_MOD 02/21/10 jdog5000 */ /* */ /* Lead From Behind */ /************************************************************************************************/ // From Lead From Behind by UncutDragon /* original code CvUnit* pBestDefender = pDestPlot->getBestDefender(NO_PLAYER, getOwnerINLINE(), pBestAttackUnit, true); if (NULL == pBestDefender) { return false; } */ // modified if (!pDestPlot->hasDefender(false, NO_PLAYER, getOwnerINLINE(), pBestAttackUnit, true)) return false; /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ // BUG - Safe Move - start if (isHuman()) { if (!(isLastPathPlotVisible()) && (getDomainType() != DOMAIN_AIR)) { return false; } } // BUG - Safe Move - end bool bNoBlitz = (!pBestAttackUnit->isBlitz() || !pBestAttackUnit->isMadeAttack()); if (groupDeclareWar(pDestPlot)) { return true; } while (true) { pBestAttackUnit = AI_getBestGroupAttacker(pDestPlot, false, iAttackOdds, false, bNoBlitz); if (pBestAttackUnit == NULL) { break; } if (iAttackOdds < 68) { CvUnit * pBestSacrifice = AI_getBestGroupSacrifice(pDestPlot, false, false, bNoBlitz); if (pBestSacrifice != NULL) { pBestAttackUnit = pBestSacrifice; } } bAttack = true; CySelectionGroup* pyGroup = new CySelectionGroup(this); CyPlot* pyPlot = new CyPlot(pDestPlot); CyArgsList argsList; argsList.add(gDLL->getPythonIFace()->makePythonObject(pyGroup)); // pass in Selection Group class argsList.add(gDLL->getPythonIFace()->makePythonObject(pyPlot)); // pass in Plot class long lResult=0; gDLL->getPythonIFace()->callFunction(PYGameModule, "doCombat", argsList.makeFunctionArgs(), &lResult); delete pyGroup; // python fxn must not hold on to this pointer delete pyPlot; // python fxn must not hold on to this pointer if (lResult == 1) { break; } if (getNumUnits() > 1) { if (pBestAttackUnit->plot()->isFighting() || pDestPlot->isFighting()) { bFailedAlreadyFighting = true; } else { pBestAttackUnit->attack(pDestPlot, bStack); } } else { pBestAttackUnit->attack(pDestPlot, false); break; } if (bFailedAlreadyFighting || !bStack) { // if this is AI stack, follow through with the attack to the end if (!isHuman() && getNumUnits() > 1) { AI_queueGroupAttack(iX, iY); } break; } } } } } } return bAttack; } void CvSelectionGroup::groupMove(CvPlot* pPlot, bool bCombat, CvUnit* pCombatUnit, bool bEndMove) { //PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; pUnitNode = headUnitNode(); // BUG - Sentry Actions - start #ifdef _MOD_SENTRY bool bSentryAlert = isHuman() && NULL != headMissionQueueNode() && headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO_SENTRY && sentryAlertSameDomainType(); #endif // BUG - Sentry Actions - end while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); // BUG - Sentry Actions - start #ifdef _MOD_SENTRY // don't move if bSentryAlert set to true above if ((!bSentryAlert && pLoopUnit->canMove() && ((bCombat && (!(pLoopUnit->isNoCapture()) || !(pPlot->isEnemyCity(*pLoopUnit)))) ? pLoopUnit->canMoveOrAttackInto(pPlot) : pLoopUnit->canMoveInto(pPlot))) || (pLoopUnit == pCombatUnit)) #else if ((pLoopUnit->canMove() && ((bCombat && (!(pLoopUnit->isNoCapture()) || !(pPlot->isEnemyCity(*pLoopUnit)))) ? pLoopUnit->canMoveOrAttackInto(pPlot) : pLoopUnit->canMoveInto(pPlot))) || (pLoopUnit == pCombatUnit)) #endif // BUG - Sentry Actions - end { pLoopUnit->move(pPlot, true); } else { pLoopUnit->joinGroup(NULL, true); pLoopUnit->ExecuteMove(((float)(GC.getMissionInfo(MISSION_MOVE_TO).getTime() * gDLL->getMillisecsPerTurn())) / 1000.0f, false); } } //execute move if(bEndMove || !canAllMove()) { pUnitNode = headUnitNode(); while(pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); pLoopUnit->ExecuteMove(((float)(GC.getMissionInfo(MISSION_MOVE_TO).getTime() * gDLL->getMillisecsPerTurn())) / 1000.0f, false); } } } // Returns true if move was made... bool CvSelectionGroup::groupPathTo(int iX, int iY, int iFlags) { CvPlot* pDestPlot; CvPlot* pPathPlot; if (at(iX, iY)) { return false; // XXX is this necessary? } FAssert(!isBusy()); FAssert(getOwnerINLINE() != NO_PLAYER); FAssert(headMissionQueueNode() != NULL); pDestPlot = GC.getMapINLINE().plotINLINE(iX, iY); FAssertMsg(pDestPlot != NULL, "DestPlot is not assigned a valid value"); FAssertMsg(canAllMove(), "canAllMove is expected to be true"); if (getDomainType() == DOMAIN_AIR) { if (!canMoveInto(pDestPlot)) { return false; } pPathPlot = pDestPlot; } else { if (!generatePath(plot(), pDestPlot, iFlags)) { return false; } pPathPlot = getPathFirstPlot(); if (groupAmphibMove(pPathPlot, iFlags)) { return false; } } bool bForce = false; MissionAITypes eMissionAI = AI_getMissionAIType(); if (eMissionAI == MISSIONAI_BLOCKADE || eMissionAI == MISSIONAI_PILLAGE) { bForce = true; } if (groupDeclareWar(pPathPlot, bForce)) { return false; } bool bEndMove = false; if(pPathPlot == pDestPlot) bEndMove = true; groupMove(pPathPlot, iFlags & MOVE_THROUGH_ENEMY, NULL, bEndMove); return true; } // Returns true if move was made... bool CvSelectionGroup::groupRoadTo(int iX, int iY, int iFlags) { CvPlot* pPlot; RouteTypes eBestRoute; BuildTypes eBestBuild; if (!AI_isControlled() || !at(iX, iY) || (getLengthMissionQueue() == 1)) { pPlot = plot(); eBestRoute = getBestBuildRoute(pPlot, &eBestBuild); if (eBestBuild != NO_BUILD) { groupBuild(eBestBuild); return true; } } return groupPathTo(iX, iY, iFlags); } // Returns true if build should continue... bool CvSelectionGroup::groupBuild(BuildTypes eBuild) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; CvPlot* pPlot; bool bContinue; FAssert(getOwnerINLINE() != NO_PLAYER); FAssertMsg(eBuild < GC.getNumBuildInfos(), "Invalid Build"); bContinue = false; pPlot = plot(); ImprovementTypes eImprovement = (ImprovementTypes)GC.getBuildInfo(eBuild).getImprovement(); if (eImprovement != NO_IMPROVEMENT) { if (AI_isControlled()) { if (GET_PLAYER(getOwnerINLINE()).isOption(PLAYEROPTION_SAFE_AUTOMATION)) { if ((pPlot->getImprovementType() != NO_IMPROVEMENT) && (pPlot->getImprovementType() != (ImprovementTypes)(GC.getDefineINT("RUINS_IMPROVEMENT")))) { BonusTypes eBonus = (BonusTypes)pPlot->getNonObsoleteBonusType(GET_PLAYER(getOwnerINLINE()).getTeam()); if ((eBonus == NO_BONUS) || !GC.getImprovementInfo(eImprovement).isImprovementBonusTrade(eBonus)) { if (GC.getImprovementInfo(eImprovement).getImprovementPillage() != NO_IMPROVEMENT) { return false; } } } } // // if (AI_getMissionAIType() == MISSION_BUILD) // { // CvCity* pWorkingCity = pPlot->getWorkingCity(); // if ((pWorkingCity != NULL) && (AI_getMissionAIPlot() == pPlot)) // { // if (pWorkingCity->AI_getBestBuild(pWorkingCity->getCityPlotIndex(pPlot)) != eBuild) // { // return false; // } // } // } } } // BUG - Pre-Chop - start bool bCheckChop = false; bool bStopOtherWorkers = false; FeatureTypes eFeature = pPlot->getFeatureType(); CvBuildInfo& kBuildInfo = GC.getBuildInfo(eBuild); if (eFeature != NO_FEATURE && isHuman() && kBuildInfo.isFeatureRemove(eFeature) && kBuildInfo.getFeatureProduction(eFeature) != 0) { if (kBuildInfo.getImprovement() == NO_IMPROVEMENT) { // clearing a forest or jungle if (getBugOptionBOOL("Actions__PreChopForests", true, "BUG_PRECHOP_FORESTS")) { bCheckChop = true; } } else { if (getBugOptionBOOL("Actions__PreChopImprovements", true, "BUG_PRECHOP_IMPROVEMENTS")) { bCheckChop = true; } } } // BUG - Pre-Chop - end pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); FAssertMsg(pLoopUnit->atPlot(pPlot), "pLoopUnit is expected to be at pPlot"); if (pLoopUnit->canBuild(pPlot, eBuild)) { bContinue = true; if (pLoopUnit->build(eBuild)) { bContinue = false; break; } // BUG - Pre-Chop - start if (bCheckChop && pPlot->getBuildTurnsLeft(eBuild, getOwnerINLINE()) == 1) { // TODO: stop other worker groups CvCity* pCity; int iProduction = plot()->getFeatureProduction(eBuild, getTeam(), &pCity); if (iProduction > 0) { CvWString szBuffer = gDLL->getText("TXT_KEY_BUG_PRECLEARING_FEATURE_BONUS", GC.getFeatureInfo(eFeature).getTextKeyWide(), iProduction, pCity->getNameKey()); gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, ARTFILEMGR.getInterfaceArtInfo("WORLDBUILDER_CITY_EDIT")->getPath(), MESSAGE_TYPE_INFO, GC.getFeatureInfo(eFeature).getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_WHITE"), getX(), getY(), true, true); } bContinue = false; bStopOtherWorkers = true; break; } // BUG - Pre-Chop - end } } // BUG - Pre-Chop - start if (bStopOtherWorkers) { pUnitNode = pPlot->headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = pPlot->nextUnitNode(pUnitNode); CvSelectionGroup* pSelectionGroup = pLoopUnit->getGroup(); if (pSelectionGroup != NULL && pSelectionGroup != this && pSelectionGroup->getOwnerINLINE() == getOwnerINLINE() && pSelectionGroup->getActivityType() == ACTIVITY_MISSION && pSelectionGroup->getLengthMissionQueue() > 0 && pSelectionGroup->getMissionType(0) == kBuildInfo.getMissionType() && pSelectionGroup->getMissionData1(0) == eBuild) { pSelectionGroup->deleteMissionQueueNode(pSelectionGroup->headMissionQueueNode()); } } } // BUG - Pre-Chop - end return bContinue; } /************************************************************************************************/ /* BETTER_BTS_AI_MOD 04/18/10 jdog5000 */ /* */ /* General AI */ /************************************************************************************************/ void CvSelectionGroup::setTransportUnit(CvUnit* pTransportUnit, CvSelectionGroup** pOtherGroup) { // if we are loading if (pTransportUnit != NULL) { CvUnit* pHeadUnit = getHeadUnit(); FAssertMsg(pHeadUnit != NULL, "non-zero group without head unit"); int iCargoSpaceAvailable = pTransportUnit->cargoSpaceAvailable(pHeadUnit->getSpecialUnitType(), pHeadUnit->getDomainType()); // if no space at all, give up if (iCargoSpaceAvailable < 1) { return; } // if there is space, but not enough to fit whole group, then split us, and set on the new group if (iCargoSpaceAvailable < getNumUnits()) { CvSelectionGroup* pSplitGroup = splitGroup(iCargoSpaceAvailable, NULL, pOtherGroup); if (pSplitGroup != NULL) { pSplitGroup->setTransportUnit(pTransportUnit); } return; } FAssertMsg(iCargoSpaceAvailable >= getNumUnits(), "cargo size too small"); // setTransportUnit removes the unit from the current group (at least currently), so we have to be careful in the loop here // so, loop until we do not load one bool bLoadedOne; do { bLoadedOne = false; // loop over all the units, finding one to load CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL && !bLoadedOne) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); // just in case implementation of setTransportUnit changes, check to make sure this unit is not already loaded if (pLoopUnit != NULL && pLoopUnit->getTransportUnit() != pTransportUnit) { // if there is room, load the unit and stop the loop (since setTransportUnit ungroups this unit currently) bool bSpaceAvailable = pTransportUnit->cargoSpaceAvailable(pLoopUnit->getSpecialUnitType(), pLoopUnit->getDomainType()); if (bSpaceAvailable) { pLoopUnit->setTransportUnit(pTransportUnit); bLoadedOne = true; } } } } while (bLoadedOne); } // otherwise we are unloading else { // loop over all the units, unloading them CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL) { // unload unit pLoopUnit->setTransportUnit(NULL); } } } } /// \brief Function for loading stranded units onto an offshore transport /// void CvSelectionGroup::setRemoteTransportUnit(CvUnit* pTransportUnit) { // if we are loading if (pTransportUnit != NULL) { CvUnit* pHeadUnit = getHeadUnit(); FAssertMsg(pHeadUnit != NULL, "non-zero group without head unit"); int iCargoSpaceAvailable = pTransportUnit->cargoSpaceAvailable(pHeadUnit->getSpecialUnitType(), pHeadUnit->getDomainType()); // if no space at all, give up if (iCargoSpaceAvailable < 1) { return; } // if there is space, but not enough to fit whole group, then split us, and set on the new group if (iCargoSpaceAvailable < getNumUnits()) { CvSelectionGroup* pSplitGroup = splitGroup(iCargoSpaceAvailable); if (pSplitGroup != NULL) { pSplitGroup->setRemoteTransportUnit(pTransportUnit); } return; } FAssertMsg(iCargoSpaceAvailable >= getNumUnits(), "cargo size too small"); bool bLoadedOne; do { bLoadedOne = false; // loop over all the units on the plot, looping through this selection group did not work CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL && !bLoadedOne) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL && pLoopUnit->getTransportUnit() != pTransportUnit && pLoopUnit->getOwnerINLINE() == pTransportUnit->getOwnerINLINE()) { bool bSpaceAvailable = pTransportUnit->cargoSpaceAvailable(pLoopUnit->getSpecialUnitType(), pLoopUnit->getDomainType()); if (bSpaceAvailable) { if( !(pLoopUnit->atPlot(pTransportUnit->plot())) ) { // Putting a land unit on water automatically loads it pLoopUnit->setXY(pTransportUnit->getX_INLINE(),pTransportUnit->getY_INLINE()); } if( pLoopUnit->getTransportUnit() != pTransportUnit ) { pLoopUnit->setTransportUnit(pTransportUnit); } bLoadedOne = true; } } } } while (bLoadedOne); } // otherwise we are unloading else { // loop over all the units, unloading them CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL) { // unload unit pLoopUnit->setTransportUnit(NULL); } } } } bool CvSelectionGroup::isAmphibPlot(const CvPlot* pPlot) const { bool bFriendly = true; CvUnit* pUnit = getHeadUnit(); if (NULL != pUnit) { bFriendly = pPlot->isFriendlyCity(*pUnit, true); } //return ((getDomainType() == DOMAIN_SEA) && pPlot->isCoastalLand() && !bFriendly && !canMoveAllTerrain()); if (getDomainType() == DOMAIN_SEA) { if (pPlot->isCity() && !bFriendly && (pPlot->isCoastalLand() || pPlot->isWater() || canMoveAllTerrain())) { return true; } return (pPlot->isCoastalLand() && !bFriendly && !canMoveAllTerrain()); } return false; } /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ // Returns true if attempted an amphib landing... bool CvSelectionGroup::groupAmphibMove(CvPlot* pPlot, int iFlags) { CLLNode<IDInfo>* pUnitNode1; CvUnit* pLoopUnit1; bool bLanding = false; FAssert(getOwnerINLINE() != NO_PLAYER); if (groupDeclareWar(pPlot)) { return true; } if (isAmphibPlot(pPlot)) { // BUG - Safe Move - start // don't perform amphibious landing on plot that was unrevealed when goto order was issued if (isHuman()) { if (!isLastPathPlotRevealed()) { return false; } } // BUG - Safe Move - end if (stepDistance(getX(), getY(), pPlot->getX_INLINE(), pPlot->getY_INLINE()) == 1) { pUnitNode1 = headUnitNode(); // BBAI TODO: Bombard with warships if invading while (pUnitNode1 != NULL) { pLoopUnit1 = ::getUnit(pUnitNode1->m_data); pUnitNode1 = nextUnitNode(pUnitNode1); if ((pLoopUnit1->getCargo() > 0) && (pLoopUnit1->domainCargo() == DOMAIN_LAND)) { std::vector<CvUnit*> aCargoUnits; pLoopUnit1->getCargoUnits(aCargoUnits); std::vector<CvSelectionGroup*> aCargoGroups; for (uint i = 0; i < aCargoUnits.size(); ++i) { CvSelectionGroup* pGroup = aCargoUnits[i]->getGroup(); if (std::find(aCargoGroups.begin(), aCargoGroups.end(), pGroup) == aCargoGroups.end()) { aCargoGroups.push_back(aCargoUnits[i]->getGroup()); } } for (uint i = 0; i < aCargoGroups.size(); ++i) { CvSelectionGroup* pGroup = aCargoGroups[i]; if (pGroup->canAllMove()) { FAssert(!pGroup->at(pPlot->getX_INLINE(), pPlot->getY_INLINE())); pGroup->pushMission(MISSION_MOVE_TO, pPlot->getX_INLINE(), pPlot->getY_INLINE(), (MOVE_IGNORE_DANGER | iFlags)); bLanding = true; } } } } } } return bLanding; } bool CvSelectionGroup::readyToSelect(bool bAny) { return (readyToMove(bAny) && !isAutomated()); } bool CvSelectionGroup::readyToMove(bool bAny) { return (((bAny) ? canAnyMove() : canAllMove()) && (headMissionQueueNode() == NULL) && (getActivityType() == ACTIVITY_AWAKE) && !isBusy() && !isCargoBusy()); } bool CvSelectionGroup::readyToAuto() { return (canAllMove() && (headMissionQueueNode() != NULL)); } int CvSelectionGroup::getID() const { return m_iID; } void CvSelectionGroup::setID(int iID) { m_iID = iID; } PlayerTypes CvSelectionGroup::getOwner() const { return getOwnerINLINE(); } TeamTypes CvSelectionGroup::getTeam() const { if (getOwnerINLINE() != NO_PLAYER) { return GET_PLAYER(getOwnerINLINE()).getTeam(); } return NO_TEAM; } int CvSelectionGroup::getMissionTimer() const { return m_iMissionTimer; } void CvSelectionGroup::setMissionTimer(int iNewValue) { FAssert(getOwnerINLINE() != NO_PLAYER); m_iMissionTimer = iNewValue; FAssert(getMissionTimer() >= 0); } void CvSelectionGroup::changeMissionTimer(int iChange) { setMissionTimer(getMissionTimer() + iChange); } void CvSelectionGroup::updateMissionTimer(int iSteps) { CvUnit* pTargetUnit; CvPlot* pTargetPlot; int iTime; if (!isHuman() && !showMoves()) { iTime = 0; } else if (headMissionQueueNode() != NULL) { iTime = GC.getMissionInfo((MissionTypes)(headMissionQueueNode()->m_data.eMissionType)).getTime(); if ((headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO) || // BUG - Sentry Actions - start #ifdef _MOD_SENTRY (headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO_SENTRY) || #endif // BUG - Sentry Actions - end (headMissionQueueNode()->m_data.eMissionType == MISSION_ROUTE_TO) || (headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO_UNIT)) { if (headMissionQueueNode()->m_data.eMissionType == MISSION_MOVE_TO_UNIT) { pTargetUnit = GET_PLAYER((PlayerTypes)headMissionQueueNode()->m_data.iData1).getUnit(headMissionQueueNode()->m_data.iData2); if (pTargetUnit != NULL) { pTargetPlot = pTargetUnit->plot(); } else { pTargetPlot = NULL; } } else { pTargetPlot = GC.getMapINLINE().plotINLINE(headMissionQueueNode()->m_data.iData1, headMissionQueueNode()->m_data.iData2); } if (atPlot(pTargetPlot)) { iTime += iSteps; } else { iTime = std::min(iTime, 2); } } if (isHuman() && (isAutomated() || (GET_PLAYER((GC.getGameINLINE().isNetworkMultiPlayer()) ? getOwnerINLINE() : GC.getGameINLINE().getActivePlayer()).isOption(PLAYEROPTION_QUICK_MOVES)))) { iTime = std::min(iTime, 1); } } else { iTime = 0; } setMissionTimer(iTime); } bool CvSelectionGroup::isForceUpdate() { return m_bForceUpdate; } void CvSelectionGroup::setForceUpdate(bool bNewValue) { m_bForceUpdate = bNewValue; } ActivityTypes CvSelectionGroup::getActivityType() const { return m_eActivityType; } void CvSelectionGroup::setActivityType(ActivityTypes eNewValue) { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; CvPlot* pPlot; FAssert(getOwnerINLINE() != NO_PLAYER); /************************************************************************************************/ /* BETTER_BTS_AI_MOD 04/28/10 jdog5000 */ /* */ /* Unit AI */ /************************************************************************************************/ // For debugging activities, but can cause crashes very occasionally times //FAssert(isHuman() || getHeadUnit()->isCargo() || eNewValue != ACTIVITY_SLEEP); /************************************************************************************************/ /* BETTER_BTS_AI_MOD END */ /************************************************************************************************/ ActivityTypes eOldActivity = getActivityType(); if (eOldActivity != eNewValue) { pPlot = plot(); if (eOldActivity == ACTIVITY_INTERCEPT) { airCircle(false); } setBlockading(false); m_eActivityType = eNewValue; if (getActivityType() == ACTIVITY_INTERCEPT) { airCircle(true); } if (getActivityType() != ACTIVITY_MISSION) { pUnitNode = headUnitNode(); if (getActivityType() != ACTIVITY_INTERCEPT) { //don't idle intercept animation while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); pLoopUnit->NotifyEntity(MISSION_IDLE); } } if (getTeam() == GC.getGameINLINE().getActiveTeam()) { if (pPlot != NULL) { pPlot->setFlagDirty(true); } } } if (pPlot == gDLL->getInterfaceIFace()->getSelectionPlot()) { gDLL->getInterfaceIFace()->setDirty(PlotListButtons_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true); } } } AutomateTypes CvSelectionGroup::getAutomateType() const { return m_eAutomateType; } bool CvSelectionGroup::isAutomated() { return (getAutomateType() != NO_AUTOMATE); } void CvSelectionGroup::setAutomateType(AutomateTypes eNewValue) { FAssert(getOwnerINLINE() != NO_PLAYER); if (getAutomateType() != eNewValue) { m_eAutomateType = eNewValue; clearMissionQueue(); setActivityType(ACTIVITY_AWAKE); // if canceling automation, cancel on cargo as well if (eNewValue == NO_AUTOMATE) { CvPlot* pPlot = plot(); if (pPlot != NULL) { CLLNode<IDInfo>* pUnitNode = pPlot->headUnitNode(); while (pUnitNode != NULL) { CvUnit* pCargoUnit = ::getUnit(pUnitNode->m_data); pUnitNode = pPlot->nextUnitNode(pUnitNode); CvUnit* pTransportUnit = pCargoUnit->getTransportUnit(); if (pTransportUnit != NULL && pTransportUnit->getGroup() == this) { pCargoUnit->getGroup()->setAutomateType(NO_AUTOMATE); pCargoUnit->getGroup()->setActivityType(ACTIVITY_AWAKE); } } } } } } FAStarNode* CvSelectionGroup::getPathLastNode() const { return gDLL->getFAStarIFace()->GetLastNode(&GC.getPathFinder()); } CvPlot* CvSelectionGroup::getPathFirstPlot() const { FAStarNode* pNode; pNode = getPathLastNode(); if (pNode->m_pParent == NULL) { return GC.getMapINLINE().plotSorenINLINE(pNode->m_iX, pNode->m_iY); } while (pNode != NULL) { if (pNode->m_pParent->m_pParent == NULL) { return GC.getMapINLINE().plotSorenINLINE(pNode->m_iX, pNode->m_iY); } pNode = pNode->m_pParent; } FAssert(false); return NULL; } CvPlot* CvSelectionGroup::getPathEndTurnPlot() const { FAStarNode* pNode; pNode = getPathLastNode(); if (NULL != pNode) { if ((pNode->m_pParent == NULL) || (pNode->m_iData2 == 1)) { return GC.getMapINLINE().plotSorenINLINE(pNode->m_iX, pNode->m_iY); } while (pNode->m_pParent != NULL) { if (pNode->m_pParent->m_iData2 == 1) { return GC.getMapINLINE().plotSorenINLINE(pNode->m_pParent->m_iX, pNode->m_pParent->m_iY); } pNode = pNode->m_pParent; } } FAssert(false); return NULL; } bool CvSelectionGroup::generatePath( const CvPlot* pFromPlot, const CvPlot* pToPlot, int iFlags, bool bReuse, int* piPathTurns) const { PROFILE("CvSelectionGroup::generatePath()") FAStarNode* pNode; bool bSuccess; gDLL->getFAStarIFace()->SetData(&GC.getPathFinder(), this); bSuccess = gDLL->getFAStarIFace()->GeneratePath(&GC.getPathFinder(), pFromPlot->getX_INLINE(), pFromPlot->getY_INLINE(), pToPlot->getX_INLINE(), pToPlot->getY_INLINE(), false, iFlags, bReuse); if (piPathTurns != NULL) { *piPathTurns = MAX_INT; if (bSuccess) { pNode = getPathLastNode(); if (pNode != NULL) { *piPathTurns = pNode->m_iData2; } } } return bSuccess; } void CvSelectionGroup::resetPath() { gDLL->getFAStarIFace()->ForceReset(&GC.getPathFinder()); } void CvSelectionGroup::clearUnits() { CLLNode<IDInfo>* pUnitNode; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pUnitNode = deleteUnitNode(pUnitNode); } } // Returns true if the unit is added... bool CvSelectionGroup::addUnit(CvUnit* pUnit, bool bMinimalChange) { //PROFILE_FUNC(); CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; bool bAdded; if (!(pUnit->canJoinGroup(pUnit->plot(), this))) { return false; } bAdded = false; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); if ((pUnit->AI_groupFirstVal() > pLoopUnit->AI_groupFirstVal()) || ((pUnit->AI_groupFirstVal() == pLoopUnit->AI_groupFirstVal()) && (pUnit->AI_groupSecondVal() > pLoopUnit->AI_groupSecondVal()))) { m_units.insertBefore(pUnit->getIDInfo(), pUnitNode); bAdded = true; break; } pUnitNode = nextUnitNode(pUnitNode); } if (!bAdded) { m_units.insertAtEnd(pUnit->getIDInfo()); } if(!bMinimalChange) { if (getOwnerINLINE() == NO_PLAYER) { if (getNumUnits() > 0) { pUnitNode = headUnitNode(); while (pUnitNode != NULL) { //if (pUnitNode != headUnitNode()) //{ ::getUnit(pUnitNode->m_data)->NotifyEntity(MISSION_MULTI_SELECT); //} pUnitNode = nextUnitNode(pUnitNode); } } } } return true; } void CvSelectionGroup::removeUnit(CvUnit* pUnit) { CLLNode<IDInfo>* pUnitNode; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { if (::getUnit(pUnitNode->m_data) == pUnit) { deleteUnitNode(pUnitNode); break; } else { pUnitNode = nextUnitNode(pUnitNode); } } } CLLNode<IDInfo>* CvSelectionGroup::deleteUnitNode(CLLNode<IDInfo>* pNode) { CLLNode<IDInfo>* pNextUnitNode; if (getOwnerINLINE() != NO_PLAYER) { setAutomateType(NO_AUTOMATE); clearMissionQueue(); switch (getActivityType()) { case ACTIVITY_SLEEP: case ACTIVITY_INTERCEPT: case ACTIVITY_PATROL: case ACTIVITY_PLUNDER: break; default: setActivityType(ACTIVITY_AWAKE); break; } } pNextUnitNode = m_units.deleteNode(pNode); return pNextUnitNode; } CLLNode<IDInfo>* CvSelectionGroup::nextUnitNode(CLLNode<IDInfo>* pNode) const { return m_units.next(pNode); } int CvSelectionGroup::getNumUnits() const { return m_units.getLength(); } void CvSelectionGroup::mergeIntoGroup(CvSelectionGroup* pSelectionGroup) { CvPlayerAI& kPlayer = GET_PLAYER(getOwnerINLINE()); // merge groups, but make sure we do not change the head unit AI // this means that if a new unit is going to become the head, change its AI to match, if possible // AI_setUnitAIType removes the unit from the current group (at least currently), so we have to be careful in the loop here // so, loop until we have not changed unit AIs bool bChangedUnitAI; do { bChangedUnitAI = false; // loop over all the units, moving them to the new group, // stopping if we had to change a unit AI, because doing so removes that unit from our group, so we have to start over CLLNode<IDInfo>* pUnitNode = headUnitNode(); while (pUnitNode != NULL && !bChangedUnitAI) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL) { UnitAITypes eUnitAI = pLoopUnit->AI_getUnitAIType(); // if the unitAIs are different, and the loop unit has a higher val, then the group unitAI would change // change this UnitAI to the old group UnitAI if possible CvUnit* pNewHeadUnit = pSelectionGroup->getHeadUnit(); UnitAITypes eNewHeadUnitAI = pSelectionGroup->getHeadUnitAI(); if (pNewHeadUnit!= NULL && eUnitAI != eNewHeadUnitAI && pLoopUnit->AI_groupFirstVal() > pNewHeadUnit->AI_groupFirstVal()) { // non-zero AI_unitValue means that this UnitAI is valid for this unit (that is the check used everywhere) if (kPlayer.AI_unitValue(pLoopUnit->getUnitType(), eNewHeadUnitAI, NULL) > 0) { // this will remove pLoopUnit from the current group pLoopUnit->AI_setUnitAIType(eNewHeadUnitAI); bChangedUnitAI = true; } } pLoopUnit->joinGroup(pSelectionGroup); } } } while (bChangedUnitAI); } // split this group into two new groups, one of iSplitSize, the other the remaining units // split up each unit AI type as evenly as possible CvSelectionGroup* CvSelectionGroup::splitGroup(int iSplitSize, CvUnit* pNewHeadUnit, CvSelectionGroup** ppOtherGroup) { FAssertMsg(iSplitSize > 0, "non-positive splitGroup size"); if (!(iSplitSize > 0)) { return NULL; } // are we already small enough? if (getNumUnits() <= iSplitSize) { return this; } CLLNode<IDInfo>* pUnitNode = headUnitNode(); CvUnit* pOldHeadUnit = ::getUnit(pUnitNode->m_data); FAssertMsg(pOldHeadUnit != NULL, "non-zero group without head unit"); if (pOldHeadUnit == NULL) { return NULL; } UnitAITypes eOldHeadAI = pOldHeadUnit->AI_getUnitAIType(); // if pNewHeadUnit NULL, then we will use our current head to head the new split group of target size if (pNewHeadUnit == NULL) { pNewHeadUnit = pOldHeadUnit; } // the AI of the new head (the remainder will get the AI of the old head) // UnitAITypes eNewHeadAI = pNewHeadUnit->AI_getUnitAIType(); // pRemainderHeadUnit is the head unit of the group that contains the remainder of units CvUnit* pRemainderHeadUnit = NULL; // if the new head is not the old head, then make the old head the remainder head bool bSplitingHead = (pOldHeadUnit == pNewHeadUnit); if (!bSplitingHead) { pRemainderHeadUnit = pOldHeadUnit; } // try to find remainder head with same AI as head, if we cannot find one, we will split the rest of the group up if (pRemainderHeadUnit == NULL) { // loop over all the units pUnitNode = headUnitNode(); while (pUnitNode != NULL && pRemainderHeadUnit == NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL && pLoopUnit != pNewHeadUnit) { UnitAITypes eLoopUnitAI = pLoopUnit->AI_getUnitAIType(); if (eLoopUnitAI == eOldHeadAI) { pRemainderHeadUnit = pLoopUnit; } } } } CvSelectionGroup* pSplitGroup = NULL; CvSelectionGroup* pRemainderGroup = NULL; // make the new group for the new head pNewHeadUnit->joinGroup(NULL); pSplitGroup = pNewHeadUnit->getGroup(); FAssertMsg(pSplitGroup != NULL, "join resulted in NULL group"); // make a new group for the remainder, if non-null if (pRemainderHeadUnit != NULL) { pRemainderHeadUnit->joinGroup(NULL); pRemainderGroup = pRemainderHeadUnit->getGroup(); FAssertMsg(pRemainderGroup != NULL, "join resulted in NULL group"); } // loop until this group is empty, trying to move different AI types each time //Exhibit of why i HATE iustus code sometimes //unsigned int unitAIBitField = 0; //setBit(unitAIBitField, eNewHeadAI); bool abUnitAIField[NUM_UNITAI_TYPES]; for (int iI = 0; iI < NUM_UNITAI_TYPES; iI++) { abUnitAIField[iI] = false; } while (getNumUnits()) { UnitAITypes eTargetUnitAI = NO_UNITAI; // loop over all the units, find the next different UnitAI and move one of each bool bDestinationSplit = (pSplitGroup->getNumUnits() < iSplitSize); pUnitNode = headUnitNode(); while (pUnitNode != NULL) { CvUnit* pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit != NULL) { UnitAITypes eLoopUnitAI = pLoopUnit->AI_getUnitAIType(); // if we have not found a new type to move, is this a new unitai? // note, if there eventually are unitAIs above 31, we will just always move those, which is fine if (eTargetUnitAI == NO_UNITAI && !abUnitAIField[eLoopUnitAI]) { eTargetUnitAI = eLoopUnitAI; abUnitAIField[eLoopUnitAI] = true; } // is this the right UnitAI? if (eLoopUnitAI == eTargetUnitAI) { // move this unit to the appropriate group if (bDestinationSplit) { pLoopUnit->joinGroup(pSplitGroup); } else { pLoopUnit->joinGroup(pRemainderGroup); // (if pRemainderGroup NULL, it gets its own group) pRemainderGroup = pLoopUnit->getGroup(); } // if we moved to remainder, try for next unit AI if (!bDestinationSplit) { eTargetUnitAI = NO_UNITAI; bDestinationSplit = (pSplitGroup->getNumUnits() < iSplitSize); } else { // next unit goes to the remainder group bDestinationSplit = false; } } } } // clear bitfield, all types are valid again for (int iI = 0; iI < NUM_UNITAI_TYPES; iI++) { abUnitAIField[iI] = false; } } FAssertMsg(pSplitGroup->getNumUnits() <= iSplitSize, "somehow our split group is too large"); if (ppOtherGroup != NULL) { *ppOtherGroup = pRemainderGroup; } return pSplitGroup; } //------------------------------------------------------------------------------------------------ // FUNCTION: CvSelectionGroup::getUnitIndex //! \brief Returns the index of the given unit in the selection group //! \param pUnit The unit to find the index of within the group //! \retval The zero-based index of the unit within the group, or -1 if it is not in the group. //------------------------------------------------------------------------------------------------ int CvSelectionGroup::getUnitIndex(CvUnit* pUnit, int maxIndex /* = -1 */) const { CLLNode<IDInfo>* pUnitNode; CvUnit* pLoopUnit; int iIndex; iIndex = 0; pUnitNode = headUnitNode(); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit == pUnit) { return iIndex; } iIndex++; //early out if not interested beyond maxIndex if((maxIndex >= 0) && (iIndex >= maxIndex)) return -1; } return -1; } CLLNode<IDInfo>* CvSelectionGroup::headUnitNode() const { return m_units.head(); } CvUnit* CvSelectionGroup::getHeadUnit() const { CLLNode<IDInfo>* pUnitNode = headUnitNode(); if (pUnitNode != NULL) { return ::getUnit(pUnitNode->m_data); } else { return NULL; } } CvUnit* CvSelectionGroup::getUnitAt(int index) const { int numUnits = getNumUnits(); if(index >= numUnits) { FAssertMsg(false, "[Jason] Selectiongroup unit index out of bounds."); return NULL; } else { CLLNode<IDInfo>* pUnitNode = headUnitNode(); for(int i=0;i<index;i++) pUnitNode = nextUnitNode(pUnitNode); CvUnit *pUnit = ::getUnit(pUnitNode->m_data); return pUnit; } } UnitAITypes CvSelectionGroup::getHeadUnitAI() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return pHeadUnit->AI_getUnitAIType(); } return NO_UNITAI; } PlayerTypes CvSelectionGroup::getHeadOwner() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return pHeadUnit->getOwnerINLINE(); } return NO_PLAYER; } TeamTypes CvSelectionGroup::getHeadTeam() const { CvUnit* pHeadUnit; pHeadUnit = getHeadUnit(); if (pHeadUnit != NULL) { return pHeadUnit->getTeam(); } return NO_TEAM; } void CvSelectionGroup::clearMissionQueue() { FAssert(getOwnerINLINE() != NO_PLAYER); deactivateHeadMission(); m_missionQueue.clear(); if ((getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) && IsSelected()) { gDLL->getInterfaceIFace()->setDirty(Waypoints_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true); } } int CvSelectionGroup::getLengthMissionQueue() const { return m_missionQueue.getLength(); } MissionData* CvSelectionGroup::getMissionFromQueue(int iIndex) const { CLLNode<MissionData>* pMissionNode; pMissionNode = m_missionQueue.nodeNum(iIndex); if (pMissionNode != NULL) { return &(pMissionNode->m_data); } else { return NULL; } } void CvSelectionGroup::insertAtEndMissionQueue(MissionData mission, bool bStart) { //PROFILE_FUNC(); FAssert(getOwnerINLINE() != NO_PLAYER); m_missionQueue.insertAtEnd(mission); if ((getLengthMissionQueue() == 1) && bStart) { activateHeadMission(); } if ((getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) && IsSelected()) { gDLL->getInterfaceIFace()->setDirty(Waypoints_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true); } } CLLNode<MissionData>* CvSelectionGroup::deleteMissionQueueNode(CLLNode<MissionData>* pNode) { CLLNode<MissionData>* pNextMissionNode; FAssertMsg(pNode != NULL, "Node is not assigned a valid value"); FAssert(getOwnerINLINE() != NO_PLAYER); if (pNode == headMissionQueueNode()) { deactivateHeadMission(); } pNextMissionNode = m_missionQueue.deleteNode(pNode); if (pNextMissionNode == headMissionQueueNode()) { activateHeadMission(); } if ((getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) && IsSelected()) { gDLL->getInterfaceIFace()->setDirty(Waypoints_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(SelectionButtons_DIRTY_BIT, true); gDLL->getInterfaceIFace()->setDirty(InfoPane_DIRTY_BIT, true); } return pNextMissionNode; } CLLNode<MissionData>* CvSelectionGroup::nextMissionQueueNode(CLLNode<MissionData>* pNode) const { return m_missionQueue.next(pNode); } CLLNode<MissionData>* CvSelectionGroup::prevMissionQueueNode(CLLNode<MissionData>* pNode) const { return m_missionQueue.prev(pNode); } CLLNode<MissionData>* CvSelectionGroup::headMissionQueueNode() const { return m_missionQueue.head(); } CLLNode<MissionData>* CvSelectionGroup::tailMissionQueueNode() const { return m_missionQueue.tail(); } int CvSelectionGroup::getMissionType(int iNode) const { int iCount = 0; CLLNode<MissionData>* pMissionNode; pMissionNode = headMissionQueueNode(); while (pMissionNode != NULL) { if ( iNode == iCount ) { return pMissionNode->m_data.eMissionType; } iCount++; pMissionNode = nextMissionQueueNode(pMissionNode); } return -1; } int CvSelectionGroup::getMissionData1(int iNode) const { int iCount = 0; CLLNode<MissionData>* pMissionNode; pMissionNode = headMissionQueueNode(); while (pMissionNode != NULL) { if ( iNode == iCount ) { return pMissionNode->m_data.iData1; } iCount++; pMissionNode = nextMissionQueueNode(pMissionNode); } return -1; } int CvSelectionGroup::getMissionData2(int iNode) const { int iCount = 0; CLLNode<MissionData>* pMissionNode; pMissionNode = headMissionQueueNode(); while (pMissionNode != NULL) { if ( iNode == iCount ) { return pMissionNode->m_data.iData2; } iCount++; pMissionNode = nextMissionQueueNode(pMissionNode); } return -1; } void CvSelectionGroup::read(FDataStreamBase* pStream) { // Init saved data reset(); uint uiFlag=0; pStream->Read(&uiFlag); // flags for expansion pStream->Read(&m_iID); pStream->Read(&m_iMissionTimer); pStream->Read(&m_bForceUpdate); pStream->Read((int*)&m_eOwner); pStream->Read((int*)&m_eActivityType); pStream->Read((int*)&m_eAutomateType); m_units.Read(pStream); m_missionQueue.Read(pStream); } void CvSelectionGroup::write(FDataStreamBase* pStream) { uint uiFlag=0; pStream->Write(uiFlag); // flag for expansion pStream->Write(m_iID); pStream->Write(m_iMissionTimer); pStream->Write(m_bForceUpdate); pStream->Write(m_eOwner); pStream->Write(m_eActivityType); pStream->Write(m_eAutomateType); m_units.Write(pStream); m_missionQueue.Write(pStream); } // Protected Functions... void CvSelectionGroup::activateHeadMission() { FAssert(getOwnerINLINE() != NO_PLAYER); if (headMissionQueueNode() != NULL) { if (!isBusy()) { startMission(); } } } void CvSelectionGroup::deactivateHeadMission() { FAssert(getOwnerINLINE() != NO_PLAYER); if (headMissionQueueNode() != NULL) { if (getActivityType() == ACTIVITY_MISSION) { setActivityType(ACTIVITY_AWAKE); } setMissionTimer(0); if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer()) { if (IsSelected()) { gDLL->getInterfaceIFace()->changeCycleSelectionCounter(1); } } } } // BUG - All Units Actions - start bool CvSelectionGroup::allMatch(UnitTypes eUnit) const { FAssertMsg(eUnit >= 0, "eUnit expected to be >= 0"); FAssertMsg(eUnit < GC.getNumUnitInfos(), "eUnit expected to be < GC.getNumUnitInfos()"); CLLNode<IDInfo>* pUnitNode = headUnitNode(); CvUnit* pLoopUnit; FAssertMsg(pUnitNode != NULL, "headUnitNode() expected to be non-NULL"); while (pUnitNode != NULL) { pLoopUnit = ::getUnit(pUnitNode->m_data); pUnitNode = nextUnitNode(pUnitNode); if (pLoopUnit->getUnitType() != eUnit) { return false; } } return true; } // BUG - All Units Actions - end // BUG - Safe Move - start void CvSelectionGroup::checkLastPathPlot(CvPlot* pPlot) { m_bLastPathPlotChecked = true; if (pPlot != NULL) { m_bLastPlotVisible = pPlot->isVisible(getTeam(), false); m_bLastPlotRevealed = pPlot->isRevealed(getTeam(), false); } else { m_bLastPlotVisible = false; m_bLastPlotRevealed = false; } } void CvSelectionGroup::clearLastPathPlot() { m_bLastPathPlotChecked = false; } bool CvSelectionGroup::isLastPathPlotChecked() const { return m_bLastPathPlotChecked; } bool CvSelectionGroup::isLastPathPlotVisible() const { return m_bLastPathPlotChecked ? m_bLastPlotVisible : false; } bool CvSelectionGroup::isLastPathPlotRevealed() const { return m_bLastPathPlotChecked ? m_bLastPlotRevealed : false; } // BUG - Safe Move - end
[ "jdog5000@31ee56aa-37e8-4f44-8bdf-1f84a3affbab", "fim-fuyu@31ee56aa-37e8-4f44-8bdf-1f84a3affbab" ]
[ [ [ 1, 29 ], [ 40, 95 ], [ 101, 102 ], [ 106, 106 ], [ 110, 244 ], [ 250, 250 ], [ 254, 262 ], [ 270, 290 ], [ 294, 295 ], [ 302, 304 ], [ 315, 315 ], [ 317, 317 ], [ 322, 323 ], [ 338, 340 ], [ 346, 347 ], [ 351, 369 ], [ 375, 376 ], [ 380, 671 ], [ 677, 678 ], [ 682, 1241 ], [ 1243, 1357 ], [ 1368, 1368 ], [ 1373, 1373 ], [ 1430, 1430 ], [ 1432, 1432 ], [ 1434, 1434 ], [ 1439, 1439 ], [ 1452, 1453 ], [ 1458, 1459 ], [ 1461, 1461 ], [ 1468, 1468 ], [ 1480, 1480 ], [ 1483, 1483 ], [ 1485, 1485 ], [ 1487, 1487 ], [ 1494, 1494 ], [ 1501, 1501 ], [ 1508, 1508 ], [ 1515, 1515 ], [ 1522, 1522 ], [ 1529, 1529 ], [ 1536, 1536 ], [ 1543, 1543 ], [ 1550, 1550 ], [ 1557, 1557 ], [ 1564, 1564 ], [ 1571, 1571 ], [ 1578, 1578 ], [ 1585, 1585 ], [ 1592, 1592 ], [ 1599, 1599 ], [ 1606, 1606 ], [ 1613, 1613 ], [ 1620, 1620 ], [ 1643, 1643 ], [ 1649, 1651 ], [ 1653, 1653 ], [ 1661, 1661 ], [ 1663, 1663 ], [ 1669, 1670 ], [ 1672, 1672 ], [ 1674, 1675 ], [ 1680, 1683 ], [ 1687, 1786 ], [ 1788, 1788 ], [ 1790, 1846 ], [ 1852, 1866 ], [ 1872, 1875 ], [ 1879, 1951 ], [ 1955, 2061 ], [ 2065, 2196 ], [ 2202, 2215 ], [ 2219, 3135 ], [ 3141, 3147 ], [ 3149, 3150 ], [ 3152, 3160 ], [ 3174, 3176 ], [ 3179, 3179 ], [ 3181, 3181 ], [ 3194, 3295 ], [ 3297, 3387 ], [ 3391, 3754 ], [ 3757, 3786 ], [ 3794, 3798 ], [ 3805, 3806 ], [ 3808, 4086 ], [ 4088, 4088 ], [ 4092, 4092 ], [ 4094, 4094 ], [ 4096, 4133 ], [ 4142, 4142 ], [ 4144, 4149 ], [ 4171, 4173 ], [ 4180, 4197 ], [ 4199, 4202 ], [ 4204, 4257 ], [ 4261, 4364 ], [ 4368, 4386 ], [ 4388, 4596 ], [ 4607, 5569 ], [ 5571, 5575 ], [ 5578, 5604 ] ], [ [ 30, 39 ], [ 96, 100 ], [ 103, 105 ], [ 107, 109 ], [ 245, 249 ], [ 251, 253 ], [ 263, 269 ], [ 291, 293 ], [ 296, 301 ], [ 305, 314 ], [ 316, 316 ], [ 318, 321 ], [ 324, 337 ], [ 341, 345 ], [ 348, 350 ], [ 370, 374 ], [ 377, 379 ], [ 672, 676 ], [ 679, 681 ], [ 1242, 1242 ], [ 1358, 1367 ], [ 1369, 1372 ], [ 1374, 1429 ], [ 1431, 1431 ], [ 1433, 1433 ], [ 1435, 1438 ], [ 1440, 1451 ], [ 1454, 1457 ], [ 1460, 1460 ], [ 1462, 1467 ], [ 1469, 1479 ], [ 1481, 1482 ], [ 1484, 1484 ], [ 1486, 1486 ], [ 1488, 1493 ], [ 1495, 1500 ], [ 1502, 1507 ], [ 1509, 1514 ], [ 1516, 1521 ], [ 1523, 1528 ], [ 1530, 1535 ], [ 1537, 1542 ], [ 1544, 1549 ], [ 1551, 1556 ], [ 1558, 1563 ], [ 1565, 1570 ], [ 1572, 1577 ], [ 1579, 1584 ], [ 1586, 1591 ], [ 1593, 1598 ], [ 1600, 1605 ], [ 1607, 1612 ], [ 1614, 1619 ], [ 1621, 1642 ], [ 1644, 1648 ], [ 1652, 1652 ], [ 1654, 1660 ], [ 1662, 1662 ], [ 1664, 1668 ], [ 1671, 1671 ], [ 1673, 1673 ], [ 1676, 1679 ], [ 1684, 1686 ], [ 1787, 1787 ], [ 1789, 1789 ], [ 1847, 1851 ], [ 1867, 1871 ], [ 1876, 1878 ], [ 1952, 1954 ], [ 2062, 2064 ], [ 2197, 2201 ], [ 2216, 2218 ], [ 3136, 3140 ], [ 3148, 3148 ], [ 3151, 3151 ], [ 3161, 3173 ], [ 3177, 3178 ], [ 3180, 3180 ], [ 3182, 3193 ], [ 3296, 3296 ], [ 3388, 3390 ], [ 3755, 3756 ], [ 3787, 3793 ], [ 3799, 3804 ], [ 3807, 3807 ], [ 4087, 4087 ], [ 4089, 4091 ], [ 4093, 4093 ], [ 4095, 4095 ], [ 4134, 4141 ], [ 4143, 4143 ], [ 4150, 4170 ], [ 4174, 4179 ], [ 4198, 4198 ], [ 4203, 4203 ], [ 4258, 4260 ], [ 4365, 4367 ], [ 4387, 4387 ], [ 4597, 4606 ], [ 5570, 5570 ], [ 5576, 5577 ], [ 5605, 5605 ] ] ]
3fced4b6cdb705acc183022c6deee52f900a201b
ad80c85f09a98b1bfc47191c0e99f3d4559b10d4
/code/inc/kernel/nloghandler.h
b61ec275098e7081c6ef967f8061ce3e499e0c05
[]
no_license
DSPNerd/m-nebula
76a4578f5504f6902e054ddd365b42672024de6d
52a32902773c10cf1c6bc3dabefd2fd1587d83b3
refs/heads/master
2021-12-07T18:23:07.272880
2009-07-07T09:47:09
2009-07-07T09:47:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,664
h
#ifndef N_LOGHANDLER_H #define N_LOGHANDLER_H //------------------------------------------------------------------------------ /** The nLogHandler class provides a flexible way to provide text output to the user. Whenever the Print(), Message() or Error() methods of the kernel server are called, it will invoke the currently installed nLogHandler to display the information to the user. There are subclasses of the log handler which will dump the message to stdout, a log file, or invoke operating system specific functions. The nLogHandler class just dump everything to NIL. (C) 2003 RadonLabs GmbH */ #ifndef N_TYPES_H #include "kernel/ntypes.h" #endif #ifndef N_LINEBUFFER_H #include "util/nlinebuffer.h" #endif #include <stdarg.h> #undef N_DEFINES #define N_DEFINES nLogHandler #include "kernel/ndefdllclass.h" //------------------------------------------------------------------------------ class N_PUBLIC nLogHandler { public: /// constructor nLogHandler(); /// destructor virtual ~nLogHandler(); /// print a message to the log dump virtual void Print(const char* msg, va_list argList); /// show an important message (may block the program until the user acks) virtual void Message(const char* msg, va_list argList); /// show an error message (may block the program until the user acks) virtual void Error(const char* msg, va_list argList); /// get pointer to (optional) internal line buffer virtual nLineBuffer* GetLineBuffer(); }; //------------------------------------------------------------------------------ #endif
[ "plushe@411252de-2431-11de-b186-ef1da62b6547" ]
[ [ [ 1, 48 ] ] ]
64e4efc1988240a7e22d8851360436c2bbc0f409
2dbbca065b62a24f47aeb7ec5cd7a4fd82083dd4
/OUAN/OUAN/Src/Graphics/CameraManager/TransparentEntity.cpp
623a01b2e8b1054195f2c87b63bc9bd028d4ce21
[]
no_license
juanjmostazo/once-upon-a-night
9651dc4dcebef80f0475e2e61865193ad61edaaa
f8d5d3a62952c45093a94c8b073cbb70f8146a53
refs/heads/master
2020-05-28T05:45:17.386664
2010-10-06T12:49:50
2010-10-06T12:49:50
38,101,059
1
1
null
null
null
null
UTF-8
C++
false
false
5,531
cpp
#include "OUAN_Precompiled.h" #include "TransparentEntity.h" using namespace OUAN; using namespace Ogre; TransparentEntity::TransparentEntity() { clear(); } TransparentEntity::~TransparentEntity() { } std::string TransparentEntity::getName() { return mEntity->getName(); } void TransparentEntity::clear() { mEntity=NULL; mSolidMaterial.clear(); mTransparentMaterial.clear(); mTransparentMaterialTextures.clear(); } void TransparentEntity::init(Ogre::Entity * pEntity,double minAlphaBlending,double alphaBlendingSpeed) { Ogre::Technique * technique; Ogre::Pass * pass; Ogre::SubEntity* subEnt; Ogre::MaterialPtr material; Ogre::MaterialPtr clone; unsigned int i,j; std::string materialName; clear(); mState=TES_SOLID; mCurrentAlpha=1.0f; mEntity=pEntity; mMinAlphaBlending=minAlphaBlending; mAlphaBlendingSpeed=alphaBlendingSpeed; // originalRenderQueue=mEntity->getRenderQueueGroup(); for ( i = 0; i < mEntity->getNumSubEntities(); i++) { // Get the material of this sub entity and build the clone material name subEnt = mEntity->getSubEntity(i); material = subEnt->getMaterial(); materialName=mEntity->getName()+"#"+material->getName()+"#TRANSPARENT"; // Get/Create the clone material if (Ogre::MaterialManager::getSingleton().resourceExists(materialName)) { clone = Ogre::MaterialManager::getSingleton().getByName(materialName); } else { // Clone the material clone = material->clone(materialName); //get technique technique = clone->getBestTechnique(); //set current pass attributes for(j=0;j<technique->getNumPasses();j++) { pass = technique->getPass(j); if(j==0) { pass->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA); pass->setDepthWriteEnabled(false); } } } //Add material to the material stack mSolidMaterial.push_back(material->getName()); mTransparentMaterial.push_back(clone->getName()); } //Logger::getInstance()->log("[TransparentEntity] INIT transparent entity "+mEntity->getName()); } void TransparentEntity::setSolidMaterials() { unsigned int i; Ogre::SubEntity* subEnt; for ( i = 0; i < mEntity->getNumSubEntities(); i++) { // Apply the material to the sub entity. subEnt = mEntity->getSubEntity(i); subEnt->setMaterial(Ogre::MaterialManager::getSingleton().getByName(mSolidMaterial[i])); } } void TransparentEntity::setTransparentMaterials() { unsigned int i; Ogre::SubEntity* subEnt; for ( i = 0; i < mEntity->getNumSubEntities(); i++) { // Apply the material to the sub entity. subEnt = mEntity->getSubEntity(i); subEnt->setMaterial(Ogre::MaterialManager::getSingleton().getByName(mTransparentMaterial[i])); } } void TransparentEntity::makeSolid() { mState=TES_MAKING_SOLID; } void TransparentEntity::makeTransparent() { mState=TES_MAKING_TRANSPARENT; setTransparentMaterials(); } void TransparentEntity::setTransparentMaterialsAlpha(double alpha) { unsigned int i,j; Ogre::Technique * technique; Ogre::Pass * pass; Ogre::MaterialPtr material; for ( i = 0; i < mTransparentMaterial.size(); i++) { if (Ogre::MaterialManager::getSingleton().resourceExists(mTransparentMaterial[i])) { material = Ogre::MaterialManager::getSingleton().getByName(mTransparentMaterial[i]); //get technique technique = material->getBestTechnique(); //set current pass attributes for(j=0;j<technique->getNumPasses();j++) { pass = technique->getPass(j); if(pass->hasFragmentProgram()) { Ogre::GpuProgramParametersSharedPtr params = pass->getFragmentProgramParameters(); if (params->_findNamedConstantDefinition("alpha_modulate")) { params->setNamedConstant("alpha_modulate", Ogre::Real(alpha)); } } } } } } void TransparentEntity::update(double elapsedTime) { //Logger::getInstance()->log("[TransparentEntity] updating transparent entity "+mEntity->getName()+" elapsed time "+Ogre::StringConverter::toString(Ogre::Real(elapsedTime))+" current alpha "+Ogre::StringConverter::toString(Ogre::Real(mCurrentAlpha))); //Logger::getInstance()->log("[TransparentEntity] updating transparent entity "+mEntity->getName()+" mAlphaBlendingSpeed "+Ogre::StringConverter::toString(Ogre::Real(mAlphaBlendingSpeed))); switch(mState) { case TES_SOLID: //Logger::getInstance()->log("[TransparentEntity] solid"); break; case TES_TRANSPARENT: //Logger::getInstance()->log("[TransparentEntity] transparent"); break; case TES_MAKING_SOLID: //Logger::getInstance()->log("[TransparentEntity] making solid"); mCurrentAlpha+=elapsedTime*mAlphaBlendingSpeed; if(mCurrentAlpha>=1) { mCurrentAlpha=1.0f; setSolidMaterials(); mState=TES_SOLID; } else { setTransparentMaterialsAlpha(mCurrentAlpha); } break; case TES_MAKING_TRANSPARENT: //Logger::getInstance()->log("[TransparentEntity] making transparent"); mCurrentAlpha-=elapsedTime*mAlphaBlendingSpeed; if(mCurrentAlpha<=mMinAlphaBlending) { mCurrentAlpha=mMinAlphaBlending; setTransparentMaterialsAlpha(mMinAlphaBlending); mState=TES_TRANSPARENT; } else { setTransparentMaterialsAlpha(mCurrentAlpha); } break; default: break; } } bool TransparentEntity::isSolid() { return mState==TES_SOLID; } bool TransparentEntity::isTransparent() { return mState==TES_TRANSPARENT; }
[ "ithiliel@1610d384-d83c-11de-a027-019ae363d039", "wyern1@1610d384-d83c-11de-a027-019ae363d039" ]
[ [ [ 1, 2 ], [ 98, 98 ] ], [ [ 3, 97 ], [ 99, 216 ] ] ]
5b3e0cc9287a8e403e6332f21fd43be0947be5de
3187b0dd0d7a7b83b33c62357efa0092b3943110
/src/dlib/threads/threads_kernel_shared.h
fe6f77cc89faa906f7f7ff2ad9b1a1218ca115b0
[ "BSL-1.0" ]
permissive
exi/gravisim
8a4dad954f68960d42f1d7da14ff1ca7a20e92f2
361e70e40f58c9f5e2c2f574c9e7446751629807
refs/heads/master
2021-01-19T17:45:04.106839
2010-10-22T09:11:24
2010-10-22T09:11:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
7,595
h
// Copyright (C) 2003 Davis E. King ([email protected]) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADS_KERNEl_SHARED_ #define DLIB_THREADS_KERNEl_SHARED_ // this file should be included at the bottom of one of the thread kernel headers for a // specific platform. //#include "../threads.h" #include "auto_mutex_extension.h" #include "../binary_search_tree.h" #include "../member_function_pointer.h" #include "../memory_manager.h" #include "../queue.h" #include "../set.h" namespace dlib { // ---------------------------------------------------------------------------------------- namespace threads_kernel_shared { void thread_starter ( void* ); class threader { /*! INITIAL VALUE - pool_count == 0 and - data_ready is associated with the mutex data_mutex - data_empty is associated with the mutex data_mutex - destructed is associated with the mutex data_mutex - destruct == false - total_count == 0 CONVENTION - data_ready is associated with the mutex data_mutex - data_empty is associated with the mutex data_mutex - data_ready == a signaler used signal when there is new data waiting to start a thread with. - data_empty == a signaler used to signal when the data is now empty - pool_count == the number of suspended threads in the thread pool - total_count == the number of threads that are executing anywhere. i.e. pool_count + the ones that are currently running some user function. - if (function_pointer != 0) then - parameter == a void pointer pointing to the parameter which should be used to start the next thread - function_pointer == a pointer to the next function to make a new thread with - if (the destructor is running) then - destruct == true - else - destruct == false - queue_of_enders is locked by the data_mutex - queue_of_enders == a set of member_function_pointers that should be called when we want to end all the threads. these come from calls made to register_program_ending_handler(). - thread_ids is locked by the data_mutex - thread_ids == a set that contains the thread id for each thread spawned by this object. !*/ public: threader ( ); ~threader ( ); void add_ender ( member_function_pointer<>::kernel_1a mfp ); bool create_new_thread ( void (*funct)(void*), void* param ); template < typename T > void register_thread_end_handler ( T& obj, void (T::*handler)() ) { thread_id_type id = get_thread_id(); member_function_pointer<>::kernel_1a mfp; mfp.set(obj,handler); auto_mutex M(reg.m); reg.reg.add(id,mfp); } bool is_dlib_thread ( thread_id_type id ); private: friend void thread_starter ( void* ); void call_end_handlers ( ); /*! ensures - calls the registered end handlers for the calling thread and then removes them from reg.reg !*/ // private data set<thread_id_type,memory_manager<char>::kernel_2b>::kernel_1b_c thread_ids; queue<member_function_pointer<>::kernel_1a>::kernel_1a queue_of_enders; unsigned long total_count; void* parameter; void (*function_pointer)(void*); unsigned long pool_count; mutex data_mutex; // mutex to protect the above data signaler data_ready; // signaler to signal when there is new data signaler data_empty; // signaler to signal when the data is empty bool destruct; signaler destructed; // signaler to signal when a thread has ended struct registry_type { mutex m; binary_search_tree< thread_id_type, member_function_pointer<>::kernel_1a, memory_manager<char>::kernel_2a >::kernel_2a_c reg; }; // stuff for the register_thread_end_handler registry_type reg; // restricted functions threader(threader&); // copy constructor threader& operator=(threader&); // assignement opertor }; // ------------------------------------------------------------------------------------ threader& thread_pool ( ); /*! ensures - returns a reference to the global threader object !*/ // ------------------------------------------------------------------------------------ } bool is_dlib_thread ( thread_id_type id = get_thread_id() ); // ---------------------------------------------------------------------------------------- inline bool create_new_thread ( void (*funct)(void*), void* param ) { try { // now make this thread return threads_kernel_shared::thread_pool().create_new_thread(funct,param); } catch (std::bad_alloc&) { return false; } } // ---------------------------------------------------------------------------------------- template < typename T > inline void register_thread_end_handler ( T& obj, void (T::*handler)() ) { DLIB_ASSERT(is_dlib_thread(), "\tvoid register_thread_end_handler" << "\n\tYou can't register a thread end handler for a thread dlib didn't spawn." ); threads_kernel_shared::thread_pool().register_thread_end_handler(obj,handler); } // ---------------------------------------------------------------------------------------- template < typename T > inline void register_program_ending_handler ( T& obj, void (T::*handler)() ) { member_function_pointer<>::kernel_1a mfp; mfp.set(obj,handler); threads_kernel_shared::thread_pool().add_ender(mfp); } // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "threads_kernel_shared.cpp" #endif #endif // DLIB_THREADS_KERNEl_SHARED_
[ [ [ 1, 229 ] ] ]
9c1e27a9fa954e073418c67832ae3bdb971cd344
d6a28d9d845a20463704afe8ebe644a241dc1a46
/tests/collisionResponseAnimator.cpp
82e23d31532a17ff1ba0a7bf1744f681640e3362
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "Zlib" ]
permissive
marky0720/irrlicht-android
6932058563bf4150cd7090d1dc09466132df5448
86512d871eeb55dfaae2d2bf327299348cc5202c
refs/heads/master
2021-04-30T08:19:25.297407
2010-10-08T08:27:33
2010-10-08T08:27:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,047
cpp
// Copyright (C) 2008 Colin MacDonald // No rights reserved: this software is in the public domain. #include "testUtils.h" using namespace irr; using namespace core; using namespace scene; using namespace video; static bool expectedCollisionCallbackPositions = true; class CMyCollisionCallback : public ICollisionCallback { public: bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) { const vector3df & collisionPoint = animator.getCollisionPoint(); logTestString("Collision callback at %f %f %f\n", collisionPoint.X, collisionPoint.Y, collisionPoint.Z); if(collisionPoint != ExpectedCollisionPoint) { logTestString("*** Error: collision point, expected %f %f %f\n", ExpectedCollisionPoint.X, ExpectedCollisionPoint.Y, ExpectedCollisionPoint.Z); expectedCollisionCallbackPositions = false; assert(false); } const vector3df & nodePosition = animator.getCollisionResultPosition(); if(nodePosition != ExpectedNodePosition) { logTestString("*** Error: result position, expected %f %f %f\n", ExpectedNodePosition.X, ExpectedNodePosition.Y, ExpectedNodePosition.Z); expectedCollisionCallbackPositions = false; assert(false); } if(animator.getTargetNode() != ExpectedTarget) { logTestString("*** Error: wrong node\n"); expectedCollisionCallbackPositions = false; assert(false); } return ConsumeNextCollision; } void setNextExpectedCollision(ISceneNode* target, const vector3df& expectedPoint, const vector3df& expectedPosition, bool consume) { ExpectedTarget = target; ExpectedCollisionPoint = expectedPoint; ExpectedNodePosition = expectedPosition; ConsumeNextCollision = consume; } private: ISceneNode * ExpectedTarget; vector3df ExpectedCollisionPoint; vector3df ExpectedNodePosition; bool ConsumeNextCollision; }; /** Test that collision response animator will reset itself when removed from a scene node, so that the scene node can then be moved without the animator jumping it back again. */ bool collisionResponseAnimator(void) { IrrlichtDevice * device = irr::createDevice(video::EDT_NULL); assert(device); if(!device) return false; ISceneManager * smgr = device->getSceneManager(); // Create 2 nodes to the left of a "wall" ISceneNode * testNode1 = smgr->addEmptySceneNode(); ISceneNode * testNode2 = smgr->addEmptySceneNode(); testNode1->setPosition(vector3df(-50, 0,0)); testNode2->setPosition(vector3df(-50, 0,0)); // Create a "wall" node, and collision response animators for each test node. IMeshSceneNode * wallNode = smgr->addCubeSceneNode(10.f); ITriangleSelector * wallSelector = smgr->createTriangleSelectorFromBoundingBox(wallNode); ISceneNodeAnimatorCollisionResponse * collisionAnimator1 = smgr->createCollisionResponseAnimator(wallSelector, testNode1, vector3df(10,10,10), vector3df(0, 0, 0)); testNode1->addAnimator(collisionAnimator1); CMyCollisionCallback collisionCallback; collisionAnimator1->setCollisionCallback(&collisionCallback); collisionAnimator1->drop(); collisionAnimator1 = 0; ISceneNodeAnimatorCollisionResponse * collisionAnimator2 = smgr->createCollisionResponseAnimator(wallSelector, testNode2, vector3df(10,10,10), vector3df(0, 0, 0)); testNode2->addAnimator(collisionAnimator2); collisionAnimator2->setCollisionCallback(&collisionCallback); wallSelector->drop(); // Don't drop() collisionAnimator2 since we're going to use it. // Get the system in a good state device->run(); smgr->drawAll(); // Try to move both nodes to the right of the wall. // This one should be stopped by its animator. testNode1->setPosition(vector3df(50, 0,0)); collisionCallback.setNextExpectedCollision(testNode1, vector3df(-5.005f, 0, 0), vector3df(-15.005f, 0, 0), false); // Whereas this one, by forcing the animator to update its target node, should be // able to pass through the wall. (In <=1.6 it was stopped by the wall even if // the animator was removed and later re-added); testNode2->setPosition(vector3df(50, 0,0)); collisionAnimator2->setTargetNode(testNode2); collisionAnimator2->drop(); // We're done using this now. device->run(); smgr->drawAll(); bool result = true; if(testNode1->getAbsolutePosition().X > -15.f) { logTestString("collisionResponseAnimator test node 1 wasn't stopped from moving.\n"); assert(false); result = false; } if(testNode2->getAbsolutePosition().X < 50.f) { logTestString("collisionResponseAnimator test node 2 was stopped from moving.\n"); assert(false); result = false; } // Now try to move the second node back through the wall again. Now it should be // stopped by the wall. testNode2->setPosition(vector3df(-50, 0, 0)); // We'll consume this collision, so the node will actually move all the way through. collisionCallback.setNextExpectedCollision(testNode2, vector3df(5.005f, 0, 0), vector3df(15.005f, 0, 0), true); device->run(); smgr->drawAll(); if(testNode2->getAbsolutePosition().X != -50.f) { logTestString("collisionResponseAnimator test node 2 was stopped from moving.\n"); assert(false); result = false; } // Now we'll try to move it back to the right and allow it to be stopped. collisionCallback.setNextExpectedCollision(testNode2, vector3df(-5.005f, 0, 0), vector3df(-15.005f, 0, 0), false); testNode2->setPosition(vector3df(50, 0, 0)); device->run(); smgr->drawAll(); if(testNode2->getAbsolutePosition().X > -15.f) { logTestString("collisionResponseAnimator test node 2 moved too far.\n"); assert(false); result = false; } device->closeDevice(); device->run(); device->drop(); result &= expectedCollisionCallbackPositions; return result; }
[ "Rogerborg@dfc29bdd-3216-0410-991c-e03cc46cb475", "hybrid@dfc29bdd-3216-0410-991c-e03cc46cb475" ]
[ [ [ 1, 50 ], [ 54, 190 ], [ 193, 198 ] ], [ [ 51, 53 ], [ 191, 192 ] ] ]
dcbf3e9446a636c9d1168fcd86587bc13d98407a
3201bc35622102fe99b50e5f7d1351ad0d89b2f2
/design/repository/units/apb_target_sram/src/apb_target_sram.cpp
9ecb7698e392c71f7698e6db758383cf5ef51ff1
[]
no_license
embisi-github/embisi_gip
1f7e8ce334ae9611f52a2cd6e536ef71fb00cec4
dd6dfe8667b28f03dba2ac605d67916cb4483005
refs/heads/master
2021-01-10T12:33:55.917299
2006-11-27T09:43:39
2006-11-27T09:43:39
48,285,426
0
1
null
null
null
null
UTF-8
C++
false
false
9,069
cpp
/*a Copyright This file (c) Gavin J Stark, 2003. All rights reserved. */ /*a Includes */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "sl_debug.h" #include "sl_mif.h" #include "se_external_module.h" #include "se_scripting.h" /*a Types */ /*t t_main_clock_state */ typedef struct t_main_clock_state { int data_out; int reading; int writing; int address; int write_data; } t_main_clock_state; /*t t_inputs */ typedef struct t_inputs { int *enable; int *select; int *read_not_write; int *address; int *data_in; } t_inputs; /*t c_apb_target_sram */ class c_apb_target_sram { public: c_apb_target_sram::c_apb_target_sram( class c_engine *eng, void *eng_handle ); c_apb_target_sram::~c_apb_target_sram(); t_sl_error_level c_apb_target_sram::delete_instance( void ); t_sl_error_level c_apb_target_sram::reset( void ); t_sl_error_level c_apb_target_sram::preclock( void ); t_sl_error_level c_apb_target_sram::clock( void ); private: c_engine *engine; void *engine_handle; t_inputs inputs; int memory_size; t_main_clock_state next_main_clock_state; t_main_clock_state main_clock_state; int *memory; char *memory_filename; }; /*a Static variables */ /*f state_desc */ static t_main_clock_state *_ptr; #define struct_offset( ptr, a ) (((char *)&(ptr->a))-(char *)ptr) static t_engine_state_desc state_desc[] = { {"data_out", engine_state_desc_type_bits, NULL, struct_offset(_ptr, data_out), {32,0,0,0}, {NULL,NULL,NULL,NULL} }, {"reading", engine_state_desc_type_bits, NULL, struct_offset(_ptr, reading), {1,0,0,0}, {NULL,NULL,NULL,NULL} }, {"writing", engine_state_desc_type_bits, NULL, struct_offset(_ptr, writing), {1,0,0,0}, {NULL,NULL,NULL,NULL} }, {"address", engine_state_desc_type_bits, NULL, struct_offset(_ptr, address), {8,0,0,0}, {NULL,NULL,NULL,NULL} }, {"write_data", engine_state_desc_type_bits, NULL, struct_offset(_ptr, write_data), {32,0,0,0}, {NULL,NULL,NULL,NULL} }, {"", engine_state_desc_type_none, NULL, 0, {0,0,0,0}, {NULL,NULL,NULL,NULL} } }; /*a Static wrapper functions */ /*f instance_fn */ static t_sl_error_level instance_fn( c_engine *engine, void *engine_handle ) { c_apb_target_sram *mod; mod = new c_apb_target_sram( engine, engine_handle ); if (!mod) return error_level_fatal; return error_level_okay; } /*f delete_fn - simple callback wrapper for the main method */ static t_sl_error_level delete_fn( void *handle ) { c_apb_target_sram *mod; t_sl_error_level result; mod = (c_apb_target_sram *)handle; result = mod->delete_instance(); delete( mod ); return result; } /*f reset_fn */ static t_sl_error_level reset_fn( void *handle ) { c_apb_target_sram *mod; mod = (c_apb_target_sram *)handle; return mod->reset(); } /*f preclock_fn */ static t_sl_error_level preclock_fn( void *handle ) { c_apb_target_sram *mod; mod = (c_apb_target_sram *)handle; return mod->preclock(); } /*f clock_fn */ static t_sl_error_level clock_fn( void *handle ) { c_apb_target_sram *mod; mod = (c_apb_target_sram *)handle; return mod->clock(); } /*a Constructors and destructors */ /*f c_apb_target_sram::c_apb_target_sram */ c_apb_target_sram::c_apb_target_sram( class c_engine *eng, void *eng_handle ) { t_engine_state_desc local_state_desc[2]; engine = eng; engine_handle = eng_handle; engine->register_delete_function( engine_handle, (void *)this, delete_fn ); engine->register_reset_function( engine_handle, (void *)this, reset_fn ); engine->register_clock_fns( engine_handle, (void *)this, "main_clock", preclock_fn, clock_fn ); engine->register_input_signal( engine_handle, "address", 16, &inputs.address ); engine->register_input_used_on_clock( engine_handle, "address", "main_clock", 1 ); engine->register_input_signal( engine_handle, "enable", 1, &inputs.enable ); engine->register_input_used_on_clock( engine_handle, "enable", "main_clock", 1 ); engine->register_input_signal( engine_handle, "select", 1, &inputs.select ); engine->register_input_used_on_clock( engine_handle, "select", "main_clock", 1 ); engine->register_input_signal( engine_handle, "read_not_write", 1, &inputs.read_not_write ); engine->register_input_used_on_clock( engine_handle, "read_not_write", "main_clock", 1 ); engine->register_input_signal( engine_handle, "data_in", 32, &inputs.data_in ); engine->register_input_used_on_clock( engine_handle, "data_in", "main_clock", 1 ); engine->register_output_signal( engine_handle, "data_out", 32, &main_clock_state.data_out ); engine->register_output_generated_on_clock( engine_handle, "data_out", "main_clock", 1 ); engine->register_state_desc( engine_handle, 1, state_desc, &main_clock_state, NULL ); memory_size = 8; memory = NULL; memory_filename = engine->get_option_string( engine_handle, "load_file", "sram.mif" ); sl_mif_allocate_and_read_mif_file( engine->error, memory_filename, "APB target SRAM", 256, 32, 0, &memory ); local_state_desc[0].name = "memory"; local_state_desc[0].type = engine_state_desc_type_memory; local_state_desc[0].ptr = NULL; local_state_desc[0].offset = 0; local_state_desc[0].args[0] = 32; local_state_desc[0].args[1] = 256; local_state_desc[1].type = engine_state_desc_type_none; engine->register_state_desc( engine_handle, 0, local_state_desc, (void *)&memory, NULL ); } /*f c_apb_target_sram::~c_apb_target_sram */ c_apb_target_sram::~c_apb_target_sram() { delete_instance(); } /*f c_apb_target_sram::delete_instance */ t_sl_error_level c_apb_target_sram::delete_instance( void ) { if (memory) { free(memory); memory = NULL; } return error_level_okay; } /*a Class reset/preclock/clock methods */ /*f c_apb_target_sram::reset */ t_sl_error_level c_apb_target_sram::reset( void ) { if (memory) { free(memory); } memory = NULL; sl_mif_allocate_and_read_mif_file( engine->error, memory_filename, "APB target SRAM", 256, 32, 0, &memory ); main_clock_state.data_out = 0; main_clock_state.reading = 0; main_clock_state.writing = 0; main_clock_state.address = 0; main_clock_state.write_data = 0xdeaddead; return error_level_okay; } /*f c_apb_target_sram::preclock */ t_sl_error_level c_apb_target_sram::preclock( void ) { memcpy( &next_main_clock_state, &main_clock_state, sizeof(main_clock_state) ); next_main_clock_state.reading = 0; next_main_clock_state.writing = 0; if (inputs.enable[0] && inputs.select[0] && !inputs.read_not_write[0]) { next_main_clock_state.writing = 1; next_main_clock_state.address = inputs.address[0]&0xff; next_main_clock_state.write_data = inputs.data_in[0]; DEBUG( ( debug_level_info, "c_apb_target_sram::preclock", "APB target_sram '%s' write address 0x%02x data 0x%08x", engine->get_instance_name( engine_handle), inputs.address[0] & 0xff, inputs.data_in[0] ) ); } if (inputs.select[0] && inputs.read_not_write[0]) { next_main_clock_state.reading = 1; next_main_clock_state.address = inputs.address[0]&0xff; if (memory) { next_main_clock_state.data_out = memory[next_main_clock_state.address]; } else { next_main_clock_state.data_out = 0xdeadface; } DEBUG( ( debug_level_info, "c_apb_target_sram::preclock", "APB target_sram '%s' read address %d data %08x", engine->get_instance_name( engine_handle), inputs.address[0] & 0xff, next_main_clock_state.data_out ) ); } return error_level_okay; } /*f c_apb_target_sram::clock */ t_sl_error_level c_apb_target_sram::clock( void ) { memcpy( &main_clock_state, &next_main_clock_state, sizeof(main_clock_state) ); if ( (main_clock_state.writing) && memory ) { memory[main_clock_state.address] = main_clock_state.write_data; } return error_level_okay; } /*a Initialization functions */ /*f apb_target_sram__init */ extern void apb_target_sram__init( void ) { se_external_module_register( 1, "apb_target_sram", instance_fn ); } /*a Scripting support code */ /*f initapb_target_sram */ extern "C" void initapb_target_sram( void ) { apb_target_sram__init( ); scripting_init_module( "apb_target_sram" ); }
[ "" ]
[ [ [ 1, 287 ] ] ]
78e3cb141f72abc2242555da6828b1efc39753b9
e7c45d18fa1e4285e5227e5984e07c47f8867d1d
/Application/SysCAD/ArchMngr.CPP
12293a9b2e216bb62159c3c584a58c1c0715a801
[]
no_license
abcweizhuo/Test3
0f3379e528a543c0d43aad09489b2444a2e0f86d
128a4edcf9a93d36a45e5585b70dee75e4502db4
refs/heads/master
2021-01-17T01:59:39.357645
2008-08-20T00:00:29
2008-08-20T00:00:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
117,249
cpp
//================== SysCAD - Copyright Kenwalt (Pty) Ltd =================== // $Nokeywords: $ //=========================================================================== #include "stdafx.h" #include "sc_defs.h" #include "resource.h" #include "archmngr.h" #include "project.h" #include "dlgbusy.h" #include "dbgmngr.h" #include "..\schist\hstmsg.h" #include "TagDB.h" #include "dbhelper.h" #include "sfe_clnt.h" #include "scd_wm.h" #include "archdlgs.h" #include "..\..\..\SMDK\Include\msglog.h" //#include "optoff.h" #define dbgArchiver WITHDEBUG #if dbgArchiver static CDbgMngr dbgArchiverWrites("ArchiveManager", "Writes"); static CDbgMngr dbgTime("ArchiveManager", "Time"); static CDbgMngr dbgConfig("ArchiveManager", "Config"); static CDbgMngr dbgReadCfg("ArchiveManager", "ReadCfg"); static CDbgMngr dbgDBState("ArchiveManager", "DbState"); static CDbgMngr dbgExecute("ArchiveManager", "Execute"); #endif //--------------------------------------------------------------------------- const LPTSTR ArcName = "Archive"; LPCTSTR ADBFnStr(int iFn) { switch (iFn) { case ADBFn_Instant: return "Current"; case ADBFn_Minimum: return "Minimum"; case ADBFn_Maximum: return "Maximum"; case ADBFn_PeriodAvg: return "Average"; case ADBFn_RunningAvg: return "RunningAvg"; case ADBFn_Count: return "Count"; case ADBFn_ChangeCount: return "ChangeCount"; case ADBFn_Sum: return "Sum"; case ADBFn_String: return "String"; } return "?"; }; LPCTSTR ADBMeasStr(int iMeas) { switch (iMeas) { case ADBMeas_StartPt: return "StartPt"; case ADBMeas_MidPt: return "MidPt"; case ADBMeas_EndPt: return "EndPt"; } return "?"; }; LPCTSTR ADBFirstStr(int iMeas) { switch (iMeas) { case ADBFirst_Use: return "Use"; case ADBFirst_Ignore: return "Ignore"; } return "?"; }; //--------------------------------------------------------------------------- static LPCTSTR s_sArchiveContent = ";=============================================================\n" ";===== SysCAD Archive configuration file =====\n" ";=============================================================\n" "\n" "[Options]\n" "DBFile = $Prj\\Archive.MDB\n" "AllowAccess= 0\n" "\n" ";=============================================================\n" "\n" "[Columns]\n" "DateTime = 0\n" "Date = 1\n" "Time = 1\n" "ElapsedHMS = 0\n" "ElapsedDbl = s\n" "\n" "Command = 0\n" "Type = 1\n" "Tag = 1\n" "Source = 1\n" "IDNo = 0\n" "IterNo = 0\n" "CallNo = 0\n" "SeqNo = 0\n" "Message = 1\n" "\n" ";=============================================================\n" "\n" "[MessageLog] ; System table\n" "On = 1\n" "Format = DB\n" "\n" ";=============================================================\n" "\n" "[EventLog] ; System table\n" "On = 1\n" "Format = DB\n" "\n" ";=============================================================\n" "; \n" "; Syntax\n" "; -------\n" "; \n" "; [Table1] \n" "; Name = ATableName\n" "; On = 1\n" "; Format = DB\n" "; Path = $Prj\\Archive\n" "; SigDigits = 20\n" "; Period = hh:mm:ss\n" "; Offset = hh:mm:ss\n" "; FieldNN = \"FieldName\", SysCADTag, Function, MeasurePoint, FirstPoint\n" "; TriggerNN = \"Description\", SysCADTag, TriggerTest\n" "; Field1 = \"Steps\", PlantModel.Stats.Steps, Current\n" "; Trigger1 = \"Monthly\", $Dyn.DateRec.Month, Delta=0.1\n" "; \n" "; \n" "; Options\n" "; -------\n" "; Format = DB / CSV / TXT\n" "; On = 0/1 (off/on)\n" "; Path = A Folder Name for CSV & TXT files. (Usually with the project) $Prj=current project folder\n" "; SigDigits = 1 .. 20 Number of significant digits written to CSV & TXT files\n" "; Period = Time frequency for reporting fields, where time zero is at start.\n" "; Offset = Time offset within the specified period. Optional. Zero is the default.\n" "; FieldName = Report column or field name. Should not contain characters: '.,[]\n" "; SysCADTag = Any valid SysCAD tag. May have conversions.\n" "; Function = Current / Minimum / Maximum / Average / Sum / Count / ChangeCount / String\n" "; OR = Cur / Min / Max / Avg / Sum / Cnt / ChgCnt / Str\n" "; MeasurePt = StartPt / EndPt / MidPt - EndPt is the default\n" "; FirstPoint = IgnoreFirst / UseFirst - IgnoreFirst is the default\n" "; TriggerTest = Rise [= Value]/ Fall [= Value]/ Delta [= Value]\n" "; [= Value] is Optional Test Value (default = 1.0)\n" "; TriggerTest = StepRise [= Value]/ StepFall [= Value]/ StepDelta [= Value]\n" "; [= Value] is Optional Test Value (default = 1.0)\n" "; \n" "; Notes:\n" "; 1) Use Period for reporting at fixed time intervals, OR use Triggers for reporting\n" "; at irregular time intervals (ie report specified fields based on trigger logic).\n" "; 2) The period and offset are relative to mifnight, not the simulation start time.\n" "; 3) For the trigger test use the StepXXXX functions to compare results from previous\n" "; iteration to decide if fields should be saved, or use the Rise/Fall/Delta to compare\n" "; results from previous occurance of the trigger.\n" "; 4) There can be any number of triggers. If the conditions of any of the triggers are met,\n" "; then the fields will be reported.\n" "; 5) For 'Sum' function type, the SysCAD tag MUST be on a per second basis (eg P_1.Qm (t/s)),\n" "; the reported value will be a totaliser for the report period.\n" "; 6) For 'Count' function type, the reported value will be the number of iterations for the\n" "; report period, any valid SysCAD tag can be specified.\n" "; 7) For 'ChangeCount' function type, the reported value will be count of number of iterations\n" "; for which the specified tag changes by more than 1e-3.\n" "; 8) For 'String' function type, the SysCAD tag must be a string.\n" "; 9) All table entries are optional except the Name\n" "; 10) If no Fields are entered then the table will still be created.\n" "; 11) If one or more Triggers are used, a period & offset is not relevant or required.\n" "; 12) If no triggers or period are specified then the table will not accumulate data.\n" "; \n" ";=============================================================\n" "; Examples:\n" ";[Table1]\n" ";Name = Daily\n" ";On = 1\n" ";Format = DB\n" ";Period = 24:00:00\n" ";Field1 = \"Steps\", PlantModel.Stats.Steps, Current\n" ";Field2 = \"Tank1 Level (%)\", TNK_1.Lvl (%), Current\n" ";Field3 = \"Tank1 Max Level (%)\", TNK_1.Lvl (%), Maximum\n" ";Field4 = \"Tank1 Ave Level (%)\", TNK_1.Lvl (%), Average\n" ";Field5 = \"Total Tank Feed\", TNK_1.QFeed.QMt (kg/s), Sum\n" ";\n" ";[Table2]\n" ";Name = Monthly\n" ";On = 1\n" ";Format = CSV\n" ";Path = $Prj\\Archive\n" ";Trigger1 = \"Monthly\", $Dyn.DateRec.Month, Delta=0.1\n" ";Field1 = \"Steps\", PlantModel.Stats.Steps, Current\n" ";Field3 = \"Month\", $Dyn.DateRec.MonthDesc, String\n" ";Field3 = \"Tank1 Level (%)\", TNK_1.Lvl (%), Current\n" ";Field4 = \"Tank1 Max Level (%)\", TNK_1.Lvl (%), Maximum\n" ";Field5 = \"Tank1 Ave Level (%)\", TNK_1.Lvl (%), Average\n" ";\n" ";=============================================================\n" "\n"; const LPCTSTR InvalidFldNmChars = ".'[]"; const LPCTSTR InvalidFldNmCharsM = "[]"; const LPCTSTR InvalidFldNmCharsD = ".'"; static LPCTSTR sMessageLogStr = "MessageLog"; static LPCTSTR sEventLogStr = "EventLog"; static LPCTSTR sRecordStr = "RecordNo"; static LPCTSTR sDateTimeStr = "DateTime"; static LPCTSTR sDateStr = "Date"; static LPCTSTR sTimeStr = "Time"; static LPCTSTR sElapsedHMSStr = "ElapsedHMS"; static LPCTSTR sElapsedDaysStr = "ElapsedDays"; static LPCTSTR sElapsedHrsStr = "ElapsedHrs"; static LPCTSTR sElapsedMinsStr = "ElapsedMins"; static LPCTSTR sElapsedSecsStr = "ElapsedSecs"; static LPCTSTR sSourceStr = "Source"; static LPCTSTR sTagStr = "Tag"; static LPCTSTR sMessageStr = "Message"; static LPCTSTR sCommandStr = "Command"; static LPCTSTR sTypeStr = "Type"; static LPCTSTR sIDNoStr = "IDNo"; static LPCTSTR sIterNoStr = "IterNo"; static LPCTSTR sCallNoStr = "CallNo"; static LPCTSTR sSeqNoStr = "SeqNo"; //--------------------------------------------------------------------------- static const struct CSystemTable { LPCTSTR m_Table; LPCTSTR m_FldName; byte m_Type; int m_Size; UINT m_Mask; } s_SystemTables[] = { {NULL, sDateTimeStr, tt_Generic,0, LogItem_Time }, // tt_Generic to map to DateTime {NULL, sDateStr, tt_Generic,0, LogItem_TimeDate }, // tt_Generic to map to DateTime {NULL, sTimeStr, tt_Generic,0, LogItem_TimeTime }, // tt_Generic to map to DateTime {NULL, sElapsedHMSStr, tt_Strng, 30, LogItem_ElapsedHMS }, {NULL, sElapsedDaysStr,tt_Double, 0, LogItem_ElapsedDays }, {NULL, sElapsedHrsStr, tt_Double, 0, LogItem_ElapsedHrs }, {NULL, sElapsedMinsStr,tt_Double, 0, LogItem_ElapsedMins }, {NULL, sElapsedSecsStr,tt_Double, 0, LogItem_ElapsedSecs }, {sMessageLogStr, sCommandStr, tt_Strng, 30, LogItem_Command}, {sMessageLogStr, sTypeStr, tt_Strng, 20, LogItem_Type }, {sMessageLogStr, sSourceStr, tt_Strng, 50, LogItem_Source }, {sMessageLogStr, sIDNoStr, tt_Long, 0, LogItem_IDNo }, {sMessageLogStr, sIterNoStr, tt_Long, 0, LogItem_IterNo }, {sMessageLogStr, sCallNoStr, tt_Long, 0, LogItem_CallNo }, {sMessageLogStr, sSeqNoStr, tt_Long, 0, LogItem_SeqNo }, {sMessageLogStr, sMessageStr, tt_Strng, 255, LogItem_Message}, {sEventLogStr, sTagStr, tt_Strng, 100, LogItem_Tag }, {sEventLogStr, sMessageStr, tt_Strng, 255, LogItem_Message}, }; inline LPTSTR C2T(LPCTSTR X) { return (LPTSTR)X; }; //=========================================================================== // // // //=========================================================================== void CArcAddress::SetIndex(CArchiveManager & AM) { m_lInputIndex=AM.FindInputIndex(m_sTag); if (m_lInputIndex<0) { m_lFieldIndex=AM.FindFieldIndex(m_sTag); if (m_lFieldIndex<0) m_lInputIndex=AM.AddInput(m_sTag); } else m_lFieldIndex=-1; #if dbgArchiver if (dbgReadCfg()) dbgpln("SetIndex:Inp/Fld:[%4i/%4i] %s", m_lInputIndex, m_lFieldIndex, (LPCTSTR)m_sTag); #endif } char* CArcAddress::GetValue(CArchiveManager & AM) { if (m_lInputIndex>=0) return AM.GetInput(m_lInputIndex).GetValue(); if (m_lFieldIndex>=0) return AM.GetField(m_lFieldIndex).GetSValue(); return NULL; } double CArcAddress::GetValue(CArchiveManager & AM, LPTSTR CnvTxt) { if (m_lInputIndex>=0) return AM.GetInput(m_lInputIndex).GetValue(CnvTxt); if (m_lFieldIndex>=0) return AM.GetField(m_lFieldIndex).GetValue(); return 0; } CCnvIndex CArcAddress::GetCnvIndex(CArchiveManager & AM) { if (m_lInputIndex>=0) return AM.GetInput(m_lInputIndex).m_iCnv; if (m_lFieldIndex>=0) { //return AM.GetField(m_lFieldIndex).GetValue(); _asm int 3; } return 0; } //=========================================================================== // // // //=========================================================================== CArchiveInput::CArchiveInput() { m_iType = 0; //m_dPreviousValue=dNAN; m_dValue=dNAN; } void CArchiveInput::PutValue(CPkDataItem &PItem) { if (IsStrng(m_iType)) m_sValue=PItem.Value()->GetString(); else m_dValue=PItem.Value()->GetDouble(); } void CArchiveInput::PutValue(double Value) { m_dValue=Value; } void CArchiveInput::PutValue(char* Value) { m_sValue=Value; } double CArchiveInput::GetValue(LPTSTR CnvTxt) { return Cnvs[m_iCnv]->Human(m_dValue, CnvTxt); } char* CArchiveInput::GetValue() { return (char*)(const char*)m_sValue; } //=========================================================================== // // // //=========================================================================== CArchiveDBField::CArchiveDBField(CArchiveManager *pAM) : m_rAM(*pAM) { m_iFn = ADBFn_Null; m_iMeas = ADBMeas_Null; m_lTableIndex = -1; m_bResetReqd = true; m_dCalculatedValue = 0.0; m_dPrevInputMeas = 0.0; m_dInputValue = 0.0; m_bSystem = false; } //--------------------------------------------------------------------------- CArchiveDBField::~CArchiveDBField() { } //--------------------------------------------------------------------------- bool CArchiveDBField::GetValue(CPkDataList &List, /*CPkDataItem * &pPItem,*/ bool Complete) { PkDataUnion PData; PData.SetTypeDouble(tt_Double, m_dCalculatedValue); if (Complete) { //supply ranges in SI units !!! DataUnion uMin; DataUnion uMax; CCnvIndex iCnv=m_Src.GetCnvIndex(m_rAM); uMin.Set(Cnvs[(iCnv)]->Normal(0.0, m_sCnvTxt())); uMax.Set(Cnvs[(iCnv)]->Normal(1.0, m_sCnvTxt())); List.SetDataValueAll(/*pPItem,*/ (char*)(LPCTSTR)m_sScdMTag, "", PData, isArchiveTag, uMin, uMax, iCnv, m_sCnvTxt()?m_sCnvTxt():"", ""/*sCnvFam()*/, NULL, False, C2T(m_sDescription)); } else List.SetDataValue(/*pPItem,*/ NULL, PData); return True; } //--------------------------------------------------------------------------- void CArchiveDBField::Execute(CXM_TimeControl &CB) { if (m_iFn==ADBFn_String) m_sInputValue = m_Src.GetValue(m_rAM); else m_dInputValue = m_Src.GetValue(m_rAM, m_sCnvTxt()); // Value at the beginning of the step } //--------------------------------------------------------------------------- void CArchiveDBField::StepDone(CXM_TimeControl &CB, double DeltaSecs) { if (m_iFn==ADBFn_String) {//do not need to do anything for a string field m_bResetReqd = false; return; } double InputAtStart = m_dInputValue; double InputAtEnd = m_Src.GetValue(m_rAM, m_sCnvTxt()); m_dInputValue = InputAtEnd; if (m_rAM.Rewind()) { if (m_iFirstOnRewind==ADBFirst_Ignore) InputAtStart = InputAtEnd; m_bResetReqd=true; } const bool ValidInputAtStart = Valid(InputAtStart); const bool ValidInputAtEnd = Valid(InputAtEnd); const bool BothValid = (ValidInputAtStart && ValidInputAtEnd); double InputMeas = dNAN; switch (m_iMeas) { case ADBMeas_StartPt: InputMeas = InputAtStart; break; case ADBMeas_MidPt: InputMeas = (BothValid ? 0.5*(InputAtStart+InputAtEnd) : dNAN); break; case ADBMeas_EndPt: InputMeas = InputAtEnd; break; } const bool ValidInputMeas = Valid(InputMeas); if (m_bResetReqd) m_dPrevInputMeas = InputMeas; #if dbgArchiver LPCTSTR SrchTag="";//"GC_1-z-AVG"; #endif if (m_bResetReqd) { switch (m_iFn) { case ADBFn_Instant: m_dCalculatedValue = InputMeas; break; case ADBFn_Minimum: if (BothValid) m_dCalculatedValue = Min(InputAtStart, InputAtEnd); break; case ADBFn_Maximum: if (BothValid) m_dCalculatedValue = Max(InputAtStart, InputAtEnd); break; case ADBFn_PeriodAvg: case ADBFn_RunningAvg: switch (m_iMeas) { case ADBMeas_StartPt: m_dCalculatedValue = InputAtStart; break; case ADBMeas_MidPt: m_dCalculatedValue = (BothValid ? 0.5*(InputAtStart+InputAtEnd) : dNAN); break; case ADBMeas_EndPt: m_dCalculatedValue = InputAtEnd; break; } break; case ADBFn_Count: case ADBFn_ChangeCount: m_dCalculatedValue = 0; break; case ADBFn_Sum: m_dCalculatedValue = 0.0; break; } m_nSamples=0; //#if dbgArchiver // if (dbgExecute() && (strlen(SrchTag)==0 || stricmp(m_sFldTag, SrchTag)==0)) // dbgpln("%-10s Reset %5i %12s %12.4f = %12.4f %s", ADBFnStr(m_bWhat), m_nSamples, "", m_dInputValue, m_dCalculatedValue, m_sFldTag); //#endif } //TODO: If value is NAN, what is best result for min and max, etc!!!! (for now ignore?) double PrevFieldVal = m_dCalculatedValue; switch (m_iFn) { case ADBFn_Instant: m_dCalculatedValue = InputMeas; break; case ADBFn_Minimum: if (BothValid) m_dCalculatedValue = Min(m_dCalculatedValue, Min(InputAtStart, InputAtEnd)); break; case ADBFn_Maximum: if (BothValid) m_dCalculatedValue = Max(m_dCalculatedValue, Max(InputAtStart, InputAtEnd)); break; case ADBFn_PeriodAvg: if (ValidInputMeas) m_dCalculatedValue = (InputMeas + m_nSamples*m_dCalculatedValue)/(m_nSamples+1); m_nSamples++; break; case ADBFn_RunningAvg: m_dCalculatedValue = m_dInputValue; break; case ADBFn_Count: m_dCalculatedValue += 1.0; break; case ADBFn_ChangeCount: { bool Chgd; if (!Valid(m_dPrevInputMeas) || !Valid(InputMeas)) Chgd = !(!Valid(m_dPrevInputMeas) && !Valid(InputMeas)); else Chgd = (fabs(m_dPrevInputMeas-InputMeas)>1.0e-3); if (Chgd) m_dCalculatedValue += 1.0; break; } case ADBFn_Sum: if (ValidInputMeas) m_dCalculatedValue += (InputMeas*DeltaSecs); break; } #if dbgArchiver if (dbgExecute() && (strlen(SrchTag)==0 || stricmp(m_sFldTag, SrchTag)==0)) dbgpln("%-10s %-10s %5s %5i S:%12.4f E:%12.4f = I:%12.4f C:%12.4f %s", ADBFnStr(m_iFn), ADBMeasStr(m_iMeas), m_bResetReqd?"Reset":"", m_nSamples, InputAtStart, InputAtEnd, m_dInputValue, m_dCalculatedValue, m_sFldTag); #endif m_dPrevInputMeas = InputMeas; if (m_bResetReqd) m_bChanged = true; else { if (!Valid(m_dCalculatedValue) || !Valid(PrevFieldVal)) m_bChanged = !(!Valid(m_dCalculatedValue) && !Valid(PrevFieldVal)); else m_bChanged = (fabs(m_dCalculatedValue-PrevFieldVal)>1.0e-3); } m_bResetReqd = false; } //=========================================================================== ADOX::DataTypeEnum CArchiveDBField::dbType() { switch (m_iType) { case tt_Float: case tt_Double: return ADOX::adDouble; case tt_Strng: return ADOX::adVarWChar; case tt_Generic: return ADOX::adDate; } return ADOX::adInteger; }; //=========================================================================== ADOX::ColumnAttributesEnum CArchiveDBField::dbAttr() { return ADOX::adColNullable; }; //=========================================================================== CArchiveTrigger::CArchiveTrigger(CArchiveManager *pAM) : m_rAM(*pAM) { m_bInitReqd = true; m_bRewindReqd = false; m_bStepTest = false; m_bRise = false; m_bFall = false; m_bAny = false; m_iTriggerFiredCount = 0; } //--------------------------------------------------------------------------- CArchiveTrigger::~CArchiveTrigger() { } //--------------------------------------------------------------------------- bool CArchiveTrigger::Parse(LPCTSTR Table, int No, LPCTSTR Cfg) { if (Cfg==NULL || strlen(Cfg)==0) return false; char Buff[4096]; CSVColArray c; int Quote; strncpy(Buff, Cfg, sizeof(Buff)); int nFlds = ParseCSVTokens(Buff, c, Quote, NULL, true);//, "="); if (Quote || nFlds<3) goto Bad; else { if (strlen(c[0])>0) m_sName = c[0]; else m_sName.Format("%s.Trigger%i", Table, No); Strng WrkTag,WrkCnvTxt; TaggedObject::SplitTagCnv(c[1], WrkTag, WrkCnvTxt); if (WrkTag.Len()==0) { LogError(ArcName, 0, "Tag not specified for Trigger '%s'", Cfg); return false; } m_Src.SetTag(WrkTag()); m_sCnvTxt = WrkCnvTxt(); m_dPrevAny=0.0; m_dPrevEdge=0.0; for (int i=2; c[i] && strlen(c[i])>0; i++) { LPTSTR Tkn=c[i]; char *p; while ((p=strchr(Tkn,' '))!=NULL) memmove(p, p+1, strlen(p+1)+1); if (_strnicmp(Tkn, "delta=", 6)==0) { m_bStepTest = false; m_bAny=true; m_dDeltaAny=fabs(SafeAtoF(Tkn+6,1)); } else if (_strnicmp(Tkn, "rise=", 5)==0) { m_bStepTest = false; m_bRise=true; m_dDeltaRise=fabs(SafeAtoF(Tkn+5,1)); } else if (_strnicmp(Tkn, "fall=", 5)==0) { m_bStepTest = false; m_bFall=true; m_dDeltaFall=fabs(SafeAtoF(Tkn+5,1)); } else if (_stricmp(Tkn, "delta")==0) { m_bStepTest = false; m_bAny=true; m_dDeltaAny=1; } else if (_stricmp(Tkn, "rise")==0) { m_bStepTest = false; m_bRise=true; m_dDeltaRise=1; } else if (_stricmp(Tkn, "fall")==0) { m_bStepTest = false; m_bFall=true; m_dDeltaFall=1; } else if (_strnicmp(Tkn, "stepdelta=", 10)==0) { m_bStepTest = true; m_bAny=true; m_dDeltaAny=fabs(SafeAtoF(Tkn+10,1)); } else if (_strnicmp(Tkn, "steprise=", 9)==0) { m_bStepTest = true; m_bRise=true; m_dDeltaRise=fabs(SafeAtoF(Tkn+9,1)); } else if (_strnicmp(Tkn, "stepfall=", 9)==0) { m_bStepTest = true; m_bFall=true; m_dDeltaFall=fabs(SafeAtoF(Tkn+9,1)); } else if (_stricmp(Tkn, "stepdelta")==0) { m_bStepTest = true; m_bAny=true; m_dDeltaAny=1; } else if (_stricmp(Tkn, "steprise")==0) { m_bStepTest = true; m_bRise=true; m_dDeltaRise=1; } else if (_stricmp(Tkn, "stepfall")==0) { m_bStepTest = true; m_bFall=true; m_dDeltaFall=1; } else if (_stricmp(Tkn, "passing")==0) { _asm int 3; //m_bFall=true; //m_dDeltaFall=1; } else goto Bad; } m_bInitReqd=true; } return true; Bad: LogError(ArcName, 0, "Bad Trigger Configuration %s", Cfg); return false; } //--------------------------------------------------------------------------- bool CArchiveTrigger::TestTrigger() { const double CurValue=m_Src.GetValue(m_rAM, m_sCnvTxt()); bool Triggered=false; if (m_bInitReqd) { m_iTriggerFiredCount = 0; m_bInitReqd = false; m_dPrevAny = CurValue; m_dPrevEdge = CurValue; m_bRewindReqd = true; } if (m_bRewindReqd) { m_bRewindReqd = false; } const bool ValidCur = Valid(CurValue); if (m_bRise || m_bFall) { const bool ValidEdge = Valid(m_dPrevEdge); if (ValidCur || ValidEdge) { if (ValidCur!=ValidEdge) { Triggered=true; } else if (m_bRise && (CurValue-m_dPrevEdge)>m_dDeltaRise) { Triggered=true; } else if (m_bFall && (CurValue-m_dPrevEdge)<-m_dDeltaFall) { Triggered=true; } } if (Triggered) m_dPrevEdge=CurValue; } else if (m_bAny) { const bool ValidAny = Valid(m_dPrevAny); if (ValidCur || ValidAny) { if (ValidCur!=ValidAny || fabs(CurValue-m_dPrevAny)>m_dDeltaAny) { m_dPrevAny=CurValue; Triggered=true; } } } if (m_bStepTest) { m_dPrevEdge=CurValue; m_dPrevAny=CurValue; } //if (Triggered && DoTriggerNote) // LogNote(ArcName, 0, "%s: %s", (LPCTSTR)m_sName, How); if (Triggered) m_iTriggerFiredCount++; return Triggered; } //=========================================================================== CArchiveDBTable::CArchiveDBTable(CArchiveManager *pAM, LPCTSTR TbName) : m_rAM(*pAM) { m_bInitReqd = true; m_bRewindReqd = false; m_dNextSaveTime = CTimeValue(0.0); m_bPeriodOn = false; m_iFormat = ADBTbFmt_Null; m_sName = TbName; m_bOn = true; m_hFile = NULL; m_nSigDigits = 20; m_nTxtRecNo = -1; m_bClearOnRewind = true; } //--------------------------------------------------------------------------- CArchiveDBTable::CArchiveDBTable(CArchiveManager *pAM, LPCTSTR TbName, byte iTbFmt, LPCTSTR sPath, byte iSigDigits) : m_rAM(*pAM) { m_bInitReqd = true; m_bRewindReqd = false; m_dNextSaveTime = CTimeValue(0.0); m_bPeriodOn = false; m_hFile = NULL; m_nTxtRecNo = -1; m_sName = TbName; m_iFormat = iTbFmt; m_sPath = sPath; m_nSigDigits = iSigDigits; m_bClearOnRewind = true; } //--------------------------------------------------------------------------- CArchiveDBTable::~CArchiveDBTable() { for (int t=0; t<m_Triggers.GetSize(); t++) delete m_Triggers[t]; m_Triggers.SetSize(0); m_Fields.SetSize(0); } //--------------------------------------------------------------------------- const long SecondsInDay=24*60*60; const long SecondsInHour=60*60; const long SecondsInMinute=60; bool CArchiveDBTable::AddPeriod(long Period, long Offset) { m_lPeriod = Max(0L,Period); m_lOffset = Range(0L, Offset, SecondsInDay); m_bPeriodOn = m_lPeriod>0; m_bInitReqd = true; m_bRewindReqd = false; if (m_bPeriodOn) { if (m_lPeriod<SecondsInDay && ((SecondsInDay % m_lPeriod)!=0)) LogNote(ArcName, 0, "Period for %s not modulo 24 hours", (LPCTSTR)m_sName); if (m_lPeriod>SecondsInDay && ((m_lPeriod % SecondsInDay)!=0)) LogNote(ArcName, 0, "Period for %s not modulo 24 hours", (LPCTSTR)m_sName); } return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::AddTrigger(LPCTSTR Cfg) { CArchiveTrigger * pTr=new CArchiveTrigger(&m_rAM); if (!pTr->Parse(m_sName, m_Triggers.GetCount()+1, Cfg)) { delete pTr; return false; } else m_Triggers.Add(pTr); return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::Execute(CXM_TimeControl &CB) { return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::StepDone(CXM_TimeControl &CB) { if (!m_bOn) return true; bool DoSavePer=false; bool DoSaveTrg=false; CTimeValue Period((double)m_lPeriod); CTimeValue Offset((double)m_lOffset); if (m_bInitReqd) { m_bInitReqd = false; m_bRewindReqd = true; } if (m_bRewindReqd) { if (m_bPeriodOn) { __time64_t tt=(__time64_t)CB.m_TheTime.Seconds; //tm* t=_localtime64(&tt); tm* t=_gmtime64(&tt); CTimeValue CurTimeInDay((double)(t->tm_sec+t->tm_min*SecondsInMinute+t->tm_hour*SecondsInHour)); CTimeValue SaveTimeInDay(Offset); //simple - could be more efficient while (SaveTimeInDay-Period>CurTimeInDay) SaveTimeInDay-=Period; while (SaveTimeInDay<CurTimeInDay) SaveTimeInDay+=Period; m_dNextSaveTime=CB.m_TheTime-CurTimeInDay+SaveTimeInDay; } if (0) { dbgpln("CArchiveDBTable::StepDone %s %14.3f %14.3f %8.3f %s", "Rewind", m_dNextSaveTime.Seconds, CB.m_TheTime.Seconds, m_bPeriodOn?(m_dNextSaveTime-CB.m_TheTime).Seconds:-1, m_sName); } m_bRewindReqd=false; } else { if (0) { dbgpln("CArchiveDBTable::StepDone %s %14.3f %14.3f %8.3f %s", " ", m_dNextSaveTime.Seconds, CB.m_TheTime.Seconds, m_bPeriodOn?(m_dNextSaveTime-CB.m_TheTime).Seconds:-1, m_sName); } } bool DoTriggerNote=false; // ??????????????? #if dbgArchiver if (dbgArchiverWrites()) DoTriggerNote=true; #endif if (m_bPeriodOn && (CB.m_TheTime>=m_dNextSaveTime)) { DoSavePer=true; m_dNextSaveTime+=Period; if (DoTriggerNote) LogNote(ArcName,0,"%s %s", "Periodic", (LPCTSTR)m_sName); //LogNote(ArcName,0,"%s %s %s", CB.m_TheTime.Format(TD_Time), DoSavePer ? "Period ":"Trigger",(LPCTSTR)m_sName); } for (int tr=0; tr<m_Triggers.GetSize(); tr++) DoSaveTrg = DoSaveTrg || m_Triggers[tr]->TestTrigger();//DoTriggerNote); if (DoSavePer || DoSaveTrg) { //if (DoTriggerNote) // LogNote(ArcName,0,"%s %s %s", CB.m_TheTime.Format(TD_Time), DoSavePer ? "Period ":"Trigger",(LPCTSTR)m_sName); if (m_rAM.m_bDBOK) { AddDBRecord(CB); } else { LogWarning(ArcName,0,"Record not written : %s %s %s", CB.m_TheTime.Format(TD_Time), DoSavePer ? "Period ":"Trigger",(LPCTSTR)m_sName); } const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) m_Fields[fd]->m_bResetReqd=true; } return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::CreateDBTable() { if (!m_bOn) return true; switch (m_iFormat) { case ADBTbFmt_DB: { ADOX::_TablePtr pTbl; try { // m_Def try { pTbl=m_rAM.m_pCat->Tables->GetItem((LPCTSTR)m_sName); CreateDBFields(pTbl); } catch (_com_error & e) { if (SCODE_CODE(e.Error())!=ADODB::adErrItemNotFound) //if (e->m_pErrorInfo->m_lErrorCode!=3265) { m_rAM.DisplayException(e, LF_Exclamation); return true; } else { try { pTbl=ADOX::_TablePtr(__uuidof(ADOX::Table)); pTbl->Name=(LPCTSTR)m_sName; pTbl->ParentCatalog = m_rAM.m_pCat; CreateDBFields(pTbl); m_rAM.m_pCat->Tables->Append((IDispatch*)pTbl); m_rAM.m_nTablesOpn++; //m_pDef->Create(m_sName); //if (CreateDBFields()) // m_pDef->Append(); //m_rAM.m_nTablesOpn++; } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Create Table", (LPCTSTR)m_sName); return false; } } } } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Create Table", (LPCTSTR)m_sName); //delete m_pDef; return false; } break; } case ADBTbFmt_CSV: case ADBTbFmt_TXT: { bool OK = ReOpenTxtTable(m_rAM.m_bRewind); if (OK) m_rAM.m_nTablesOpn++; return OK; break; } } return true; }; //--------------------------------------------------------------------------- bool CArchiveDBTable::DeleteDBTable() { if (m_bOn) return false; switch (m_iFormat) { case ADBTbFmt_DB: { try { m_rAM.m_pCat->Tables->Delete((LPCTSTR)m_sName); return true; } catch (_com_error & e) { if (SCODE_CODE(e.Error())!=ADODB::adErrItemNotFound) { m_rAM.DisplayException(e, LF_Exclamation, "Delete Table", (LPCTSTR)m_sName); return false; } return true; } break; } case ADBTbFmt_CSV: case ADBTbFmt_TXT: { remove(m_sFileName()); break; } } return true; }; //--------------------------------------------------------------------------- bool CArchiveDBTable::ReOpenTxtTable(bool Rewind) { if (!m_bOn) return true; if (0) dbgpln("CArchiveDBTable::ReOpenTxtTable %s %s", Rewind?"Rewind":" ", m_sName); if (m_hFile) { if (fclose(m_hFile)==0) { m_hFile=NULL; } else { LogError(ArcName, 0, "Table File '%s' not Closed", m_sFileName); return false; } } m_nTxtRecNo=0; Strng Path(m_sPath); Path.FnExpand(); if (Path.GetLength()<2) m_sFileName=PrjFiles(); else if (Path[0]=='\\' || Path[1]==':') m_sFileName=Path; else { m_sFileName=PrjFiles(); m_sFileName+=Path; } m_sFileName.FnCheckEndBSlash(); Strng Err; if (FnCreatePath(m_sFileName(), Err)) { m_sFileName+=m_sName; m_sFileName.FnCheckExtension(m_iFormat==ADBTbFmt_CSV?"CSV":"TXT"); if (Rewind) { m_hFile=fopen(m_sFileName(), "w"); if (m_hFile==NULL) { LogError(ArcName, 0, "Tablefile '%s' not opened", m_sFileName()); return false; } } else { m_hFile=fopen(m_sFileName(), "a+"); if (m_hFile==0) { LogError(ArcName, 0, "Tablefile '%s' not opened", m_sFileName()); return false; } while (!feof(m_hFile)) { char buff[8192]; if (fgets(buff, sizeof(buff), m_hFile)) m_nTxtRecNo=SafeAtoL(buff,m_nTxtRecNo); else break; } } CreateTxtFields(); } else { LogError(ArcName, 0, "Table Path '%s' not created", m_sFileName()); return false; } return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::CreateDBFields(ADOX::_TablePtr & pTbl) { CreateDBField(pTbl, true, sRecordStr, ADOX::adInteger, 0, ADOX::ColumnAttributesEnum (0), true/*dbAutoIncrField*/); for (int f=0; f<m_Fields.GetSize(); f++) { CArchiveDBField &It=*m_Fields[f]; CreateDBField(pTbl, It.m_bSystem, It.m_sFldTag, It.dbType(), It.m_iSize, It.dbAttr()); } return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::CreateTxtFields() { if (m_hFile) { char Separ = (m_iFormat==ADBTbFmt_CSV)?',':'\t'; fprintf(m_hFile, "%s", sRecordStr); for (int f=0; f<m_Fields.GetSize(); f++) { CArchiveDBField &It=*m_Fields[f]; fprintf(m_hFile, "%c%s", Separ, It.m_sFldTag); m_rAM.m_nFieldsOpn++; } fprintf(m_hFile, "\n"); fflush(m_hFile); } return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::CreateDBField(ADOX::_TablePtr & pTbl, bool SysFld, LPCTSTR FldName, ADOX::DataTypeEnum FldType, int Size, ADOX::ColumnAttributesEnum FldAttr, bool MakeAutoInc) { if (!m_bOn) return true; bool FieldTypeError = false; ADOX::_ColumnPtr pCol; try { pCol=pTbl->Columns->GetItem(FldName); //m_pDef->GetFieldInfo(FldName, FI); if (pCol->Type!=FldType) {//how do you change the type of a field!? LogError(ArcName, 0, "Field type mismatch for '%s' (delete the table or mdb)", FldName); FieldTypeError = true; } else { if (!SysFld) m_rAM.m_nFieldsOpn++; } } catch (_com_error & e) { if (SCODE_CODE(e.Error())!=ADODB::adErrItemNotFound) //if (e->m_pErrorInfo->m_lErrorCode!=3265) { m_rAM.DisplayException(e, LF_Exclamation); return false; } else { try { ADOX::_ColumnPtr pCol=ADOX::_ColumnPtr(__uuidof(ADOX::Column)); pCol->Name=FldName; pCol->Type=FldType; switch (FldType) { case ADOX::adInteger: pCol->DefinedSize=sizeof(long); break; case ADOX::adVarWChar: pCol->DefinedSize=Size; break; default: pCol->DefinedSize=0; break; } if (FldType==ADOX::adBoolean) // it appears that adBooleans are allways nullable ???? CNM FldAttr=ADOX::ColumnAttributesEnum(FldAttr&~ADOX::adColNullable); pCol->Attributes=FldAttr; pTbl->Columns->Append((IDispatch*)pCol, FldType, 0); if (MakeAutoInc) { bool xxx=pCol->Properties->GetItem("AutoIncrement")->Value; pCol->Properties->GetItem("AutoIncrement")->Value=MakeAutoInc; } if (!SysFld) m_rAM.m_nFieldsOpn++; } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Create Field", FldName); return false; } } } if (FieldTypeError) return false; return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::CreateDBRecordset() { if (!m_bOn) return true; switch(m_iFormat) { case ADBTbFmt_DB: try { m_pRst=ADODB::_RecordsetPtr(__uuidof(ADODB::Recordset)); m_pRst->Open((LPCTSTR)m_sName, _variant_t((IDispatch*)m_rAM.m_pCnn), ADODB::adOpenDynamic, ADODB::adLockOptimistic/*ReadOnly*/, ADODB::adCmdTableDirect); } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Open RS ", (LPCTSTR)m_sName); m_pRst.Release(); return false; } break; case ADBTbFmt_CSV: case ADBTbFmt_TXT: break; } return true; }; //--------------------------------------------------------------------------- #pragma warning(push) #pragma warning(disable : 4101) bool CArchiveDBTable::DeleteDBRecords() { if (!m_bOn) return true; int n=9000; // MaxLocksPerFile limit = 9500 if (m_pRst!=0) { try { try { m_pRst->MoveFirst(); } catch (...) { n=-1; // stop it; } while (!m_pRst->BOF && !m_pRst->adEOF && --n>=0) { //dbgpln("delete %5i %s", n, m_sName); m_pRst->Delete(ADODB::adAffectCurrent); try { m_pRst->MoveFirst(); } catch (...) { n=-1; // stop it; } } } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Deleting records from ", m_sName); return false; } } return true; } #pragma warning(pop) //--------------------------------------------------------------------------- void CArchiveDBTable::AddTimeFieldsDB(CXM_TimeControl &CB) { if (m_rAM.m_dwOptions & (LogItem_Time | LogItem_TimeDate | LogItem_TimeTime)) { COleDateTime DT; __time64_t TheTime=(__time64_t)CB.m_TheTime.Seconds; //tm* t=_localtime64(&TheTime); tm* t=_gmtime64(&TheTime); if (m_rAM.m_dwOptions & LogItem_Time) { DT.SetDateTime(t->tm_year+1900, t->tm_mon+1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); COleVariant dv1(DT); m_pRst->Fields->GetItem(sDateTimeStr)->Value=dv1; } if (m_rAM.m_dwOptions & LogItem_TimeDate) { DT.SetDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday); COleVariant dv1(DT); m_pRst->Fields->GetItem(sDateStr)->Value=dv1; } if (m_rAM.m_dwOptions & LogItem_TimeTime) { DT.SetTime(t->tm_hour, t->tm_min, t->tm_sec); COleVariant dv1(DT); m_pRst->Fields->GetItem(sTimeStr)->Value=dv1; } } CTimeValue ET=(m_rAM.m_TimeAtStartValid ? CB.m_TheTime.Seconds-m_rAM.m_TimeAtStart.Seconds : 0); if (m_rAM.m_dwOptions & LogItem_ElapsedHMS) { CString S; if (m_rAM.m_TimeAtStartValid) S=ET.Format(TD_DateLeft|TD_Time|TD_TrimTime); m_pRst->Fields->GetItem(sElapsedHMSStr)->Value=COleVariant(S); } if (m_rAM.m_dwOptions & LogItem_ElapsedDays) m_pRst->Fields->GetItem(sElapsedDaysStr)->Value=COleVariant(ET.Seconds/86400.0); if (m_rAM.m_dwOptions & LogItem_ElapsedHrs) m_pRst->Fields->GetItem(sElapsedHrsStr)->Value=COleVariant(ET.Seconds/3600.0); if (m_rAM.m_dwOptions & LogItem_ElapsedMins) m_pRst->Fields->GetItem(sElapsedMinsStr)->Value=COleVariant(ET.Seconds/60.0); if (m_rAM.m_dwOptions & LogItem_ElapsedSecs) m_pRst->Fields->GetItem(sElapsedSecsStr)->Value=COleVariant(ET.Seconds/1.0); } //--------------------------------------------------------------------------- void CArchiveDBTable::AddTimeFieldsTxt(CXM_TimeControl &CB, char Separ) { if (m_rAM.m_dwOptions & (LogItem_Time | LogItem_TimeDate | LogItem_TimeTime)) { CString S; if (m_rAM.m_dwOptions & LogItem_Time) { S=CB.m_TheTime.Format(TD_DateLeft|TD_Time|TD_TrimTime); fprintf(m_hFile, "%c%s", Separ, S); } if (m_rAM.m_dwOptions & LogItem_TimeDate) { S=CB.m_TheTime.Format(TD_DateLeft|TD_DateStrFormat); fprintf(m_hFile, "%c%s", Separ, S); } if (m_rAM.m_dwOptions & LogItem_TimeTime) { S=CB.m_TheTime.Format(TD_Time|TD_TimeOnly); fprintf(m_hFile, "%c%s", Separ, S); } } CTimeValue ET=(m_rAM.m_TimeAtStartValid ? CB.m_TheTime.Seconds-m_rAM.m_TimeAtStart.Seconds : 0); if (m_rAM.m_dwOptions & LogItem_ElapsedHMS) { CString S; if (m_rAM.m_TimeAtStartValid) S=ET.Format(TD_DateLeft|TD_Time|TD_TrimTime); fprintf(m_hFile, "%c%s", Separ, S); } if (m_rAM.m_dwOptions & LogItem_ElapsedDays) fprintf(m_hFile, "%c%.3f", Separ, ET.Seconds/86400.0); if (m_rAM.m_dwOptions & LogItem_ElapsedHrs) fprintf(m_hFile, "%c%.3f", Separ, ET.Seconds/3600.0); if (m_rAM.m_dwOptions & LogItem_ElapsedMins) fprintf(m_hFile, "%c%.3f", Separ, ET.Seconds/60.0); if (m_rAM.m_dwOptions & LogItem_ElapsedSecs) fprintf(m_hFile, "%c%.3f", Separ, ET.Seconds/1.0); } //--------------------------------------------------------------------------- bool CArchiveDBTable::AddDBRecord(CXM_TimeControl &CB) { if (!m_bOn) return true; if (m_iFormat==ADBTbFmt_DB) { if (m_pRst==NULL) return false; try { m_pRst->AddNew(); AddTimeFieldsDB(CB); const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) { CArchiveDBField & Fld=*m_Fields[fd]; if (!Fld.m_bSystem) { //COleVariant v((double)fd); if (Fld.m_iFn==ADBFn_String) m_pRst->Fields->GetItem((LPCTSTR)Fld.m_sFldTag)->Value = (const char*)Fld.m_sInputValue; else m_pRst->Fields->GetItem((LPCTSTR)Fld.m_sFldTag)->Value = Fld.m_dCalculatedValue; } } m_pRst->Update(); } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Adding Record ", (LPCTSTR)m_sName); return false; } } else { if (m_hFile==NULL) return false; //CTimeValue TFS; //TFS=(CB.m_TheTime-m_rAM.m_TimeAtStart); char Separ = (m_iFormat==ADBTbFmt_CSV)?',':'\t'; fprintf(m_hFile, "%i", ++m_nTxtRecNo); AddTimeFieldsTxt(CB, Separ); m_nSigDigits=Range(2,(int)m_nSigDigits,20); const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) { CArchiveDBField & Fld=*m_Fields[fd]; if (!Fld.m_bSystem) { if (Fld.m_iFn==ADBFn_String) fprintf(m_hFile, "%c'%s'", Separ, (const char*)(Fld.m_sInputValue)); else fprintf(m_hFile, "%c%.*g", Separ, m_nSigDigits, Fld.m_dCalculatedValue); } } fprintf(m_hFile, "\n"); fflush(m_hFile); } return true; } //--------------------------------------------------------------------------- bool CArchiveDBTable::AddMsgRecord(CXM_TimeControl &CB, CMsgLogItem & Msg) { if (!m_bOn) return true; CAutoIncDec AID(m_rAM.m_iBusyLoggingMsg); CString Type; if (m_rAM.m_dwOptions & LogItem_Type) { switch (Msg.m_dwFlags & (LogFlag_Fatal | LogFlag_Stop | LogFlag_Separator | LogFlag_Error | LogFlag_Warning | LogFlag_Note | LogFlag_Cmd | LogFlag_CondClear | LogFlag_RngClear)) { case LogFlag_Fatal: Type= "Fatal"; break; case LogFlag_Stop: Type= "Stop"; break; case LogFlag_Error: Type= "Errot"; break; case LogFlag_Warning: Type="Warning"; break; case LogFlag_Note: Type = "Note"; break; } } if (m_iFormat==ADBTbFmt_DB) { if (m_pRst==NULL) return false; try { m_pRst->AddNew(); AddTimeFieldsDB(CB); if (m_rAM.m_dwOptions & LogItem_Command) m_pRst->Fields->GetItem(sCommandStr)->Value = 0;//Msg.m_lIDNo; if (m_rAM.m_dwOptions & LogItem_Type) m_pRst->Fields->GetItem(sTypeStr)->Value = (LPCTSTR)Type; if (m_rAM.m_dwOptions & LogItem_Source) m_pRst->Fields->GetItem(sSourceStr)->Value = Msg.Source(); if (m_rAM.m_dwOptions & LogItem_IDNo) m_pRst->Fields->GetItem(sIDNoStr)->Value = Msg.m_lIDNo; if (m_rAM.m_dwOptions & LogItem_IterNo) m_pRst->Fields->GetItem(sIterNoStr)->Value = Msg.m_lIterNo; if (m_rAM.m_dwOptions & LogItem_CallNo) m_pRst->Fields->GetItem(sCallNoStr)->Value = Msg.m_lCallNo; if (m_rAM.m_dwOptions & LogItem_SeqNo) m_pRst->Fields->GetItem(sSeqNoStr)->Value = Msg.m_lSeqNo; if (m_rAM.m_dwOptions & LogItem_Message) m_pRst->Fields->GetItem(sMessageStr)->Value = Msg.Description(); const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) { if (!m_Fields[fd]->m_bSystem) { //COleVariant v((double)fd); m_pRst->Fields->GetItem((LPCTSTR)m_Fields[fd]->m_sFldTag)->Value = m_Fields[fd]->m_dCalculatedValue; } } m_pRst->Update(); } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Adding Record ", (LPCTSTR)m_sName); return false; } } else { if (m_hFile==NULL) return false; char Separ = (m_iFormat==ADBTbFmt_CSV)?',':'\t'; fprintf(m_hFile, "%i", ++m_nTxtRecNo); AddTimeFieldsTxt(CB, Separ); if (m_rAM.m_dwOptions & LogItem_Command) fprintf(m_hFile, "%c%i", Separ, 0);//Msg.m_lIDNo); if (m_rAM.m_dwOptions & LogItem_Type) fprintf(m_hFile, "%c%s", Separ, (LPCTSTR)Type); if (m_rAM.m_dwOptions & LogItem_Source) fprintf(m_hFile, "%c%s", Separ, Msg.Source()); if (m_rAM.m_dwOptions & LogItem_IDNo) fprintf(m_hFile, "%c%i", Separ, Msg.m_lIDNo); if (m_rAM.m_dwOptions & LogItem_IterNo) fprintf(m_hFile, "%c%i", Separ, Msg.m_lIterNo); if (m_rAM.m_dwOptions & LogItem_CallNo) fprintf(m_hFile, "%c%i", Separ, Msg.m_lCallNo); if (m_rAM.m_dwOptions & LogItem_SeqNo) fprintf(m_hFile, "%c%i", Separ, Msg.m_lSeqNo); if (m_rAM.m_dwOptions & LogItem_Message) fprintf(m_hFile, "%c%s", Separ, Msg.Description()); m_nSigDigits=Range(2,(int)m_nSigDigits,20); const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) { if (!m_Fields[fd]->m_bSystem) fprintf(m_hFile, "%c%.*g", Separ, m_nSigDigits, m_Fields[fd]->m_dCalculatedValue); } fprintf(m_hFile, "\n"); fflush(m_hFile); } return true; }; //--------------------------------------------------------------------------- bool CArchiveDBTable::AddEventRecord(CXM_TimeControl &CB, LPCTSTR Tag, LPCTSTR Msg) { if (!m_bOn) return true; CAutoIncDec AID(m_rAM.m_iBusyLoggingEvent); if (m_iFormat==ADBTbFmt_DB) { if (m_pRst==NULL) return false; try { m_pRst->AddNew(); //COleDateTime DT; AddTimeFieldsDB(CB); if (m_rAM.m_dwOptions & LogItem_Tag) m_pRst->Fields->GetItem(sTagStr)->Value=Tag; if (m_rAM.m_dwOptions & LogItem_Message) m_pRst->Fields->GetItem(sMessageStr)->Value=Msg; const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) { if (!m_Fields[fd]->m_bSystem) { //COleVariant v((double)fd); m_pRst->Fields->GetItem((LPCTSTR)m_Fields[fd]->m_sFldTag)->Value = m_Fields[fd]->m_dCalculatedValue; } } m_pRst->Update(); } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Adding Record ", (LPCTSTR)m_sName); return false; } } else { if (m_hFile==NULL) return false; char Separ = (m_iFormat==ADBTbFmt_CSV)?',':'\t'; fprintf(m_hFile, "%i", ++m_nTxtRecNo); AddTimeFieldsTxt(CB, Separ); if (m_rAM.m_dwOptions & LogItem_Tag) fprintf(m_hFile, "%c%s", Separ, Tag); if (m_rAM.m_dwOptions & LogItem_Message) fprintf(m_hFile, "%c%s", Separ, Msg); m_nSigDigits=Range(2,(int)m_nSigDigits,20); for (long fd=0; fd<m_Fields.GetSize(); fd++) { if (!m_Fields[fd]->m_bSystem) fprintf(m_hFile, "%c%.*g", Separ, m_nSigDigits, m_Fields[fd]->m_dCalculatedValue); } fprintf(m_hFile, "\n"); fflush(m_hFile); } return true; }; //--------------------------------------------------------------------------- bool CArchiveDBTable::CloseDBTable() { if (!m_bOn) return true; switch (m_iFormat) { case ADBTbFmt_DB: { try { if (m_pRst) { m_pRst->Close(); m_pRst.Release(); } //if (m_pDef) // m_pDef->Close(); //delete m_pDef; //m_pDef=NULL; } catch (_com_error & e) { m_rAM.DisplayException(e, LF_Exclamation, "Closing Table ", (LPCTSTR)m_sName); return false; } break; } case ADBTbFmt_CSV: case ADBTbFmt_TXT: { if (m_hFile) { if (fclose(m_hFile)==0) { m_hFile=NULL; } else { LogError(ArcName, 0, "Table File '%s' not Closed", m_sName); return false; } } break; } } return true; } //=========================================================================== CArchiveManager::CArchiveManager() : \ m_evDone(FALSE) { //m_pDB=NULL; m_lChgSrchStart=0; m_bOn=false; m_bAllowTagAccess=false; m_bDBOK=false; m_bRegistered=false; //m_bOpenDBOnRun=true; //m_bUseArchive=false; m_bDBExclusive=false; m_bDBReadOnly=false; m_iLoadSaveCnt=0; m_pMessageLog=NULL; m_pEventLog=NULL; m_iBusyLoggingMsg=0; m_iBusyLoggingEvent=0; m_lInputOffset=0; m_lBusyChanges=0; m_dwOptions = 0; m_bFirstClear =true; }; //--------------------------------------------------------------------------- CArchiveManager::~CArchiveManager() { for (int s=0; s<m_Inputs.GetSize(); s++) delete m_Inputs[s]; m_Inputs.SetSize(0); for (int i=0; i<m_Fields.GetSize(); i++) delete m_Fields[i]; m_Fields.SetSize(0); for (int t=0; t<m_Tables.GetSize(); t++) delete m_Tables[t]; m_Tables.SetSize(0); m_FieldMap.RemoveAll(); if (m_sPrevTempFile.GetLength()) DeleteFile(m_sPrevTempFile); } //--------------------------------------------------------------------------- long CArchiveManager::FindInputIndex(LPCTSTR Tag) { const long n=m_Inputs.GetSize(); for (long i=0; i<n; i++) if (_stricmp(m_Inputs[i]->m_sScdMTag, Tag)==0) return i; return -1; } //--------------------------------------------------------------------------- long CArchiveManager::FindFieldIndex(LPCTSTR Tag) { const long n=m_Fields.GetSize(); for (long i=0; i<n; i++) if (_stricmp(m_Fields[i]->m_sScdMTag, Tag)==0) return i; return -1; } //--------------------------------------------------------------------------- long CArchiveManager::FindTable(LPCTSTR TbName) { const int NT=m_Tables.GetSize(); for (long i=0; i<NT; i++) if (m_Tables[i]->m_sName.CompareNoCase(TbName)==0) return i; return -1; } //--------------------------------------------------------------------------- long CArchiveManager::FindField(LPCTSTR TbName, LPCTSTR FldName) { const long iTb=FindTable(TbName); if (iTb>=0) return FindField(iTb, FldName); return -1; } //--------------------------------------------------------------------------- long CArchiveManager::FindField(long iTb, LPCTSTR FldName) { if (iTb>=0) { CArchiveDBTable &Tb=*m_Tables[iTb]; const long n=Tb.m_Fields.GetSize(); for (long i=0; i<n; i++) if (Tb.m_Fields[i]->m_sFldTag.CompareNoCase(FldName)==0) return i; } return -1; } //--------------------------------------------------------------------------- void CArchiveManager::Initialise() { m_sDataFile = ""; for (int s=0; s<m_Inputs.GetSize(); s++) delete m_Inputs[s]; for (int i=0; i<m_Fields.GetSize(); i++) delete m_Fields[i]; for (int t=0; t<m_Tables.GetSize(); t++) delete m_Tables[t]; m_FieldMap.RemoveAll(); m_FieldMap.InitHashTable(53); m_Fields.SetSize(0,64); m_Inputs.SetSize(0,64); m_Tables.SetSize(0,16); m_lChgSrchStart=0; m_bOn=false; m_bAllowTagAccess=false; m_bDBOK=false; m_bDBExclusive=false; m_bDBReadOnly=false; m_iLoadSaveCnt=0; m_bRewind = false; } // -------------------------------------------------------------------------- //int CArchiveManager::Configure(const char * CfgFile, bool OpenDBOnRun) // { // m_sCfgFile= CfgFile; // //m_bOpenDBOnRun=OpenDBOnRun; // // return 0; // } //--------------------------------------------------------------------------- void CArchiveManager::AddTimeFields(LPCTSTR Table) { if (m_dwOptions & LogItem_Time ) AddField(Table, sDateTimeStr , "Reserved"); if (m_dwOptions & LogItem_TimeDate ) AddField(Table, sDateStr , "Reserved"); if (m_dwOptions & LogItem_TimeTime ) AddField(Table, sTimeStr , "Reserved"); if (m_dwOptions & LogItem_ElapsedHMS ) AddField(Table, sElapsedHMSStr , "Reserved"); if (m_dwOptions & LogItem_ElapsedDays ) AddField(Table, sElapsedDaysStr, "Reserved"); if (m_dwOptions & LogItem_ElapsedHrs ) AddField(Table, sElapsedHrsStr , "Reserved"); if (m_dwOptions & LogItem_ElapsedMins ) AddField(Table, sElapsedMinsStr, "Reserved"); if (m_dwOptions & LogItem_ElapsedSecs ) AddField(Table, sElapsedSecsStr, "Reserved"); } //--------------------------------------------------------------------------- void CArchiveManager::AddReqdTables() { CArchiveDBTable * pMsgTb=new CArchiveDBTable(this, sMessageLogStr, ADBTbFmt_DB, "Archive", 5); CArchiveDBTable * pEvtTb=new CArchiveDBTable(this, sEventLogStr, ADBTbFmt_DB, "Archive", 5); m_Tables.Add(pMsgTb); m_Tables.Add(pEvtTb); AddTimeFields(sMessageLogStr); if (m_dwOptions & LogItem_Command ) AddField(sMessageLogStr, sCommandStr , "Reserved"); if (m_dwOptions & LogItem_Type ) AddField(sMessageLogStr, sTypeStr , "Reserved"); if (m_dwOptions & LogItem_Source ) AddField(sMessageLogStr, sSourceStr , "Reserved"); if (m_dwOptions & LogItem_IDNo ) AddField(sMessageLogStr, sIDNoStr , "Reserved"); if (m_dwOptions & LogItem_IterNo ) AddField(sMessageLogStr, sIterNoStr , "Reserved"); if (m_dwOptions & LogItem_CallNo ) AddField(sMessageLogStr, sCallNoStr , "Reserved"); if (m_dwOptions & LogItem_SeqNo ) AddField(sMessageLogStr, sSeqNoStr , "Reserved"); if (m_dwOptions & LogItem_Message ) AddField(sMessageLogStr, sMessageStr , "Reserved"); AddTimeFields(sEventLogStr); if (m_dwOptions & LogItem_Tag ) AddField(sEventLogStr, sTagStr , "Reserved"); if (m_dwOptions & LogItem_Message ) AddField(sEventLogStr, sMessageStr , "Reserved"); }; //--------------------------------------------------------------------------- DWORD CArchiveManager::ReadOptions(LPCTSTR FileName) { Strng Fn(FileName); Fn.FnExpand(); CheckCfg(Fn()); CProfINIFile PF(Fn()); LPCTSTR sDblOpt=PF.RdStr("Columns", "ElapsedDbl ", ""); DWORD Opts = 0; //if (PF.RdInt("Columns", "Time" , 0)!=0) Opts |= LogItem_Time ;//for backward compatability if (PF.RdInt("Columns", "DateTime" , 0)!=0) Opts |= LogItem_Time ; if (PF.RdInt("Columns", "Date" , 0)!=0) Opts |= LogItem_TimeDate ; if (PF.RdInt("Columns", "Time" , 0)!=0) Opts |= LogItem_TimeTime ; if (PF.RdInt("Columns", "ElapsedHMS" , 0)!=0) Opts |= LogItem_ElapsedHMS ; if (sDblOpt && stricmp(sDblOpt," d")==0) Opts |= LogItem_ElapsedDays; if (sDblOpt && stricmp(sDblOpt," h")==0) Opts |= LogItem_ElapsedHrs ; if (sDblOpt && stricmp(sDblOpt," m")==0) Opts |= LogItem_ElapsedMins; if (sDblOpt && stricmp(sDblOpt," s")==0) Opts |= LogItem_ElapsedSecs; if (PF.RdInt("Columns", "Command" , 0)!=0) Opts |= LogItem_Command ; if (PF.RdInt("Columns", "Type" , 1)!=0) Opts |= LogItem_Type ; if (PF.RdInt("Columns", "Tag" , 1)!=0) Opts |= LogItem_Tag ; if (PF.RdInt("Columns", "Source" , 1)!=0) Opts |= LogItem_Source ; if (PF.RdInt("Columns", "IDNo" , 0)!=0) Opts |= LogItem_IDNo ; if (PF.RdInt("Columns", "IterNo" , 0)!=0) Opts |= LogItem_IterNo ; if (PF.RdInt("Columns", "CallNo" , 0)!=0) Opts |= LogItem_CallNo ; if (PF.RdInt("Columns", "SeqNo" , 0)!=0) Opts |= LogItem_SeqNo ; if (PF.RdInt("Columns", "Message" , 1)!=0) Opts |= LogItem_Message ; if (PF.RdInt("MessageLog","On" , 1)!=0) Opts |= LogItem_MessageLogOn; if (PF.RdInt("EventLog","On" , 1)!=0) Opts |= LogItem_EventLogOn ; //if ((Opts & LogItem_ElapsedDbl)==0) // Opts |= LogItem_ElapsedSecs; return Opts; }; void CArchiveManager::WriteOptions(LPCTSTR FileName, DWORD Opts) { Strng Fn(FileName); Fn.FnExpand(); CheckCfg(Fn()); CProfINIFile PF(Fn()); PF.WrInt("Columns", "DateTime" , (Opts & LogItem_Time )!=0 ? 1:0); PF.WrInt("Columns", "Date" , (Opts & LogItem_TimeDate )!=0 ? 1:0); PF.WrInt("Columns", "Time" , (Opts & LogItem_TimeTime )!=0 ? 1:0); PF.WrInt("Columns", "ElapsedHMS" , (Opts & LogItem_ElapsedHMS )!=0 ? 1:0); if (Opts & LogItem_ElapsedDays) PF.WrStr("Columns", "ElapsedDbl ", "d") ; if (Opts & LogItem_ElapsedHrs ) PF.WrStr("Columns", "ElapsedDbl ", "h") ; if (Opts & LogItem_ElapsedMins) PF.WrStr("Columns", "ElapsedDbl ", "m") ; if (Opts & LogItem_ElapsedSecs) PF.WrStr("Columns", "ElapsedDbl ", "s") ; if ((Opts & LogItem_ElapsedDbl)==0) PF.WrStr("Columns", "ElapsedDbl ", "") ; PF.WrInt("Columns", "Command" , (Opts & LogItem_Command )!=0 ? 1:0); PF.WrInt("Columns", "Type" , (Opts & LogItem_Type )!=0 ? 1:0); PF.WrInt("Columns", "Tag" , (Opts & LogItem_Tag )!=0 ? 1:0); PF.WrInt("Columns", "Source" , (Opts & LogItem_Source )!=0 ? 1:0); PF.WrInt("Columns", "IDNo" , (Opts & LogItem_IDNo )!=0 ? 1:0); PF.WrInt("Columns", "IterNo" , (Opts & LogItem_IterNo )!=0 ? 1:0); PF.WrInt("Columns", "CallNo" , (Opts & LogItem_CallNo )!=0 ? 1:0); PF.WrInt("Columns", "SeqNo" , (Opts & LogItem_SeqNo )!=0 ? 1:0); PF.WrInt("Columns", "Message" , (Opts & LogItem_Message )!=0 ? 1:0); PF.WrInt("MessageLog","On" , (Opts & LogItem_MessageLogOn)!=0 ? 1:0); PF.WrInt("EventLog","On" , (Opts & LogItem_EventLogOn )!=0 ? 1:0); }; //--------------------------------------------------------------------------- bool CArchiveManager::ReadCfg() { Strng DataFn, DataPath; Initialise(); //if (!FileExists(C2T(m_sCfgFile))) // return false; CheckCfg(C2T(m_sCfgFile)); CProfINIFile PF(C2T(m_sCfgFile)); m_dwOptions = ReadOptions(C2T(m_sCfgFile)); m_bAllowTagAccess = (PF.RdInt("Options", "AllowAccess", 0)!=0); AddReqdTables(); m_sDataFile=""; DataFn = PF.RdStr("Options", "DBFile", "$Prj\\Archive.MDB"); DataFn.FnExpand(); DataPath.FnDrivePath(DataFn()); if (DataPath.Length()==0) { Strng P((LPCTSTR)m_sCfgFile); P.FnDrivePath(); m_sDataFile+=P(); } m_sDataFile+=DataFn(); m_sSeparator = PF.RdStr("Options", "Separator", "-"); if (m_sSeparator.GetLength()>1) m_sSeparator=m_sSeparator.Left(1); else if (m_sSeparator.GetLength()<1) m_sSeparator="-"; for (int iTb=0; ; iTb++) { CString TbSect, TbName, TbFmt; bool IsOn=true; switch (iTb) { case 0: TbSect="MessageLog"; TbName="MessageLog"; break; case 1: TbSect="EventLog"; TbName="EventLog"; break; default: // 2 & up TbSect.Format("Table%i", iTb-1); TbName=PF.RdStr(TbSect, "Name", ""); break; } if (TbName.GetLength()<=0) break; IsOn=PF.RdInt(TbSect, "On", 1)!=0; TbFmt=PF.RdStr(TbSect, "Format", "DB"); byte iTbFmt = ADBTbFmt_Null; if (TbFmt.GetLength()==0) iTbFmt=ADBTbFmt_DB; else if (TbFmt.CompareNoCase(ADBTbFmtTags[ADBTbFmt_DB])==0) iTbFmt=ADBTbFmt_DB; else if (TbFmt.CompareNoCase(ADBTbFmtTags[ADBTbFmt_CSV])==0) iTbFmt=ADBTbFmt_CSV; else if (TbFmt.CompareNoCase(ADBTbFmtTags[ADBTbFmt_TXT])==0) iTbFmt=ADBTbFmt_TXT; else { LogError(ArcName, 0, "%s Invalid Table Format: %s", TbName, TbFmt); break; } CArchiveDBTable * pTb=NULL; const int NT=m_Tables.GetSize(); for (int iTb=0; iTb<NT; iTb++) { if (TbName.CompareNoCase(m_Tables[iTb]->m_sName)==0) { pTb=m_Tables[iTb]; break; } } if (pTb==NULL) { pTb=new CArchiveDBTable(this, TbName) ; m_Tables.Add(pTb); AddTimeFields(TbName); } // NBNBNB No Checking CTimeValue P,O; pTb->m_sCfgSection = TbSect; pTb->m_iFormat = iTbFmt; pTb->m_bOn = IsOn; pTb->m_sPath = PF.RdStr(TbSect, "Path", "$Prj\\Archive"); pTb->m_nSigDigits = PF.RdInt(TbSect, "SigDigits", pTb->m_nSigDigits); CString ClrStr = PF.RdStr(TbSect, "Clear", "Rewind"); pTb->m_bClearOnRewind = ClrStr.Find("Rewind")>=0; //pTb->m_bClearOnRewind = ClrStr.Find("Rewind"); //TbFmt=PF.RdStr(TbSect, "Name", ""); #if dbgArchiver if (dbgReadCfg()) dbgpln("Tb:%-20s",(LPCTSTR)pTb->m_sName); #endif P = P.Parse(PF.RdStr(TbSect, "Period", "")) ? P : -1.0; O = O.Parse(PF.RdStr(TbSect, "Offset", "")) ? O : 0.0; pTb->AddPeriod((long)P.Seconds, (long)O.Seconds); for (int j=0; ;j++) { CString TrigNm, TrigOpt; TrigNm.Format("Trigger%i", j+1); TrigOpt=PF.RdStr(TbSect, TrigNm, ""); if (TrigOpt.GetLength()<=0) break; pTb->AddTrigger(TrigOpt); } for (int f=0; ;f++) { CString FldNm, FldOpt; FldNm.Format("Field%i", f+1); FldOpt=PF.RdStr(TbSect, FldNm, " "); if (FldOpt.GetLength()<=1) break; DoAddField(pTb->m_sName, FldNm, FldOpt); } }; return true; } //--------------------------------------------------------------------------- bool CArchiveManager::CheckCfg(LPCTSTR CfgFile) { //if (CfgFile==NULL) // CfgFile=m_sCfgFile; //Strng Fn(m_sCfgFile); if (!FileExists(C2T(CfgFile))) { FILE *h=fopen(C2T(CfgFile), "wt"); if (h) { fprintf(h, "%s", s_sArchiveContent); fclose(h); } else { LogError("Archive", 0, "File %s not Opened", CfgFile); return false; } } return true; } //--------------------------------------------------------------------------- bool CArchiveManager::CompleteOpen() { //ASSERT_ALWAYS(!XBusy(), "CompleteOpen - SysCAD Running", __FILE__, __LINE__); bool OK=true; const int NT=m_Tables.GetSize(); for (long t=0; t<NT; t++) { CArchiveDBTable & Tb=*m_Tables[t]; Tb.m_Fields.SetSize(0,64); } const long n=m_Fields.GetSize(); for (long f=0; f<n; f++) { CArchiveDBField *pFld=m_Fields[f]; pFld->m_lTableIndex=FindTable(pFld->m_sTable); if (pFld->m_lTableIndex>=0) { if (FindField(pFld->m_lTableIndex, "")<0) m_Tables[pFld->m_lTableIndex]->m_Fields.Add(pFld); else LogError(ArcName,0,"Field %s already exists in Table %s", (LPCTSTR)pFld->m_sFldTag, (LPCTSTR)pFld->m_sTable); } else { LogError(ArcName,0,"Table %s not found for Field %s", (LPCTSTR)pFld->m_sTable, (LPCTSTR)pFld->m_sFldTag); OK=false; } } m_lInputOffset=m_Fields.GetSize(); return OK; } //--------------------------------------------------------------------------- bool CArchiveManager::OpenTheDB() { bool OpenOK=false; dbgpln("Manager::Open"); m_nFieldsOpn=0; m_nTablesOpn=0; dbgpln("Manager::OpenTheDB"); OpenOK = CompleteOpen(); OpenOK = OpenOK && OpenDB(); OpenOK = OpenOK && CreateDBTables(); OpenOK = OpenOK && CreateDBRecordsets(); m_pMessageLog=NULL; m_pEventLog=NULL; const int NT=m_Tables.GetSize(); for (int i=0; i<NT; i++) { if (m_Tables[i]->m_sName.CompareNoCase(sMessageLogStr)==0) m_pMessageLog=m_Tables[i]; if (m_Tables[i]->m_sName.CompareNoCase(sEventLogStr)==0) m_pEventLog=m_Tables[i]; } m_iBusyLoggingMsg=0; m_iBusyLoggingEvent=0; m_pMessageLog->m_bClearOnRewind=false; if (m_pMessageLog==NULL) LogNote(ArcName, 0, "%s Table not Found", sMessageLogStr); if (m_pEventLog==NULL) LogNote(ArcName, 0, "%s Table not Found", sEventLogStr); if (OpenOK) LogNote(ArcName, 0, "Archive reporter: %i fields in %i tables", m_nFieldsOpn, m_nTablesOpn); else LogNote(ArcName, 0, "Database not opened"); return OpenOK; } //--------------------------------------------------------------------------- bool CArchiveManager::Start(CXM_TimeControl &CB) { if (!m_bOn) return true; dbgpln("Manager::Start"); m_TimeAtStartValid = true; m_TimeOfLastExec = CB.m_TheTime; //if (m_bOn && m_bOpenDBOnRun) // m_bDBOK = OpenTheDB(); return m_bDBOK; } //--------------------------------------------------------------------------- bool CArchiveManager::Stop() { if (!m_bOn) return true; dbgpln("Manager::Stop"); //if (m_bOn && m_bOpenDBOnRun) // CloseDB(); m_TimeAtStartValid = false; return true; } // -------------------------------------------------------------------------- static void sfn_EventLogHook(LPCTSTR Tag, LPCTSTR Msg) { gs_pArcMan->LogAnEvent(Tag, Msg); }; int CArchiveManager::Open(LPCTSTR CfgFile, bool FirstClear) { CDlgBusy::Open("\nOpening Archive Manager"); int Err = 0; dbgpln("DRV CArchiveManager::Open(%s)", CfgFile); m_sCfgFile= CfgFile; Initialise(); m_bFirstClear = FirstClear; m_bOn = false; if (m_sCfgFile.GetLength()>0) { m_bSubsRead_Busy = 0; CDlgBusy::SetLine(1, "Opening Archive Manager : %s", (LPCTSTR)m_sCfgFile); if (!m_bRegistered) { EO_Register(pExecName_ArcMngr, EOWrite_Thread | EORead_Thread | EOExec_Thread,/*Pri*/THREAD_PRIORITY_ABOVE_NORMAL,/*Stack*/50000, /*HashSize*/ 101); m_bRegistered=true; } bool OK=ReadCfg(); gs_Exec.ConfigureArchive(); m_bOn=OK; if (m_bOn)// && !m_bOpenDBOnRun) m_bDBOK = OpenTheDB(); if (!m_bOn) { CloseDB(); Initialise(); } if (!m_bOn) LogError(ArcName, 0, "'%s' not opened", (LPCTSTR)m_sCfgFile); #if dbgArchiverMan if (dbgDumpConfig()) ConfigurationDump(); #endif } if (m_bOn) { if (m_sPrevTempFile.GetLength()) {//restore previous state... FilingControlBlock FCB(PrjFiles(), DefaultCfgLabel, TOF_DBase); HANDLE H = CreateFile((LPCTSTR)m_sPrevTempFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); if (H!=INVALID_HANDLE_VALUE) { DWORD dwSize = GetFileSize(H, NULL); if (dwSize>0 && dwSize!=0xFFFFFFFF) { char Buff[9]; FCB.InitialiseForRead(H, 0, dwSize); //SetFilePointer(H, 0, NULL, FILE_BEGIN); FCB.ReadFile((LPVOID)Buff, 9, &dwSize); ASSERT(strncmp("TAGS....", Buff, 8)==0); if (!FCB.Eof()) LoadTags(FCB); CloseHandle(H); } } } //is it safe to assume the historian EO is opened before the Archive manager EO ??? //RecordSlots(); } else Err = 2; gs_EventLog.SetHook(sfn_EventLogHook); XBuildDataLists(); //otherwise if connect column tags are removed, and the Archive is reloaded, SysCAD crashes CDlgBusy::Close(); return Err; } // -------------------------------------------------------------------------- bool CArchiveManager::ConnectAll() { for (int s=0; s<m_Inputs.GetSize(); s++) delete m_Inputs[s]; m_Inputs.SetSize(0); const int NT=m_Tables.GetSize(); for (long t=0; t<NT; t++) { CArchiveDBTable & Tb=*m_Tables[t]; const long ntt=Tb.m_Triggers.GetSize(); for (long tt=0; tt<ntt; tt++) { CArchiveTrigger &Tr=*Tb.m_Triggers[tt]; Tr.m_Src.SetIndex(*this); CCnvIndex iCnv=Tr.m_Src.GetCnvIndex(*this); if (iCnv && Cnvs[iCnv]->Find(Tr.m_sCnvTxt())==NULL) LogError(ArcName, 0, "Conversion units '%s' are invalid for %s", Tr.m_sCnvTxt(), Tr.m_Src.m_sTag); } } const long n=m_Fields.GetSize(); for (long f=0; f<n; f++) { CArchiveDBField & Fld=*m_Fields[f]; if (!Fld.m_bSystem) { Fld.m_Src.SetIndex(*this); if (Fld.m_Src.m_lInputIndex>=0) { CArchiveInput & It=GetInput(Fld.m_Src.m_lInputIndex); if (It.IsString() && Fld.m_iFn!=ADBFn_String) { LogError(ArcName, 0, "Function must be 'String' for tag %s", Fld.m_Src.m_sTag); //Fld.m_iType = It.m_iType; } } CCnvIndex iCnv=Fld.m_Src.GetCnvIndex(*this); if (iCnv && Cnvs[iCnv]->Find(Fld.m_sCnvTxt())==NULL) LogError(ArcName, 0, "Conversion units '%s' are invalid for %s", Fld.m_sCnvTxt(), Fld.m_Src.m_sTag); } } return true; } // -------------------------------------------------------------------------- bool CArchiveManager::DisConnectAll() { for (int s=0; s<m_Inputs.GetSize(); s++) delete m_Inputs[s]; m_Inputs.SetSize(0); return true; } // -------------------------------------------------------------------------- bool CArchiveManager::Close(BOOL SaveState/*=true*/) { if (!m_bOn) return true; gs_EventLog.SetHook(NULL); m_pMessageLog=NULL; m_pEventLog=NULL; m_iBusyLoggingMsg=0; m_iBusyLoggingEvent=0; if (m_bOn) CDlgBusy::Open("\n\nClosing Archive Manager"); if (m_bOn)// && !m_bOpenDBOnRun) CloseDB(); if (m_sPrevTempFile.GetLength()) { DeleteFile((LPCTSTR)m_sPrevTempFile); m_sPrevTempFile = ""; } if (SaveState) { if (m_sPrevTempFile.GetLength()==0) { char File[MAX_PATH]; if (GetTempFileName(TemporaryFiles(), "ARC", 0, File)) m_sPrevTempFile = File; else m_sPrevTempFile = ""; } if (m_sPrevTempFile.GetLength()) { FilingControlBlock FCB(PrjFiles(), DefaultCfgLabel, TOF_DBase); HANDLE H = CreateFile((LPCTSTR)m_sPrevTempFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); if (H!=INVALID_HANDLE_VALUE) { FCB.InitialiseForWrite(H, 0); SaveTags(FCB, true); CloseHandle(H); } } } dbgpln("DRV CArchiveManager::Close"); if (pArcSheet) { pArcSheet->PressButton(PSBTN_CANCEL); delete pArcSheet; } if (m_bOn) CDlgBusy::Close(); if (m_bRegistered) { EO_DeRegister(); m_bRegistered=false; } Initialise(); return true; } //--------------------------------------------------------------------------- void CArchiveManager::Restart() { RestartDBTables(); //Close(); //Open(); } //--------------------------------------------------------------------------- long CArchiveManager::AddField(LPCTSTR Table, LPCTSTR Field, LPCTSTR CfgString) { CString S; S.Format("\"%s\", %s", Field, CfgString); return DoAddField(Table, Field, S); }; //--------------------------------------------------------------------------- long CArchiveManager::DoAddField(LPCTSTR Table, LPCTSTR Field, LPCTSTR CfgStringIn) { if (CfgStringIn==NULL || strlen(CfgStringIn)==0) return 0; CSVColArray f; int Quote; CString ADBCfg=CfgStringIn; CString CfgString=CfgStringIn; int nParms = ParseCSVTokens(C2T(CfgString), f, Quote, NULL, true); if (Quote || f[0]==NULL || nParms<1) { LogError(ArcName, 0, "Table %s, %s: Invalid archive field specification: %s", Table, Field, (LPCTSTR)ADBCfg); return -1; } const bool HasFldName = (ADBCfg.GetLength()>0 && ADBCfg[0]=='"'); int iTagFld = HasFldName?1:0; LPCTSTR FldName = HasFldName ? f[0]:NULL; int iST=-1; if (HasFldName) { for (iST=sizeof(s_SystemTables)/sizeof(s_SystemTables[0])-1; iST>=0; iST--) { CSystemTable ST = s_SystemTables[iST]; if ((ST.m_Table==NULL || stricmp(ST.m_Table, Table)==0) && (stricmp(ST.m_FldName, FldName)==0)) break; } } CSystemTable ST = s_SystemTables[iST]; LPCTSTR Tag = f[iTagFld]; if (Tag ==NULL) Tag =""; LPCTSTR Fn = f[iTagFld+1]; if (Fn ==NULL) Fn =""; LPCTSTR Meas = f[iTagFld+2]; if (Meas ==NULL) Meas =""; LPCTSTR First = f[iTagFld+3]; if (First==NULL) First=""; if (Tag==NULL || strlen(Tag)==0) { LogError(ArcName, 0, "Table %s, %s: Tag not specified", Table, Field); return -1; } byte iFn=ADBFn_Null; if (_stricmp(Fn, ADBFuncTags[ADBFn_Instant])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_Instant])==0 ) iFn=ADBFn_Instant; else if (_stricmp(Fn, ADBFuncTags[ADBFn_Minimum])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_Minimum])==0 ) iFn=ADBFn_Minimum; else if (_stricmp(Fn, ADBFuncTags[ADBFn_Maximum])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_Maximum])==0 ) iFn=ADBFn_Maximum; else if (_stricmp(Fn, ADBFuncTags[ADBFn_PeriodAvg])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_PeriodAvg])==0 ) iFn=ADBFn_PeriodAvg; //else if (_stricmp(Fn, ADBFuncTags[ADBFn_RunningAvg])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_RunningAvg])==0 ) iFn=ADBFn_RunningAvg else if (_stricmp(Fn, ADBFuncTags[ADBFn_Count])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_Count])==0 ) iFn=ADBFn_Count; else if (_stricmp(Fn, ADBFuncTags[ADBFn_ChangeCount])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_ChangeCount])==0) iFn=ADBFn_ChangeCount; else if (_stricmp(Fn, ADBFuncTags[ADBFn_Sum])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_Sum])==0 ) iFn=ADBFn_Sum; else if (_stricmp(Fn, ADBFuncTags[ADBFn_String])==0 || _stricmp(Fn, ADBFuncSyms[ADBFn_String])==0 ) iFn=ADBFn_String; else if (iST<0) { if (Fn==NULL || strlen(Fn)==0) LogError(ArcName, 0, "Table %s, %s: For tag '%s', a Function has not been specified", Table, Field, Tag); else LogError(ArcName, 0, "Table %s, %s: Tag '%s' has invalid Function (%s)", Table, Field, Tag, Fn); return -1; } byte iMeas=ADBMeas_Null; if (Meas==NULL || strlen(Meas)==0) iMeas=ADBMeas_EndPt; else if (_stricmp(Meas, ADBMeasTags[ADBMeas_StartPt])==0) iMeas=ADBMeas_StartPt; else if (_stricmp(Meas, ADBMeasTags[ADBMeas_MidPt])==0) iMeas=ADBMeas_MidPt; else if (_stricmp(Meas, ADBMeasTags[ADBMeas_EndPt])==0) iMeas=ADBMeas_EndPt; else if (iST<0) { LogError(ArcName, 0, "Table %s, %s: Tag '%s' has invalid Measurement (%s)", Table, Field, Tag, Meas); return -1; } byte iFirst=ADBFirst_Null; if (First==NULL || strlen(First)==0) iFirst=ADBFirst_Use; else if (_stricmp(First, ADBFirstTags[ADBFirst_Use])==0) iFirst=ADBFirst_Use; else if (_stricmp(First, ADBFirstTags[ADBFirst_Ignore])==0) iFirst=ADBFirst_Ignore; else if (iST<0) { LogError(ArcName, 0, "Table %s, %s: Tag '%s' has invalid First Point Usage (%s)", Table, Tag, First); return -1; } byte iType=tt_Double; // Assume all field types are double except ... byte iSize=0; Strng WrkTag,WrkCnvTxt; TaggedObject::SplitTagCnv((LPTSTR)Tag, WrkTag, WrkCnvTxt); if (iST>=0) { iType = ST.m_Type; iSize = ST.m_Size; iFn = ADBFn_System; iMeas = ADBMeas_Null; iFirst = ADBFirst_Null; } return AddField((iST>=0), WrkTag(), Table, FldName, iFn, iMeas, iFirst, iType, iSize, 0, WrkCnvTxt() ? WrkCnvTxt():"",""); }; //--------------------------------------------------------------------------- long CArchiveManager::AddField(bool System, LPCTSTR Tag, LPCTSTR Table, LPCTSTR FldName, byte iFn, byte iMeas, byte iFirst, byte iType, int iSize, CCnvIndex iCnv, LPCTSTR CnvTxt, LPCTSTR Description) { long Index=-1; if (iFn!=ADBFn_Null) { CArchiveDBField *pFld = new CArchiveDBField(this); pFld->m_bSystem = System; pFld->m_sTable = Table; pFld->m_iFn = iFn; pFld->m_iMeas = iMeas; pFld->m_iFirstOnRewind = iFirst; if (iFn==ADBFn_Count || iFn==ADBFn_ChangeCount) { pFld->m_iType = tt_Long; pFld->m_iSize = iSize; pFld->m_sCnvTxt = CnvTxt; } else if (iFn==ADBFn_String) { pFld->m_iType = tt_Strng; pFld->m_iSize = 100; //assume max length!!!? pFld->m_sCnvTxt = ""; } else { pFld->m_iType = iType; pFld->m_iSize = iSize; pFld->m_sCnvTxt = CnvTxt; } pFld->m_sDescription = Description; pFld->m_Src.m_sTag = Tag; if (FldName) pFld->m_sFldTag=FldName; else pFld->m_sFldTag.Format("%s-%s", Tag, ADBFuncTags[iFn]); // fix FldTag - no special chars if (strpbrk(pFld->m_sFldTag, InvalidFldNmChars)!=NULL) { CString Old(pFld->m_sFldTag); char *p, *pT=pFld->m_sFldTag.GetBuffer(0); while ((p=strpbrk(pT, InvalidFldNmCharsM))!=NULL) memmove(p, p+1, strlen(p+1)+1); while ((p=strpbrk(pT, InvalidFldNmCharsD))!=NULL) *p=m_sSeparator[0]; if (FldName) LogNote(ArcName, 0, "Tag %s changed to %s", (LPCTSTR)Old, (LPCTSTR)pFld->m_sFldTag); pFld->m_sFldTag.ReleaseBuffer(); } if (1) pFld->m_sScdMTag.Format("%s.%s", (LPCTSTR)pFld->m_sTable, (LPCTSTR)pFld->m_sFldTag); else pFld->m_sScdMTag.Format("%s.%s.%s", (LPCTSTR)pFld->m_sTable, Tag, ADBFuncTags[iFn]); Index=m_Fields.Add(pFld); m_FieldMap.SetAt(pFld->m_sScdMTag, Index); #if dbgArchiver if (dbgConfig()) { dbgpln("AddField [%3i] %-6s %-10s %-20s %-20s %-30s %-40s %s", Index, pFld->m_bSystem?"System":"", tt_TypeString(pFld->m_iType), (LPCTSTR)pFld->m_sTable, (LPCTSTR)pFld->m_Src.m_sTag, (LPCTSTR)pFld->m_sFldTag, (LPCTSTR)pFld->m_sScdMTag, (LPCTSTR)pFld->m_sDescription); } #endif } return Index; }; //--------------------------------------------------------------------------- long CArchiveManager::AppendField(bool System, LPCTSTR Tag, LPCTSTR Table, LPCTSTR FldName, byte iFn, byte iMeas, byte iFirst, byte iType, int iSize, CCnvIndex iCnv, LPCTSTR CnvTxt, LPCTSTR Description) { long Index=-1; int iTb=FindTable(Table); if (iTb>=0) { Index=AddField(System, Tag, Table, FldName, iFn, iMeas, iFirst, iType, iSize, iCnv, CnvTxt, Description); if (Index>=0) { // Reopen Table / RecordSet CArchiveDBTable & Tb=*m_Tables[iTb]; bool OK; if (0)//m_bOpenDBOnRun) { OK=CompleteOpen(); } else { OK=Tb.CloseDBTable(); OK=OK && CompleteOpen(); OK=OK && Tb.CreateDBTable(); OK=OK && Tb.CreateDBRecordset(); } if (OK) { // Save in Config file Strng S,F,X; S.Set("%s,%s", Tag, ADBFuncTags[iFn]); CProfINIFile PF(C2T(m_sCfgFile)); for (int f=0; f<250; f++) { F.Set("Field%i", f+1); X=PF.RdStr(Tb.m_sCfgSection, F(), "?"); if (X=="?") break; } if (f<250) PF.WrStr(Tb.m_sCfgSection, F(), S()); else LogNote(ArcName, 0, "Too many fields in Table %s", Table); } else LogNote(ArcName, 0, "Table %s not ReOpened", Table); } } else LogNote(ArcName, 0, "Table %s not found", Table); return Index; } //--------------------------------------------------------------------------- long CArchiveManager::AddInput(LPCTSTR Tag) { if (Tag==NULL || strlen(Tag)==0) return -1; CXM_ObjectTag ObjTag((LPTSTR)Tag, TABOpt_AllInfoOnce); CXM_ObjectData ObjData; CXM_Route Route; long Index=-1; if (XReadTaggedItem(ObjTag, ObjData, Route)) { CPkDataItem & Item =*ObjData.FirstItem(); CArchiveInput * pInput=new CArchiveInput; pInput->m_sScdMTag=Tag; pInput->m_iType=Item.Type(); pInput->m_iCnv=Item.CnvIndex(); if (IsNumData(pInput->m_iType)) { if (IsFloatData(pInput->m_iType)) pInput->PutValue(Item.Value()->GetDouble()); else pInput->PutValue(Item.Value()->GetLong()); Index=m_Inputs.Add(pInput); #if dbgArchiver if (dbgConfig()) dbgpln("AddInput %-20s %-10s ", (LPCTSTR)pInput->m_sScdMTag, tt_TypeString(pInput->m_iType)); #endif } else if (IsStrng(pInput->m_iType)) { pInput->PutValue(Item.Value()->GetString()); Index=m_Inputs.Add(pInput); } else { LogError(ArcName, 0, "Tag '%s' not valid or allowed.", Tag); } } else { LogError(ArcName, 0, "Tag '%s' not found.", Tag); } return Index; }; //--------------------------------------------------------------------------- bool CArchiveManager::Execute(CXM_TimeControl &CB) { if (!m_bOn) return false; //dbgpln("CArchiveManager::Execute"); const long n=m_Fields.GetSize(); for (int i=0; i<n; i++) m_Fields[i]->Execute(CB); const int NT=m_Tables.GetSize(); for (int t=0; t<NT; t++) { m_Tables[t]->Execute(CB); } return true; } //--------------------------------------------------------------------------- bool CArchiveManager::StepDone(CXM_TimeControl &CB) { if (!m_bOn) return false; //dbgpln("CArchiveManager::StepDone"); const double DeltaSecs = Max(0.0, CB.m_TheTime.Seconds-m_TimeOfLastExec.Seconds); const long n=m_Fields.GetSize(); for (int i=0; i<n; i++) m_Fields[i]->StepDone(CB, DeltaSecs); const int NT=m_Tables.GetSize(); for (int t=0; t<NT; t++) { m_Tables[t]->StepDone(CB); } m_TimeOfLastExec = CB.m_TheTime; m_bRewind = false; return true; } //--------------------------------------------------------------------------- long CArchiveManager::NoOfChanges() { if (!m_bOn) return 0; long N=0; const long n=m_Fields.GetSize(); for (long i=0; i<n; i++) if (m_Fields[i]->m_bChanged) N++; return N; } //--------------------------------------------------------------------------- long CArchiveManager::GetNextChange() { if (!m_bOn) return -1; long N=m_Fields.GetSize(); int j=m_lChgSrchStart; for (long i=0; i<N; i++) { if (j>=N) j=0; if (m_Fields[j]->m_bChanged) { m_lChgSrchStart=j+1; return j; } j++; } return -1; } //--------------------------------------------------------------------------- bool CArchiveManager::OpenDB() { #if dbgArchiver if (dbgDBState()) dbgpln("OpenDB"); #endif m_bDBExclusive=false; m_bDBReadOnly=false; m_sDBConnect=""; //AfxDaoInit(); WIN32_FIND_DATA fd; ASSERT(m_pCat==NULL); ASSERT(m_pCnn==NULL); if (!FileExists(C2T(m_sDataFile), fd)) { try { m_pCnn=ADODB::_ConnectionPtr(__uuidof(ADODB::Connection)); m_pCat=ADOX::_CatalogPtr(__uuidof (ADOX::Catalog)); CString S; S.Format("Provider='Microsoft.JET.OLEDB.4.0';" "Data source = %s;" "Jet OLEDB:Engine Type=5", (LPCTSTR)EscapeQuote(m_sDataFile)); m_pCat->Create(_bstr_t(S)); m_pCnn=m_pCat->GetActiveConnection(); m_pCnn->Close(); m_pCat.Release(); m_pCnn.Release(); } catch(_com_error & e) { DisplayException(e, LF_Exclamation, "Create Archive ", (LPCTSTR)m_sDataFile); m_pCat.Release(); m_pCnn.Release(); return false; } } // Close & then reopen to allow non exclusive access if (FileExists(C2T(m_sDataFile), fd)) { if (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { LogError(ArcName, LF_Exclamation, "Cannot open read-only Database '%s'", (LPCTSTR)m_sDataFile); return false; } try { m_pCnn=ADODB::_ConnectionPtr(__uuidof(ADODB::Connection)); m_pCat=ADOX::_CatalogPtr(__uuidof (ADOX::Catalog)); CString S; S.Format("Provider='Microsoft.JET.OLEDB.4.0';" "Data source = %s;", (LPCTSTR)m_sDataFile); //m_pCat->ActiveCollection(_bstr_t(S)); m_pCnn->Open(_bstr_t(S), "", "", ADODB::adConnectUnspecified); m_pCat->PutActiveConnection(_variant_t((IDispatch*)m_pCnn)); } catch (_com_error & e) { DisplayException(e, LF_Exclamation, "Open Archive ", (LPCTSTR)m_sDataFile); m_pCat.Release(); m_pCnn.Release(); //delete m_pDB; //m_pDB=NULL; return false; } } #if dbgArchiver if (dbgDBState()) dbgpln("OpenDB - done"); #endif return true; }; //--------------------------------------------------------------------------- bool CArchiveManager::CreateDBTables() { bool OK=true; const int NT=m_Tables.GetSize(); for (int t=0; t<NT; t++) { CArchiveDBTable & Tb = *m_Tables[t]; if (Tb.m_bOn) { if (!Tb.CreateDBTable()) OK=false; } else { if (!Tb.DeleteDBTable()) OK=false; } } #if dbgArchiver if (dbgDBState()) dbgpln("CreateDBTables %s",OK?"OK":"BAD"); #endif return OK; } //--------------------------------------------------------------------------- bool CArchiveManager::RestartDBTables() { bool OK=true; const int NT=m_Tables.GetSize(); for (int t=0; t<NT; t++) { CArchiveDBTable & Tb = *m_Tables[t]; if (Tb.m_bOn) { switch (Tb.m_iFormat) { case ADBTbFmt_DB: Tb.DeleteDBRecords(); break; case ADBTbFmt_CSV: case ADBTbFmt_TXT: Tb.ReOpenTxtTable(true); break; } } } return OK; } //--------------------------------------------------------------------------- bool CArchiveManager::CreateDBRecordsets() { bool OK=true; const int NT=m_Tables.GetSize(); for (int t=0; t<NT; t++) { if (!m_Tables[t]->CreateDBRecordset()) OK=false; } #if dbgArchiver if (dbgDBState()) dbgpln("CreateDBRecordSets %s",OK?"OK":"BAD"); #endif return OK; } //--------------------------------------------------------------------------- bool CArchiveManager::CloseDB() { dbgpln("Manager::CloseDB"); if (m_pCnn!=NULL) { try { const int NT=m_Tables.GetSize(); for (int t=0; t<NT; t++) m_Tables[t]->CloseDBTable(); if (m_pCnn!=NULL && m_pCnn->State!=ADODB::adStateClosed) m_pCnn->Close(); m_pCnn.Release(); m_pCat.Release(); } catch (_com_error & e) { DisplayException(e, LF_Exclamation, "Close Database ", (LPCTSTR)m_sDataFile ); m_pCnn.Release(); m_pCat.Release(); //delete m_pDB; //m_pDB=NULL; return false; } #if dbgArchiver if (dbgDBState()) dbgpln("CloseDB"); #endif } return true; }; //--------------------------------------------------------------------------- void CArchiveManager::DisplayException(_com_error & e, DWORD LogOpts, LPCTSTR strMsg1, LPCTSTR strMsg2) { CString message; if (1)//e) { message=strMsg1; message+=strMsg2; CString strErrCode; if (1)//e->m_pErrorInfo) { strErrCode.Format("\nException: Error Code = %ld\n", e.Error()); message += strErrCode; message += (LPCTSTR)e.Source(); message += _T(": "); message += (LPCTSTR)e.Description(); } //for (long ie=0; ie<m_pcnn->errors->count; ie++) // { // message += "\n"; // adodb::errorptr pe=m_pcnn->errors->getitem(ie); // message += (lpctstr)pe->description; // } //else // { // strErrCode.Format("\nCDaoException: SCODE=%ld AfxDaoError=%ld\n", e->m_scode, e->m_nAfxDaoError); // message += strErrCode; // } //AfxMessageBox(message); } else message="CDaoException e==NULL ????"; //AfxMessageBox("CDaoException e==NULL ????"); if (!m_iBusyLoggingMsg) LogError(ArcName, LogOpts, C2T(message)); } //--------------------------------------------------------------------------- bool CArchiveManager::SendStart() { AfxGetMainWnd()->SendMessage(WMU_CMD, SUB_CMD_ARCHIVESTART, 0); return m_bOn; } //--------------------------------------------------------------------------- bool CArchiveManager::SendExecute() { AfxGetMainWnd()->SendMessage(WMU_CMD, SUB_CMD_ARCHIVEEXECUTE, 0); return true; } //--------------------------------------------------------------------------- bool CArchiveManager::SendStepDone() { AfxGetMainWnd()->SendMessage(WMU_CMD, SUB_CMD_ARCHIVESTEPDONE, 0); return true; } //--------------------------------------------------------------------------- bool CArchiveManager::SendStop() { AfxGetMainWnd()->SendMessage(WMU_CMD, SUB_CMD_ARCHIVESTOP, 0); return true; } //=========================================================================== // // // //=========================================================================== CArchiveManager* gs_pArcMan = NULL; //--------------------------------------------------------------------------- DWORD CArchiveManager::EO_Message(CXMsgLst &XM, CXM_Route &Route) { #if dbgArchiver DWORD StartTime = GetTickCount(); #endif DWORD RetCode = 0; flag KeepingArchive=false; long LastIndex=-1; flag KeepingHistory=0; while (XM.MsgAvail()) switch (XM.MsgId()) { case XM_ArchiveExists: { CXM_ArchiveExists* pX = XM.ArchiveExists(); char* pTag=pX->FirstTag(); while (strlen(pTag)) { long i = FindInputIndex(pTag); RetCode=0; if (i>=0) { RetCode |= RC_SM_ArcExists; } pX->SetFlags(pTag, RetCode); pTag=pX->NextTag(pTag); } XM.RewindReadPosition(); return RetCode; } case XM_KeepArchive: { CXM_KeepArchive *pX = XM.KeepArchive(); AddField(false, pX->Tag(), pX->TableName(), pX->FldName(), pX->m_iFn, pX->m_iMeas, pX->m_iFirst, pX->cType, 0, pX->iCnv, pX->CnvTxt(), pX->Description()); KeepingArchive = 1; LastIndex = pX->lDataIndex; break; } case XM_ArcShowTagInfo: { CXM_ArcShowTagInfo *pX = XM.ArcShowTagInfo(); LogNote(ArcName, 0, "Incomplete TagInfo %s", pX->cTag); /* const int SlotNo = FindChanForTag(pX->cTag); if (SlotNo>=0) {//tag found, show driver tag info as required... ASSERT(pX->iArcOptMask!=0); RetCode = 1; //valid driver tag CString s; if (pX->iArcOptMask & 0x0001) {//show in status bar Slots[SlotNo]->GetLongArcDesc(s); pStatusBar->SetMsg1((char*)(const char*)s); //place temporary message on status bar } if (pX->iArcOptMask & 0x0002) {//show in message window if ((pX->iArcOptMask & 0x0001)==0) Slots[SlotNo]->GetLongArcDesc(s); LogNote(ArcName, 0, (char*)(const char*)s); } */ if (pX->iArcOptMask & 0x0004) {//show in archive slot dialog Options(pX->cTag); } break; } default: ASSERT(0); } XM.Clear(); if (KeepingArchive) { if (RetCode) { #if dbgArchiver if (dbgTime()) dbgpln("HT DoneArcCfgSlots:%d", GetTickCount() - StartTime); #endif //Save(); // Save Configuration #if dbgArchiver if (dbgTime()) dbgpln("HT DoneSave:%d", GetTickCount() - StartTime); #endif XBuildMyDataLists(); } CXM_Long *xbLong=new CXM_Long (LastIndex); XM.PackMsg(xbLong); } return RetCode; } //--------------------------------------------------------------------------- void CArchiveManager::EO_SetModelState(eScdMdlStateActs RqdState, Strng_List &RqdTags) { switch (RqdState) { case MSA_Null: case MSA_ZeroFlows: case MSA_Empty: case MSA_PreSet: case MSA_SteadyState: case MSA_PBInit: case MSA_EmptySpillTargets : break; case MSA_DynStatsRunInit: { //for (int i=0; i<m_Inputs.GetCount(); i++) // m_Inputs[i]->ClrPreviousValue(); const long n=m_Fields.GetSize(); for (long fd=0; fd<n; fd++) m_Fields[fd]->m_bResetReqd=true; break; } } } //--------------------------------------------------------------------------- flag CArchiveManager::EO_SetTime(CTimeValue TimeRqd, bool Rewind) { if (Rewind) { m_TimeAtStart = TimeRqd; m_TimeAtStartValid = true; m_bRewind = true; dbgpln("CArchiveManager::EO_SetTime %-10s %s", "Rewind", TimeRqd.Format(TD_Time|TD_Days)); // must clear the tables data const int NT = m_Tables.GetSize(); for (int t=0; t<NT; t++) { CArchiveDBTable &Tb=*m_Tables[t]; Tb.m_bRewindReqd = true; if (m_bFirstClear || Rewind && Tb.m_bClearOnRewind) { switch (Tb.m_iFormat) { case ADBTbFmt_DB: Tb.DeleteDBRecords(); break; case ADBTbFmt_CSV: case ADBTbFmt_TXT: Tb.ReOpenTxtTable(true); break; } } } m_bFirstClear = false; } return true; }; //--------------------------------------------------------------------------- flag CArchiveManager::EO_QueryTime(CXM_TimeControl &CB, CTimeValue &TimeRqd, CTimeValue &dTimeRqd) { return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_Start(CXM_TimeControl &CB) { flag OK = 1; //for (int i=0; i<m_Inputs.GetCount(); i++) // m_Inputs[i]->PutValid(false); //int NI=m_Fields.GetSize(); //for (int i=0; i<NI; i++) // m_Fields[i]->Execute(CB, *this); //int NT=m_Tables.GetSize(); //for (int t=0; t<NT; t++) // { // m_Tables[t]->Execute(CB, *this); // } if (!SendStart()) OK=0; return OK; } //--------------------------------------------------------------------------- void CArchiveManager::EO_QuerySubsReqd(CXMsgLst &XM) { CXM_ReadIndexedData * pMsg = (CXM_ReadIndexedData *)XM.MsgPtr(XM_ReadIndexedData); flag ReadAll = pMsg->ReadAll; long DataIndex = pMsg->Start ? 0 : pMsg->LastIndex-m_lInputOffset + 1; XM.Clear(); for ( ; DataIndex<m_Inputs.GetSize(); DataIndex++) { CArchiveInput * pInput = m_Inputs[DataIndex]; CXM_DataRequest *DRqst=new CXM_DataRequest (DataIndex+m_lInputOffset, C2T(pInput->m_sScdMTag), TABOpt_AllInfoOnce, XIO_In);//pInput->m_iAction); if (!XM.PackMsg(DRqst)) { delete DRqst; break; } } } //--------------------------------------------------------------------------- void CArchiveManager::EO_QuerySubsAvail(CXMsgLst &XM, CXMsgLst &XMRet) { if (m_bAllowTagAccess) { while (XM.MsgAvail()) { CXM_DataRequest * Msg = XM.DataRequest(); long ItemIndex=FindFieldIndex(Msg->Tag); if (ItemIndex>=0) {//tag is in item list... CXM_DataAvailable *DA=new CXM_DataAvailable (ItemIndex, Msg->Tag, Msg->Action); XMRet.PackMsg(DA); } } } } //--------------------------------------------------------------------------- flag CArchiveManager::EO_ReadSubsData(CXMsgLst &XM) { flag DataRead = 0; if (m_bAllowTagAccess) { CXM_ReadIndexedData *pMsg = XM.ReadIndexedData(); long DataIndex = pMsg->Start ? 0 : pMsg->LastIndex+1; if (pMsg->ReadAll) {//return all points... XM.Clear(); const long n=m_Fields.GetSize(); while (DataIndex < n) { CArchiveDBField & It = GetField(DataIndex); if (!It.m_bSystem) { CXM_ObjectData *Data=new CXM_ObjectData (DataIndex); CPkDataItem * pPItem = Data->List.FirstItem(); //CPkDataItem * pPrevItem = pPItem; if (It.GetValue(Data->List, /*pPItem,*/ true)) { //Data->SetSize(); if (XM.PackMsg(Data)) { DataRead = 1; It.ClearChanged(); } else break; //message full } } DataIndex++; } } else {//return points that have changed (if any)... XM.Clear(); if (!m_bSubsRead_Busy) { m_bSubsRead_Busy = 1; m_lBusyChanges = NoOfChanges(); } while (1) { while (m_lBusyChanges) { long iIt= GetNextChange(); m_lBusyChanges--; if (iIt>=0) { DataIndex = iIt; CXM_ObjectData *Data=new CXM_ObjectData (DataIndex); CPkDataItem * pPItem = Data->List.FirstItem(); //CPkDataItem * pPrevItem = pPItem; if (GetCalcValue(iIt, Data->List, /*pPItem,*/ false)) { //Data->SetSize(); if (GetField(iIt).Changed()) { if (XM.PackMsg(Data)) { DataRead = 1; GetField(iIt).ClearChanged(); } else { delete Data; //NOT good, change is not sent !!! break; //message full } } } } } m_bSubsRead_Busy = 0; break; } } //Free(); } return DataRead; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_WriteSubsData(CXMsgLst &XM, flag FirstBlock, flag LastBlock) { while (XM.MsgAvail()) { CXM_ObjectData *pX = XM.ObjectData(); CPkDataItem *pPItem = pX->FirstItem(); if (pX->Index>=m_lInputOffset) { CArchiveInput & It=GetInput(pX->Index-m_lInputOffset); It.PutValue(*pPItem); #if dbgArchiver if (dbgArchiverWrites()) dbgpln("Arc: Put %s EO_WriteSubsData", (LPCTSTR)It.m_sScdMTag); #endif } } return true; } //-------------------------------------------------------------------------- DWORD CArchiveManager::EO_ReadTaggedItem(CXM_ObjectTag & ObjTag, CXM_ObjectData &ObjData, CXM_Route &Route) { DWORD RetCode = 0; if (m_bAllowTagAccess) { const long ItemIndex=FindFieldIndex(ObjTag.Tag); if (ItemIndex>=0) { RetCode = (RC_RTI_Exists | RC_RTI_ArchiveTag); if (IsNumData(FieldType(ItemIndex))) RetCode |= RC_RTI_NumData; else if (IsStrng(FieldType(ItemIndex))) RetCode |= RC_RTI_StrData; ObjData.List.Clear(); if ((ObjTag.Options & TABOpt_Exists)==0) { CPkDataItem * pPItem = ObjData.List.FirstItem(); //CPkDataItem * pPrevItem = pPItem; GetCalcValue(ItemIndex, ObjData.List, /*pPItem,*/ true); //ObjData.SetSize(); } } } return RetCode; } //-------------------------------------------------------------------------- int CArchiveManager::EO_WriteTaggedItem(CXM_ObjectData &ObjData, CXM_Route &Route) { return TOData_NotFound; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_Execute(CXM_TimeControl &CB, CEOExecReturn &EORet) { SendExecute(); return false; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_StepDone(CXM_TimeControl &CB, flag StepExecuted) { if (StepExecuted) SendStepDone(); return false; }; //--------------------------------------------------------------------------- flag CArchiveManager::EO_Stop(CXM_TimeControl &CB) { SendStop(); return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_TagsNotAvail(CXMsgLst &XM) { while (XM.MsgAvail()) { CXM_TagNotAvail * pX = XM.TagNotAvail(); LogError(ArcName, 0, "Tag not found %s", pX->Tag); } XM.Clear(); return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_BeginSave(FilingControlBlock &FCB) { m_bDoneLocalLoadSave = 0; if (m_bOn) { // for (int i=0; i<Drivers.InUse(); i++) // { // Drivers.At(i)->bDoneSave = 0; // Drivers.At(i)->BeginSave(FCB); // } //// if (FCB.SaveAs()) //// FCB.CopyFile(sName()); } m_iLoadSaveCnt = 0; return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_SaveDefinedData(FilingControlBlock &FCB, Strng &Tag, CXMsgLst &XM) { // while (1) // { // while (m_iLoadSaveCnt<Drivers.InUse() && !Drivers.At(m_iLoadSaveCnt)->HasLoadSave()) // m_iLoadSaveCnt++; // if (m_iLoadSaveCnt>=Drivers.InUse()) // {//finished save data for each driver // if (m_bDoneLocalLoadSave) // return false; // Tag = "ArchiveData"; // CXM_ObjectData ObjData(0);//indexed to the first Data Item which is all thats required // ObjData.SetSize(); // XM.PackMsg(ObjData); // return true; // } // if (Drivers.At(m_iLoadSaveCnt)->SaveDefinedData(FCB, Tag, XM)) // return true; // m_iLoadSaveCnt++; // } return false; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_SaveOtherData(FilingControlBlock &FCB) { // DWORD NWrite; // char Buff[64]; // CNM Spares // if (m_iLoadSaveCnt<Drivers.InUse()) // { // pCDriver pDrv = Drivers.At(m_iLoadSaveCnt); // if (!pDrv->bDoneSave) // { // byte Len=pDrv->sTag.Len(); // ASSERT_ALWAYS(Len<' ', "Bad Driver Tag Len", __FILE__, __LINE__); // //ASSERT(pDrv->sTag.Len()<9); // strcpy(Buff, pDrv->sTag()); // Buff[Len]=0; // FCB.WriteFile(&Len, sizeof(Len), &NWrite); // FCB.WriteFile((LPVOID)Buff, Len, &NWrite); // pDrv->bDoneSave = 1; // } // return pDrv->SaveOtherData(FCB); // } // if (m_bDoneLocalLoadSave) // return false; // m_bDoneLocalLoadSave = 1; // SaveTags(FCB, false); return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_BeginLoad(FilingControlBlock &FCB) { m_bDoneLocalLoadSave = 0; if (m_bOn) { // for (int i=0; i<Drivers.InUse(); i++) // Drivers.At(i)->BeginLoad(FCB); } m_iLoadSaveCnt = 0; return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_LoadDefinedData(FilingControlBlock &FCB, CXMsgLst &XM) { // for (long i=0; i<Drivers.InUse(); i++) // if (Drivers.At(i)->LoadDefinedData(FCB, XM)) // return true; //finished loading each driver if (m_bDoneLocalLoadSave) return false; return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_LoadOtherData(FilingControlBlock &FCB) { if (FCB.Eof()) return false; // DWORD NRead; // char Buff[512]; //// Buff[Len]=0; //// FCB.WriteFile(&Len, sizeof(Len), &NWrite); //// FCB.WriteFile((LPVOID)Buff, Len, &NWrite); // // Read One Byte if > ' ' then old style 9 chars // FCB.ReadFile((LPVOID)Buff, 1, &NRead); // if (Buff[0]>' ') // FCB.ReadFile((LPVOID)&Buff[1], 8, &NRead); // else // { // //Buff[0] is Len Byte // byte Len=Buff[0]; // FCB.ReadFile((LPVOID)Buff, Len, &NRead); // Buff[Len]=0; // } // pCDriver pDrv = Drivers.Find(Buff); // if (pDrv) // { // if (pDrv->LoadOtherData(FCB)) // return true; // } // else if (strncmp("TAGS....", Buff, 8)==0) // { // m_bDoneLocalLoadSave = 1; // if (!FCB.Eof()) // LoadTags(FCB); // return true; // } return false; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_ConnectsDone(FilingControlBlock &FCB) { return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_DataLoaded(FilingControlBlock &FCB) { return true; } //--------------------------------------------------------------------------- flag CArchiveManager::EO_EndLoad(FilingControlBlock &FCB) { // for (long i=0; i<Slots.GetSize(); i++) // { // CDrvSlot& S = *(Slots[i]); // if (S.bLocal && S.bUseInitVal && (!bIgnoresOn || !S.bIgnoreWrites)) // { // PkDataUnion Data(S.dInitVal); // S.PutTagValue(Data); // } // } return true; } //--------------------------------------------------------------------------- int CArchiveManager::EO_QueryChangeTag(pchar pOldTag, pchar pNewTag) {//will I allow the tag to be changed... /*int SlotNo = FindChanForTag(pOldTag); if (SlotNo>=0) return EOCT_NOTALLOWED;*/ if (gs_Exec.Busy()) { //do not allow user to change a solver tag that is refered to by the driver //connect column while syscad is running const int len = strlen(pOldTag); const int j = m_Inputs.GetSize(); for (int i=0; i<j; i++) { if (_strnicmp(pOldTag, m_Inputs[i]->m_sScdMTag, len)==0) return EOCT_ARCNOTALLOWED; } } return EOCT_NOTFOUND; } //--------------------------------------------------------------------------- int CArchiveManager::EO_ChangeTag(pchar pOldTag, pchar pNewTag) {//a tag has been changed, ... const int len = strlen(pOldTag); const int j = m_Inputs.GetSize(); for (int i=0; i<j; i++) { CArchiveInput * pInput = m_Inputs[i]; if (_strnicmp(pOldTag, pInput->m_sScdMTag, len)==0) { ASSERT(!gs_Exec.Busy()); LogWarning(ArcName, 0, "Changing tag '%s' affects archiver", pOldTag); } } return EOCT_NOTFOUND; } //--------------------------------------------------------------------------- int CArchiveManager::EO_ChangeTagDone(pchar pOldTag, pchar pNewTag) {//a tag has been changed, ... return EOCT_DONE; } //--------------------------------------------------------------------------- int CArchiveManager::EO_QueryDeleteTags(Strng_List & Tags) {//will I allow the tag to be deleted... /*int SlotNo = FindChanForTag(pOldTag); if (SlotNo>=0) return EODT_NOTALLOWED;*/ return EODT_NOTFOUND; } //--------------------------------------------------------------------------- int CArchiveManager::EO_DeleteTags(Strng_List & Tags) {//a tag has been deleted, ... return EODT_NOTFOUND; } //--------------------------------------------------------------------------- int CArchiveManager::EO_DeleteTagsDone(Strng_List & Tags) {//a tag has been deleted, ... return EODT_DONE; } //--------------------------------------------------------------------------- void CArchiveManager::EO_OnAppActivate(BOOL bActive) { } //--------------------------------------------------------------------------- flag CArchiveManager::EO_RequestTagInfo(RequestTagInfoRec& Rqst, ReplyTagInfoRec& Info) { if (m_bOn) { switch (Rqst.RQ_Type) { case RQ_Files: if (Rqst.bFirst) { m_iLoadSaveCnt = 0; Info.sData = m_sCfgFile; Info.bForceCopy = true; Info.bPreventCopy = false; return true; } else if (m_iLoadSaveCnt==0) { m_iLoadSaveCnt++; Info.sData = m_sDataFile; Info.bForceCopy = false; Info.bPreventCopy = false; return true; } break; case RQ_Tags: //return info on all tags based on request criteria... case RQ_TagsConns: //return info on all tags based on request criteria... //if (Info.Count()<m_Items.GetSize() && (Rqst.pGroup==NULL || _stricmp(Rqst.pGroup, ArcName)==0)) // { // Info.sData = m_Items[Info.Count()]->m_sTag(); // return true; // } break; case RQ_TagCount: //if (Rqst.bFirst) // { // Info.dwData = m_Items.GetSize(); // Info.bDWDataValid = 1; // return true; // } break; } } return false; } //--------------------------------------------------------------------------- void CArchiveManager::SaveTags(FilingControlBlock &FCB, BOOL SaveAll) { DWORD NWrite; char Buff[9]; long ns; double d,dp; strcpy(Buff, "TAGS...."); FCB.WriteFile((LPVOID)Buff, 9, &NWrite); const long n=m_Fields.GetSize(); for (long i=0; i<n; i++) { CArchiveDBField & C = *m_Fields[i]; const long len = C.m_sScdMTag.GetLength(); ns=C.m_nSamples; d=C.m_dCalculatedValue; dp=C.m_dPrevInputMeas; FCB.WriteFile((LPVOID)&len, sizeof(long), &NWrite); FCB.WriteFile((LPVOID)(LPCTSTR)C.m_sScdMTag, len+1, &NWrite); FCB.WriteFile((LPVOID)&ns, sizeof(ns), &NWrite); FCB.WriteFile((LPVOID)&d, sizeof(d), &NWrite); FCB.WriteFile((LPVOID)&dp, sizeof(dp), &NWrite); } } //--------------------------------------------------------------------------- void CArchiveManager::LoadTags(FilingControlBlock &FCB) { DWORD NRead; char Buff[512]; long len; long ns; double d,dp; while (!FCB.Eof()) { FCB.ReadFile((LPVOID)&len, sizeof(long), &NRead); FCB.ReadFile((LPVOID)Buff, len+1, &NRead); FCB.ReadFile((LPVOID)&ns, sizeof(ns), &NRead); FCB.ReadFile((LPVOID)&d, sizeof(d), &NRead); FCB.ReadFile((LPVOID)&dp, sizeof(dp), &NRead); const int ci = FindFieldIndex(Buff); if (ci>=0) {//tag found... m_Fields[ci]->m_nSamples = ns; //if (Valid(d)) m_Fields[ci]->m_dCalculatedValue = d; m_Fields[ci]->m_dPrevInputMeas = dp; } } } //--------------------------------------------------------------------------- void CArchiveManager::Options(char* pGotoTag/*=NULL*/) { if (pArcSheet==NULL) { pArcSheet = new CArchiveSheet(this, "Archive", AfxGetMainWnd(), pGotoTag==NULL ? 0 : 1); CArcTablesPage * pT=new CArcTablesPage(); pT->m_pAM=this; pArcSheet->AddPage(pT); CArcInputPage *pS=new CArcInputPage(); pS->m_pAM=this; pArcSheet->AddPage(pS); //CPropertyPage* Pages[16]; //for (int i=0; i<Drivers.InUse(); i++) // { // pCDriver pDrv = Drivers.At(i); // int Cnt = pDrv->AddPages(Pages); // for (int j=0; j<Cnt; j++) // pArcSheet->AddPage(Pages[j]); // } if (pArcSheet->GetPageCount()>0) { if (!pArcSheet->Create(AfxGetMainWnd(), WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME | WS_VISIBLE, WS_EX_DLGMODALFRAME)) { TRACE("Failed to create Archive PropertySheet\n"); delete pArcSheet; pArcSheet=NULL; } } else { delete pArcSheet; pArcSheet=NULL; } } if (pArcSheet && pGotoTag) { pArcSheet->DisplayTag(pGotoTag); } } //--------------------------------------------------------------------------- void CArchiveManager::CloseOptions() { if (pArcSheet) { pArcSheet->PressButton(PSBTN_CANCEL); delete pArcSheet; } pArcSheet=NULL; } //--------------------------------------------------------------------------- void CArchiveManager::AddFieldDlg(TagInfoBlk &IB) { if (!m_bOn) LogNote(ArcName,0,"Archive not enabled"); else if (XBusy()) LogNote(ArcName,0,"SysCAD must be stopped"); else { CAddToArchive AA(IB, this, AfxGetMainWnd()); AA.DoModal(); } }; //=========================================================================== void CArchiveManager::LogAMessage(CMsgLogItem & Msg) { //dbgpln("CArchiveManager::LogAMessage %08x %-20s %s", Msg.m_dwFlags, Msg.Source, Msg.Description); if (m_pMessageLog) m_pMessageLog->AddMsgRecord(gs_TimeCB, Msg); }; //=========================================================================== void CArchiveManager::LogAnEvent(LPCTSTR Tag, LPCTSTR Msg) { // WHAT ABOUT A LOCK/SEMA //dbgpln("CArchiveManager::LogAnEvent %-20s %s", Tag, Msg); if (m_pEventLog) m_pEventLog->AddEventRecord(gs_TimeCB, Tag, Msg); }; //===========================================================================
[ [ [ 1, 17 ], [ 20, 20 ], [ 22, 28 ], [ 30, 31 ], [ 34, 35 ], [ 265, 277 ], [ 279, 280 ], [ 282, 286 ], [ 297, 297 ], [ 299, 300 ], [ 302, 306 ], [ 318, 323 ], [ 332, 332 ], [ 338, 338 ], [ 359, 364 ], [ 366, 366 ], [ 377, 381 ], [ 383, 385 ], [ 387, 388 ], [ 390, 395 ], [ 399, 399 ], [ 402, 409 ], [ 421, 421 ], [ 453, 453 ], [ 458, 458 ], [ 460, 461 ], [ 464, 464 ], [ 468, 468 ], [ 472, 473 ], [ 480, 481 ], [ 484, 484 ], [ 488, 489 ], [ 494, 495 ], [ 500, 501 ], [ 503, 504 ], [ 508, 508 ], [ 511, 512 ], [ 515, 517 ], [ 519, 520 ], [ 522, 522 ], [ 559, 561 ], [ 584, 584 ], [ 592, 597 ], [ 599, 601 ], [ 603, 610 ], [ 614, 616 ], [ 634, 635 ], [ 637, 637 ], [ 639, 639 ], [ 643, 643 ], [ 645, 645 ], [ 647, 647 ], [ 649, 649 ], [ 651, 651 ], [ 653, 653 ], [ 655, 655 ], [ 657, 657 ], [ 659, 659 ], [ 661, 661 ], [ 663, 665 ], [ 667, 667 ], [ 669, 671 ], [ 673, 673 ], [ 711, 713 ], [ 721, 730 ], [ 732, 734 ], [ 736, 736 ], [ 738, 739 ], [ 741, 742 ], [ 753, 753 ], [ 790, 790 ], [ 792, 794 ], [ 800, 804 ], [ 806, 806 ], [ 845, 853 ], [ 855, 863 ], [ 871, 871 ], [ 876, 877 ], [ 879, 883 ], [ 886, 892 ], [ 894, 896 ], [ 905, 905 ], [ 909, 911 ], [ 915, 915 ], [ 922, 924 ], [ 928, 928 ], [ 931, 932 ], [ 935, 935 ], [ 937, 937 ], [ 939, 940 ], [ 960, 961 ], [ 969, 970 ], [ 975, 977 ], [ 980, 982 ], [ 985, 985 ], [ 990, 990 ], [ 994, 994 ], [ 999, 1006 ], [ 1011, 1011 ], [ 1013, 1013 ], [ 1016, 1016 ], [ 1018, 1019 ], [ 1022, 1024 ], [ 1053, 1053 ], [ 1061, 1061 ], [ 1063, 1063 ], [ 1074, 1074 ], [ 1194, 1196 ], [ 1198, 1202 ], [ 1204, 1207 ], [ 1209, 1209 ], [ 1231, 1236 ], [ 1238, 1238 ], [ 1243, 1247 ], [ 1258, 1273 ], [ 1280, 1289 ], [ 1291, 1300 ], [ 1304, 1310 ], [ 1315, 1315 ], [ 1333, 1333 ], [ 1349, 1349 ], [ 1379, 1380 ], [ 1384, 1386 ], [ 1481, 1481 ], [ 1489, 1489 ], [ 1519, 1519 ], [ 1529, 1529 ], [ 1591, 1591 ], [ 1630, 1630 ], [ 1632, 1632 ], [ 1668, 1669 ], [ 1671, 1673 ], [ 1675, 1675 ], [ 1685, 1685 ], [ 1754, 1754 ], [ 1794, 1794 ], [ 1796, 1800 ], [ 1829, 1829 ], [ 1831, 1831 ], [ 1844, 1844 ], [ 1848, 1848 ], [ 1850, 1850 ], [ 1859, 1859 ], [ 1861, 1861 ], [ 1870, 1870 ], [ 1872, 1872 ], [ 1891, 1891 ], [ 1893, 1893 ], [ 1900, 1900 ], [ 1902, 1902 ], [ 1906, 1906 ], [ 1908, 1908 ], [ 1937, 1937 ], [ 1939, 1939 ], [ 1947, 1947 ], [ 1949, 1949 ], [ 2059, 2059 ], [ 2063, 2063 ], [ 2065, 2065 ], [ 2068, 2068 ], [ 2070, 2070 ], [ 2072, 2072 ], [ 2087, 2087 ], [ 2089, 2089 ], [ 2095, 2095 ], [ 2097, 2097 ], [ 2117, 2117 ], [ 2126, 2126 ], [ 2129, 2130 ], [ 2158, 2158 ], [ 2160, 2161 ], [ 2164, 2165 ], [ 2169, 2169 ], [ 2179, 2179 ], [ 2190, 2190 ], [ 2193, 2193 ], [ 2195, 2195 ], [ 2224, 2224 ], [ 2231, 2231 ], [ 2238, 2238 ], [ 2241, 2241 ], [ 2248, 2250 ], [ 2252, 2252 ], [ 2255, 2255 ], [ 2257, 2257 ], [ 2261, 2261 ], [ 2267, 2267 ], [ 2272, 2272 ], [ 2297, 2297 ], [ 2302, 2302 ], [ 2307, 2307 ], [ 2316, 2316 ], [ 2319, 2319 ], [ 2321, 2321 ], [ 2325, 2326 ], [ 2331, 2331 ], [ 2336, 2336 ], [ 2338, 2338 ], [ 2358, 2358 ], [ 2360, 2360 ], [ 2366, 2366 ], [ 2368, 2368 ], [ 2370, 2370 ], [ 2372, 2372 ], [ 2375, 2375 ], [ 2377, 2377 ], [ 2380, 2381 ], [ 2388, 2389 ], [ 2391, 2393 ], [ 2398, 2398 ], [ 2401, 2401 ], [ 2409, 2413 ], [ 2425, 2425 ], [ 2428, 2428 ], [ 2493, 2494 ], [ 2504, 2504 ], [ 2507, 2507 ], [ 2509, 2509 ], [ 2513, 2513 ], [ 2517, 2517 ], [ 2523, 2523 ], [ 2525, 2525 ], [ 2529, 2529 ], [ 2533, 2533 ], [ 2536, 2536 ], [ 2545, 2545 ], [ 2551, 2551 ], [ 2590, 2590 ], [ 2621, 2621 ], [ 2647, 2647 ], [ 2720, 2720 ], [ 2738, 2738 ], [ 2741, 2742 ], [ 2755, 2756 ], [ 2758, 2758 ], [ 2761, 2761 ], [ 2763, 2763 ], [ 2769, 2769 ], [ 2773, 2773 ], [ 2788, 2788 ], [ 2790, 2790 ], [ 2794, 2794 ], [ 2797, 2797 ], [ 2802, 2802 ], [ 2805, 2805 ], [ 2807, 2807 ], [ 2810, 2811 ], [ 2814, 2814 ], [ 2817, 2817 ], [ 2819, 2819 ], [ 2828, 2828 ], [ 2839, 2839 ], [ 2845, 2845 ], [ 2848, 2849 ], [ 2855, 2855 ], [ 2864, 2864 ], [ 2867, 2867 ], [ 2869, 2869 ], [ 2883, 2883 ], [ 2888, 2888 ], [ 2890, 2890 ], [ 2895, 2895 ], [ 2898, 2898 ], [ 2902, 2902 ], [ 2907, 2908 ], [ 2915, 2915 ], [ 2930, 2930 ], [ 2943, 2943 ], [ 2946, 2946 ], [ 2948, 2948 ], [ 2951, 2951 ], [ 2953, 2953 ], [ 2956, 2956 ], [ 2959, 2960 ], [ 2964, 2964 ], [ 2966, 2966 ], [ 2973, 2973 ], [ 2980, 2980 ], [ 2986, 2986 ], [ 2995, 2995 ], [ 3000, 3000 ], [ 3023, 3023 ], [ 3025, 3026 ], [ 3029, 3029 ], [ 3032, 3032 ], [ 3034, 3034 ], [ 3040, 3040 ], [ 3053, 3053 ], [ 3056, 3056 ], [ 3085, 3085 ], [ 3087, 3087 ], [ 3093, 3093 ], [ 3097, 3097 ], [ 3100, 3100 ], [ 3103, 3103 ], [ 3105, 3105 ], [ 3111, 3111 ], [ 3113, 3113 ], [ 3131, 3131 ], [ 3134, 3134 ], [ 3138, 3138 ], [ 3140, 3140 ], [ 3145, 3145 ], [ 3150, 3150 ], [ 3157, 3162 ], [ 3169, 3169 ], [ 3173, 3173 ], [ 3177, 3177 ], [ 3179, 3179 ], [ 3185, 3185 ], [ 3187, 3187 ], [ 3193, 3193 ], [ 3195, 3195 ], [ 3201, 3201 ], [ 3203, 3203 ], [ 3209, 3209 ], [ 3222, 3222 ], [ 3224, 3225 ], [ 3230, 3230 ], [ 3239, 3239 ], [ 3243, 3243 ], [ 3245, 3245 ], [ 3248, 3248 ], [ 3252, 3252 ], [ 3287, 3287 ], [ 3294, 3294 ], [ 3298, 3299 ], [ 3302, 3302 ], [ 3304, 3304 ], [ 3307, 3307 ], [ 3309, 3309 ], [ 3339, 3339 ], [ 3341, 3341 ], [ 3343, 3343 ], [ 3347, 3347 ], [ 3376, 3377 ], [ 3380, 3380 ], [ 3382, 3382 ], [ 3387, 3387 ], [ 3389, 3389 ], [ 3411, 3411 ], [ 3425, 3425 ], [ 3428, 3429 ], [ 3431, 3431 ], [ 3433, 3433 ], [ 3437, 3437 ], [ 3447, 3448 ], [ 3450, 3450 ], [ 3452, 3452 ], [ 3463, 3463 ], [ 3466, 3466 ], [ 3469, 3469 ], [ 3484, 3484 ], [ 3486, 3487 ], [ 3497, 3497 ], [ 3499, 3499 ], [ 3503, 3503 ], [ 3509, 3509 ], [ 3512, 3512 ], [ 3524, 3527 ], [ 3530, 3530 ], [ 3534, 3534 ], [ 3539, 3539 ], [ 3543, 3543 ], [ 3547, 3547 ], [ 3553, 3556 ], [ 3561, 3561 ], [ 3569, 3569 ], [ 3583, 3584 ], [ 3587, 3587 ], [ 3589, 3589 ], [ 3594, 3594 ], [ 3596, 3596 ], [ 3602, 3602 ], [ 3604, 3604 ], [ 3611, 3611 ], [ 3613, 3613 ], [ 3617, 3617 ], [ 3620, 3620 ], [ 3622, 3622 ], [ 3626, 3626 ], [ 3629, 3629 ], [ 3633, 3633 ], [ 3635, 3635 ], [ 3640, 3640 ], [ 3642, 3642 ], [ 3645, 3645 ], [ 3648, 3648 ], [ 3652, 3652 ], [ 3654, 3654 ], [ 3706, 3706 ], [ 3708, 3708 ], [ 3713, 3713 ], [ 3716, 3716 ], [ 3720, 3720 ], [ 3722, 3722 ], [ 3730, 3730 ], [ 3733, 3733 ], [ 3735, 3735 ], [ 3771, 3771 ], [ 3773, 3773 ], [ 3801, 3801 ], [ 3803, 3803 ], [ 3813, 3816 ], [ 3819, 3820 ], [ 3823, 3823 ], [ 3825, 3825 ], [ 3838, 3838 ], [ 3843, 3843 ], [ 3858, 3858 ], [ 3860, 3860 ], [ 3865, 3865 ], [ 3867, 3867 ], [ 3880, 3880 ], [ 3884, 3884 ], [ 3886, 3886 ], [ 3904, 3904 ], [ 3922, 3923 ], [ 3926, 3926 ], [ 3928, 3928 ], [ 3950, 3950 ], [ 3952, 3952 ], [ 3954, 3954 ], [ 3976, 3977 ], [ 3979, 3979 ], [ 3981, 3981 ], [ 3985, 3985 ], [ 3987, 3987 ], [ 3991, 3991 ], [ 3995, 3995 ], [ 4004, 4004 ], [ 4008, 4008 ], [ 4010, 4013 ], [ 4015, 4015 ], [ 4018, 4019 ], [ 4025, 4025 ], [ 4027, 4027 ], [ 4031, 4031 ], [ 4034, 4034 ], [ 4037, 4037 ], [ 4039, 4039 ], [ 4047, 4047 ], [ 4052, 4052 ] ], [ [ 18, 18 ], [ 29, 29 ], [ 36, 39 ], [ 41, 45 ], [ 49, 73 ], [ 76, 77 ], [ 79, 82 ], [ 84, 87 ], [ 90, 92 ], [ 94, 105 ], [ 107, 111 ], [ 113, 117 ], [ 119, 128 ], [ 131, 131 ], [ 133, 137 ], [ 147, 147 ], [ 149, 149 ], [ 174, 174 ], [ 200, 209 ], [ 212, 227 ], [ 230, 239 ], [ 243, 264 ], [ 278, 278 ], [ 298, 298 ], [ 301, 301 ], [ 307, 317 ], [ 324, 325 ], [ 327, 328 ], [ 330, 330 ], [ 340, 341 ], [ 358, 358 ], [ 365, 365 ], [ 367, 371 ], [ 373, 375 ], [ 386, 386 ], [ 389, 389 ], [ 396, 398 ], [ 400, 401 ], [ 411, 411 ], [ 416, 419 ], [ 428, 438 ], [ 442, 442 ], [ 444, 446 ], [ 448, 449 ], [ 454, 457 ], [ 459, 459 ], [ 463, 463 ], [ 467, 467 ], [ 471, 471 ], [ 474, 475 ], [ 479, 479 ], [ 490, 493 ], [ 497, 499 ], [ 507, 507 ], [ 518, 518 ], [ 521, 521 ], [ 539, 545 ], [ 557, 557 ], [ 562, 565 ], [ 567, 567 ], [ 569, 583 ], [ 585, 586 ], [ 588, 590 ], [ 602, 602 ], [ 612, 613 ], [ 617, 624 ], [ 631, 633 ], [ 636, 636 ], [ 638, 638 ], [ 640, 642 ], [ 646, 646 ], [ 648, 648 ], [ 652, 652 ], [ 654, 654 ], [ 658, 658 ], [ 660, 660 ], [ 666, 666 ], [ 672, 672 ], [ 714, 720 ], [ 740, 740 ], [ 744, 752 ], [ 754, 754 ], [ 757, 757 ], [ 776, 776 ], [ 778, 778 ], [ 788, 788 ], [ 797, 797 ], [ 805, 805 ], [ 807, 820 ], [ 822, 843 ], [ 864, 869 ], [ 884, 885 ], [ 897, 904 ], [ 906, 908 ], [ 912, 914 ], [ 916, 921 ], [ 925, 925 ], [ 929, 930 ], [ 933, 934 ], [ 936, 936 ], [ 938, 938 ], [ 941, 959 ], [ 962, 968 ], [ 971, 974 ], [ 979, 979 ], [ 983, 984 ], [ 986, 989 ], [ 992, 992 ], [ 997, 997 ], [ 1007, 1010 ], [ 1012, 1012 ], [ 1014, 1015 ], [ 1017, 1017 ], [ 1020, 1021 ], [ 1025, 1052 ], [ 1054, 1060 ], [ 1062, 1062 ], [ 1064, 1066 ], [ 1071, 1073 ], [ 1075, 1193 ], [ 1197, 1197 ], [ 1203, 1203 ], [ 1208, 1208 ], [ 1210, 1230 ], [ 1237, 1237 ], [ 1239, 1241 ], [ 1274, 1279 ], [ 1290, 1290 ], [ 1311, 1314 ], [ 1316, 1332 ], [ 1334, 1348 ], [ 1350, 1378 ], [ 1381, 1383 ], [ 1387, 1388 ], [ 1390, 1392 ], [ 1413, 1437 ], [ 1439, 1440 ], [ 1456, 1480 ], [ 1482, 1488 ], [ 1490, 1495 ], [ 1498, 1498 ], [ 1501, 1501 ], [ 1507, 1518 ], [ 1520, 1528 ], [ 1530, 1530 ], [ 1533, 1533 ], [ 1542, 1590 ], [ 1592, 1612 ], [ 1615, 1617 ], [ 1620, 1629 ], [ 1631, 1631 ], [ 1633, 1658 ], [ 1661, 1667 ], [ 1670, 1670 ], [ 1674, 1674 ], [ 1676, 1684 ], [ 1686, 1697 ], [ 1700, 1702 ], [ 1705, 1753 ], [ 1755, 1793 ], [ 1795, 1795 ], [ 1801, 1806 ], [ 1808, 1828 ], [ 1830, 1830 ], [ 1832, 1843 ], [ 1845, 1847 ], [ 1849, 1849 ], [ 1851, 1852 ], [ 1854, 1857 ], [ 1860, 1860 ], [ 1862, 1863 ], [ 1865, 1868 ], [ 1871, 1871 ], [ 1873, 1874 ], [ 1877, 1879 ], [ 1881, 1885 ], [ 1887, 1889 ], [ 1892, 1892 ], [ 1894, 1898 ], [ 1901, 1901 ], [ 1903, 1904 ], [ 1907, 1907 ], [ 1909, 1927 ], [ 1929, 1936 ], [ 1938, 1938 ], [ 1940, 1946 ], [ 1948, 1948 ], [ 1950, 1951 ], [ 1955, 1997 ], [ 2003, 2024 ], [ 2027, 2034 ], [ 2038, 2058 ], [ 2060, 2062 ], [ 2064, 2064 ], [ 2066, 2067 ], [ 2069, 2069 ], [ 2071, 2071 ], [ 2073, 2073 ], [ 2075, 2086 ], [ 2088, 2088 ], [ 2090, 2094 ], [ 2096, 2096 ], [ 2098, 2116 ], [ 2118, 2125 ], [ 2127, 2128 ], [ 2131, 2131 ], [ 2134, 2157 ], [ 2159, 2159 ], [ 2162, 2163 ], [ 2166, 2168 ], [ 2170, 2178 ], [ 2180, 2186 ], [ 2188, 2189 ], [ 2191, 2192 ], [ 2194, 2194 ], [ 2196, 2223 ], [ 2227, 2230 ], [ 2234, 2237 ], [ 2239, 2240 ], [ 2242, 2247 ], [ 2251, 2251 ], [ 2253, 2254 ], [ 2256, 2256 ], [ 2258, 2260 ], [ 2262, 2266 ], [ 2268, 2271 ], [ 2273, 2274 ], [ 2277, 2293 ], [ 2295, 2296 ], [ 2298, 2299 ], [ 2301, 2301 ], [ 2304, 2306 ], [ 2308, 2311 ], [ 2314, 2315 ], [ 2317, 2318 ], [ 2320, 2320 ], [ 2322, 2324 ], [ 2327, 2330 ], [ 2332, 2335 ], [ 2337, 2337 ], [ 2339, 2357 ], [ 2359, 2359 ], [ 2361, 2365 ], [ 2367, 2367 ], [ 2369, 2369 ], [ 2371, 2371 ], [ 2373, 2374 ], [ 2376, 2376 ], [ 2378, 2379 ], [ 2382, 2387 ], [ 2390, 2390 ], [ 2394, 2397 ], [ 2399, 2400 ], [ 2402, 2408 ], [ 2414, 2424 ], [ 2426, 2427 ], [ 2429, 2436 ], [ 2439, 2440 ], [ 2442, 2445 ], [ 2449, 2451 ], [ 2454, 2458 ], [ 2471, 2474 ], [ 2476, 2485 ], [ 2487, 2492 ], [ 2495, 2503 ], [ 2505, 2506 ], [ 2508, 2508 ], [ 2510, 2512 ], [ 2514, 2516 ], [ 2518, 2522 ], [ 2524, 2524 ], [ 2526, 2528 ], [ 2530, 2532 ], [ 2534, 2535 ], [ 2537, 2544 ], [ 2546, 2550 ], [ 2552, 2557 ], [ 2567, 2570 ], [ 2572, 2575 ], [ 2577, 2585 ], [ 2587, 2588 ], [ 2591, 2592 ], [ 2594, 2614 ], [ 2622, 2628 ], [ 2632, 2633 ], [ 2638, 2646 ], [ 2649, 2657 ], [ 2659, 2679 ], [ 2682, 2692 ], [ 2695, 2697 ], [ 2699, 2699 ], [ 2706, 2719 ], [ 2721, 2737 ], [ 2739, 2740 ], [ 2743, 2754 ], [ 2757, 2757 ], [ 2759, 2760 ], [ 2762, 2762 ], [ 2764, 2768 ], [ 2770, 2772 ], [ 2774, 2787 ], [ 2789, 2789 ], [ 2791, 2793 ], [ 2795, 2796 ], [ 2798, 2801 ], [ 2803, 2804 ], [ 2806, 2806 ], [ 2808, 2809 ], [ 2812, 2813 ], [ 2815, 2816 ], [ 2818, 2818 ], [ 2820, 2821 ], [ 2825, 2827 ], [ 2829, 2838 ], [ 2840, 2844 ], [ 2846, 2847 ], [ 2859, 2863 ], [ 2865, 2866 ], [ 2868, 2868 ], [ 2870, 2876 ], [ 2879, 2880 ], [ 2882, 2882 ], [ 2884, 2886 ], [ 2889, 2889 ], [ 2891, 2894 ], [ 2896, 2896 ], [ 2904, 2906 ], [ 2910, 2911 ], [ 2913, 2914 ], [ 2916, 2921 ], [ 2924, 2929 ], [ 2931, 2942 ], [ 2944, 2945 ], [ 2947, 2947 ], [ 2949, 2950 ], [ 2952, 2952 ], [ 2954, 2955 ], [ 2957, 2958 ], [ 2961, 2963 ], [ 2965, 2965 ], [ 2967, 2972 ], [ 2974, 2979 ], [ 2981, 2985 ], [ 2987, 2994 ], [ 2996, 2999 ], [ 3001, 3022 ], [ 3024, 3024 ], [ 3027, 3028 ], [ 3030, 3031 ], [ 3033, 3033 ], [ 3035, 3037 ], [ 3041, 3052 ], [ 3054, 3055 ], [ 3057, 3057 ], [ 3086, 3086 ], [ 3088, 3090 ], [ 3094, 3096 ], [ 3098, 3099 ], [ 3101, 3102 ], [ 3104, 3104 ], [ 3106, 3110 ], [ 3112, 3112 ], [ 3116, 3130 ], [ 3132, 3133 ], [ 3135, 3137 ], [ 3139, 3139 ], [ 3141, 3144 ], [ 3146, 3149 ], [ 3151, 3156 ], [ 3163, 3168 ], [ 3170, 3172 ], [ 3174, 3176 ], [ 3178, 3178 ], [ 3180, 3184 ], [ 3186, 3186 ], [ 3188, 3192 ], [ 3194, 3194 ], [ 3196, 3200 ], [ 3202, 3202 ], [ 3204, 3208 ], [ 3210, 3221 ], [ 3223, 3223 ], [ 3226, 3229 ], [ 3231, 3238 ], [ 3240, 3242 ], [ 3246, 3247 ], [ 3250, 3251 ], [ 3253, 3260 ], [ 3262, 3286 ], [ 3288, 3293 ], [ 3295, 3297 ], [ 3300, 3301 ], [ 3303, 3303 ], [ 3305, 3306 ], [ 3308, 3308 ], [ 3310, 3328 ], [ 3332, 3333 ], [ 3337, 3337 ], [ 3342, 3342 ], [ 3344, 3346 ], [ 3348, 3355 ], [ 3357, 3375 ], [ 3378, 3379 ], [ 3381, 3381 ], [ 3383, 3386 ], [ 3388, 3388 ], [ 3390, 3410 ], [ 3412, 3424 ], [ 3426, 3427 ], [ 3430, 3430 ], [ 3432, 3432 ], [ 3434, 3435 ], [ 3449, 3449 ], [ 3451, 3451 ], [ 3453, 3455 ], [ 3474, 3474 ], [ 3483, 3483 ], [ 3531, 3531 ], [ 3535, 3538 ], [ 3540, 3542 ], [ 3544, 3546 ], [ 3548, 3549 ], [ 3552, 3552 ], [ 3557, 3560 ], [ 3562, 3564 ], [ 3566, 3566 ], [ 3585, 3586 ], [ 3588, 3588 ], [ 3590, 3593 ], [ 3595, 3595 ], [ 3597, 3601 ], [ 3603, 3603 ], [ 3605, 3610 ], [ 3612, 3612 ], [ 3614, 3616 ], [ 3618, 3619 ], [ 3621, 3621 ], [ 3623, 3625 ], [ 3627, 3628 ], [ 3630, 3632 ], [ 3634, 3634 ], [ 3636, 3639 ], [ 3641, 3641 ], [ 3643, 3644 ], [ 3646, 3647 ], [ 3649, 3651 ], [ 3653, 3653 ], [ 3655, 3705 ], [ 3707, 3707 ], [ 3709, 3712 ], [ 3714, 3715 ], [ 3717, 3719 ], [ 3721, 3721 ], [ 3723, 3729 ], [ 3731, 3732 ], [ 3734, 3734 ], [ 3736, 3770 ], [ 3772, 3772 ], [ 3774, 3800 ], [ 3802, 3802 ], [ 3804, 3812 ], [ 3817, 3818 ], [ 3821, 3822 ], [ 3824, 3824 ], [ 3826, 3837 ], [ 3839, 3842 ], [ 3844, 3857 ], [ 3859, 3859 ], [ 3861, 3864 ], [ 3866, 3866 ], [ 3868, 3879 ], [ 3881, 3883 ], [ 3885, 3885 ], [ 3887, 3903 ], [ 3905, 3921 ], [ 3924, 3925 ], [ 3927, 3927 ], [ 3929, 3932 ], [ 3935, 3936 ], [ 3939, 3940 ], [ 3943, 3943 ], [ 3945, 3946 ], [ 3948, 3948 ], [ 3951, 3951 ], [ 3953, 3953 ], [ 3955, 3959 ], [ 3962, 3965 ], [ 3967, 3967 ], [ 3970, 3971 ], [ 3978, 3978 ], [ 3980, 3980 ], [ 3982, 3984 ], [ 3986, 3986 ], [ 3988, 3990 ], [ 3992, 3994 ], [ 3996, 4003 ], [ 4005, 4007 ], [ 4009, 4009 ], [ 4014, 4014 ], [ 4016, 4017 ], [ 4020, 4024 ], [ 4026, 4026 ], [ 4028, 4030 ], [ 4032, 4033 ], [ 4035, 4036 ], [ 4038, 4038 ], [ 4040, 4046 ], [ 4048, 4051 ], [ 4053, 4072 ] ], [ [ 19, 19 ], [ 21, 21 ], [ 32, 33 ], [ 40, 40 ], [ 46, 48 ], [ 74, 75 ], [ 78, 78 ], [ 83, 83 ], [ 88, 89 ], [ 93, 93 ], [ 106, 106 ], [ 112, 112 ], [ 118, 118 ], [ 129, 130 ], [ 132, 132 ], [ 138, 146 ], [ 148, 148 ], [ 150, 173 ], [ 175, 199 ], [ 210, 211 ], [ 228, 229 ], [ 240, 242 ], [ 281, 281 ], [ 287, 296 ], [ 326, 326 ], [ 329, 329 ], [ 331, 331 ], [ 333, 337 ], [ 339, 339 ], [ 342, 357 ], [ 372, 372 ], [ 376, 376 ], [ 382, 382 ], [ 410, 410 ], [ 412, 415 ], [ 420, 420 ], [ 422, 427 ], [ 439, 441 ], [ 443, 443 ], [ 447, 447 ], [ 450, 452 ], [ 462, 462 ], [ 465, 466 ], [ 469, 470 ], [ 476, 478 ], [ 482, 483 ], [ 485, 487 ], [ 496, 496 ], [ 502, 502 ], [ 505, 506 ], [ 509, 510 ], [ 513, 514 ], [ 523, 538 ], [ 546, 556 ], [ 558, 558 ], [ 566, 566 ], [ 568, 568 ], [ 587, 587 ], [ 591, 591 ], [ 598, 598 ], [ 611, 611 ], [ 625, 630 ], [ 644, 644 ], [ 650, 650 ], [ 656, 656 ], [ 662, 662 ], [ 668, 668 ], [ 674, 710 ], [ 731, 731 ], [ 735, 735 ], [ 737, 737 ], [ 743, 743 ], [ 755, 756 ], [ 758, 775 ], [ 777, 777 ], [ 779, 787 ], [ 789, 789 ], [ 791, 791 ], [ 795, 796 ], [ 798, 799 ], [ 821, 821 ], [ 844, 844 ], [ 854, 854 ], [ 870, 870 ], [ 872, 875 ], [ 878, 878 ], [ 893, 893 ], [ 926, 927 ], [ 978, 978 ], [ 991, 991 ], [ 993, 993 ], [ 995, 996 ], [ 998, 998 ], [ 1067, 1070 ], [ 1242, 1242 ], [ 1248, 1257 ], [ 1301, 1303 ], [ 1389, 1389 ], [ 1393, 1412 ], [ 1438, 1438 ], [ 1441, 1455 ], [ 1496, 1497 ], [ 1499, 1500 ], [ 1502, 1506 ], [ 1531, 1532 ], [ 1534, 1541 ], [ 1613, 1614 ], [ 1618, 1619 ], [ 1659, 1660 ], [ 1698, 1699 ], [ 1703, 1704 ], [ 1807, 1807 ], [ 1853, 1853 ], [ 1858, 1858 ], [ 1864, 1864 ], [ 1869, 1869 ], [ 1875, 1876 ], [ 1880, 1880 ], [ 1886, 1886 ], [ 1890, 1890 ], [ 1899, 1899 ], [ 1905, 1905 ], [ 1928, 1928 ], [ 1952, 1954 ], [ 1998, 2002 ], [ 2025, 2026 ], [ 2035, 2037 ], [ 2074, 2074 ], [ 2132, 2133 ], [ 2187, 2187 ], [ 2225, 2226 ], [ 2232, 2233 ], [ 2275, 2276 ], [ 2294, 2294 ], [ 2300, 2300 ], [ 2303, 2303 ], [ 2312, 2313 ], [ 2437, 2438 ], [ 2441, 2441 ], [ 2446, 2448 ], [ 2452, 2453 ], [ 2459, 2470 ], [ 2475, 2475 ], [ 2486, 2486 ], [ 2558, 2566 ], [ 2571, 2571 ], [ 2576, 2576 ], [ 2586, 2586 ], [ 2589, 2589 ], [ 2593, 2593 ], [ 2615, 2620 ], [ 2629, 2631 ], [ 2634, 2637 ], [ 2648, 2648 ], [ 2658, 2658 ], [ 2680, 2681 ], [ 2693, 2694 ], [ 2698, 2698 ], [ 2700, 2705 ], [ 2822, 2824 ], [ 2850, 2854 ], [ 2856, 2858 ], [ 2877, 2878 ], [ 2881, 2881 ], [ 2887, 2887 ], [ 2897, 2897 ], [ 2899, 2901 ], [ 2903, 2903 ], [ 2909, 2909 ], [ 2912, 2912 ], [ 2922, 2923 ], [ 3038, 3039 ], [ 3058, 3084 ], [ 3091, 3092 ], [ 3114, 3115 ], [ 3244, 3244 ], [ 3249, 3249 ], [ 3261, 3261 ], [ 3329, 3331 ], [ 3334, 3336 ], [ 3338, 3338 ], [ 3340, 3340 ], [ 3356, 3356 ], [ 3436, 3436 ], [ 3438, 3446 ], [ 3456, 3462 ], [ 3464, 3465 ], [ 3467, 3468 ], [ 3470, 3473 ], [ 3475, 3482 ], [ 3485, 3485 ], [ 3488, 3496 ], [ 3498, 3498 ], [ 3500, 3502 ], [ 3504, 3508 ], [ 3510, 3511 ], [ 3513, 3523 ], [ 3528, 3529 ], [ 3532, 3533 ], [ 3550, 3551 ], [ 3565, 3565 ], [ 3567, 3568 ], [ 3570, 3582 ], [ 3933, 3934 ], [ 3937, 3938 ], [ 3941, 3942 ], [ 3944, 3944 ], [ 3947, 3947 ], [ 3949, 3949 ], [ 3960, 3961 ], [ 3966, 3966 ], [ 3968, 3969 ], [ 3972, 3975 ] ] ]
54e498bdb2705ec0d656dfbd6be452caf05ca2dd
fd792229322e4042f6e88a01144665cebdb1c339
/src/playerClientActor.cpp
2446ecf8462d5225b8f3c81f0bab41d28f0aa0b7
[]
no_license
weimingtom/mmomm
228d70d9d68834fa2470d2cd0719b9cd60f8dbcd
cab04fcad551f7f68f99fa0b6bb14cec3b962023
refs/heads/master
2021-01-10T02:14:31.896834
2010-03-15T16:15:43
2010-03-15T16:15:43
44,764,408
1
0
null
null
null
null
UTF-8
C++
false
false
423
cpp
#include "playerClientActor.h" #include "frameTimer.h" #include "sprite.h" PlayerClientActor::PlayerClientActor( ActorID actorID, const Rect& rect, const Vector2D& velocity, ClientSprites::SpriteType sprite) : ClientActor(actorID, rect, sprite) { setVelocity(velocity); } void PlayerClientActor::update(double elapsed) { ClientActor::update(elapsed); ClientActor::move(getVelocity() * elapsed); }
[ "[email protected]", "kingoipo@191a6260-07ae-11df-8636-19de83dc8dca" ]
[ [ [ 1, 14 ], [ 16, 17 ] ], [ [ 15, 15 ] ] ]
77d59715c297a411f614d30b84dde5592c0eeeec
4b0f51aeecddecf3f57a29ffa7a184ae48f1dc61
/CleanProject/MyGUI/include/MyGUI_Tab.h
514a1d6e8986452d30187e2eecad2a36b979a75d
[]
no_license
bahao247/apeengine2
56560dbf6d262364fbc0f9f96ba4231e5e4ed301
f2617b2a42bdf2907c6d56e334c0d027fb62062d
refs/heads/master
2021-01-10T14:04:02.319337
2009-08-26T08:23:33
2009-08-26T08:23:33
45,979,392
0
1
null
null
null
null
UTF-8
C++
false
false
15,622
h
/*! @file @author Albert Semenov @date 01/2008 @module *//* This file is part of MyGUI. MyGUI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. MyGUI 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with MyGUI. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __MYGUI_TAB_H__ #define __MYGUI_TAB_H__ #include "MyGUI_Prerequest.h" #include "MyGUI_Widget.h" #include "MyGUI_Any.h" #include "MyGUI_EventPair.h" namespace MyGUI { typedef delegates::CDelegate2<TabPtr, size_t> EventHandle_TabPtrSizeT; class MYGUI_EXPORT Tab : public Widget { // для вызова закрытого конструктора friend class factory::BaseWidgetFactory<Tab>; // для уведобления об удалении friend class TabItem; MYGUI_RTTI_CHILD_HEADER( Tab, Widget ); public: struct TabItemInfo { TabItemInfo(int _width, const Ogre::UTFString& _name, TabItemPtr _item, Any _data) : width(_width), name(_name), item(_item), data(_data) { } int width; Ogre::UTFString name; TabItemPtr item; Any data; }; typedef std::vector<TabItemInfo> VectorTabItemInfo; //! @copydoc Widget::setPosition(const IntPoint & _point) virtual void setPosition(const IntPoint & _point); //! @copydoc Widget::setSize(const IntSize& _size) virtual void setSize(const IntSize & _size); //! @copydoc Widget::setCoord(const IntCoord & _coord) virtual void setCoord(const IntCoord & _coord); /** @copydoc Widget::setPosition(int _left, int _top) */ void setPosition(int _left, int _top) { setPosition(IntPoint(_left, _top)); } /** @copydoc Widget::setSize(int _width, int _height) */ void setSize(int _width, int _height) { setSize(IntSize(_width, _height)); } /** @copydoc Widget::setCoord(int _left, int _top, int _width, int _height) */ void setCoord(int _left, int _top, int _width, int _height) { setCoord(IntCoord(_left, _top, _width, _height)); } //------------------------------------------------------------------------------// // манипуляции айтемами //! Get number of items size_t getItemCount() { return mItemsInfo.size(); } //! Insert an item into a array at a specified position TabItemPtr insertItemAt(size_t _index, const Ogre::UTFString & _name, Any _data = Any::Null); //! Insert an item into a array TabItemPtr insertItem(TabItemPtr _to, const Ogre::UTFString & _name, Any _data = Any::Null) { return insertItemAt(getItemIndex(_to), _name, _data); } //! Add an item to the end of a array TabItemPtr addItem(const Ogre::UTFString & _name, Any _data = Any::Null) { return insertItemAt(ITEM_NONE, _name, _data); } //! Remove item at a specified position void removeItemAt(size_t _index); //! Remove item void removeItem(TabItemPtr _item) { removeItemAt(getItemIndex(_item)); } //! Remove all items void removeAllItems(); //! Get item from specified position TabItemPtr getItemAt(size_t _index); //! Get item index size_t getItemIndex(TabItemPtr _item) { for (size_t pos=0; pos<mItemsInfo.size(); pos++) { if (mItemsInfo[pos].item == _item) return pos; } MYGUI_EXCEPT("item (" << _item << ") not found, source 'Tab::getItemIndex'"); } //! Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found size_t findItemIndex(TabItemPtr _item) { for (size_t pos=0; pos<mItemsInfo.size(); pos++) { if (mItemsInfo[pos].item == _item) return pos; } return ITEM_NONE; } //! Search item, returns the position of the first occurrence in array or ITEM_NONE if item not found size_t findItemIndexWith(const Ogre::UTFString & _name) { for (size_t pos=0; pos<mItemsInfo.size(); pos++) { if (mItemsInfo[pos].name == _name) return pos; } return ITEM_NONE; } //! Search item, returns the item of the first occurrence in array or nullptr if item not found TabItemPtr findItemWith(const Ogre::UTFString & _name) { for (size_t pos=0; pos<mItemsInfo.size(); pos++) { if (mItemsInfo[pos].name == _name) return mItemsInfo[pos].item; } return nullptr; } //------------------------------------------------------------------------------// // манипуляции выделениями //! Get index of selected item (ITEM_NONE if none selected) size_t getIndexSelected() { return mIndexSelect; } //! Get selected item (nullptr if none selected) TabItemPtr getItemSelected() { return getIndexSelected() != ITEM_NONE ? getItemAt(getIndexSelected()) : nullptr; } //! Select specified _index void setIndexSelected(size_t _index); //! Select item void setItemSelected(TabItemPtr _item) { setIndexSelected(getItemIndex(_item)); } //------------------------------------------------------------------------------// // манипуляции данными //! Replace an item data at a specified position void setItemDataAt(size_t _index, Any _data); //! Replace an item data void setItemData(TabItemPtr _item, Any _data) { setItemDataAt(getItemIndex(_item), _data); } //! Clear an item data at a specified position void clearItemDataAt(size_t _index) { setItemDataAt(_index, Any::Null); } //! Clear an item data void clearItemData(TabItemPtr _item) { clearItemDataAt(getItemIndex(_item)); } //! Get item data from specified position template <typename ValueType> ValueType * getItemDataAt(size_t _index, bool _throw = true) { MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "Tab::getItemDataAt"); return mItemsInfo[_index].data.castType<ValueType>(_throw); } //! Get item data template <typename ValueType> ValueType * getItemData(TabItemPtr _item, bool _throw = true) { return getItemDataAt<ValueType>(getItemIndex(_item), _throw); } //------------------------------------------------------------------------------// // манипуляции отображением //! Replace an item name at a specified position void setItemNameAt(size_t _index, const Ogre::UTFString & _name); //! Replace an item name void setItemName(TabItemPtr _item, const Ogre::UTFString & _name) { setItemNameAt(getItemIndex(_item), _name); } //! Get item name from specified position const Ogre::UTFString & getItemNameAt(size_t _index); //! Get item name const Ogre::UTFString & getItemName(TabItemPtr _item) { return getItemNameAt(getItemIndex(_item)); } //------------------------------------------------------------------------------// // манипуляции выдимостью //! Move all elements so specified becomes visible void beginToItemAt(size_t _index); //! Move all elements so specified becomes visible void beginToItem(TabItemPtr _item) { beginToItemAt(getItemIndex(_item)); } //! Move all elements so first becomes visible void beginToItemFirst() { if (getItemCount()) beginToItemAt(0); } //! Move all elements so last becomes visible void beginToItemLast() { if (getItemCount()) beginToItemAt(getItemCount() - 1); } //! Move all elements so selected becomes visible void beginToItemSelected() { if (getIndexSelected() != ITEM_NONE) beginToItemAt(getIndexSelected()); } //------------------------------------------------------------------------------// // остальные манипуляции //! Set button width at a specified position void setButtonWidthAt(size_t _index, int _width = DEFAULT); //! Set button width void setButtonWidth(TabItemPtr _item, int _width = DEFAULT) { setButtonWidthAt(getItemIndex(_item), _width); } //! Get button width at a specified position int getButtonWidthAt(size_t _index); //! Get button width int getButtonWidth(TabItemPtr _item) { return getButtonWidthAt(getItemIndex(_item)); } //------------------------------------------------------------------------------// /** Set default button width and disable autowidth mode */ void setButtonDefaultWidth(int _width); /** Get default button width */ int getButtonDefaultWidth() { return mButtonDefaultWidth; } /** Enable or disable button auto width */ void setButtonAutoWidth(bool _auto); /** Get button auto width flag */ bool getButtonAutoWidth() { return mButtonAutoWidth; } /** Enable or disable smooth sheets showing*/ void setSmoothShow(bool _smooth) { mSmoothShow = _smooth; } /** Get smooth sheets showing flag */ bool getSmoothShow() { return mSmoothShow; } /*event:*/ /** Event : Active Tab sheet changed \n signature : void method(MyGUI::TabPtr _sender, size_t _index)\n @param _sender widget that called this event @param _index Index of selected sheet */ EventPair<EventHandle_WidgetSizeT, EventHandle_TabPtrSizeT> eventTabChangeSelect; /*obsolete:*/ #ifndef MYGUI_DONT_USE_OBSOLETE MYGUI_OBSOLETE("use : void Widget::setCoord(const IntCoord& _coord)") void setPosition(const IntCoord & _coord) { setCoord(_coord); } MYGUI_OBSOLETE("use : void Widget::setCoord(int _left, int _top, int _width, int _height)") void setPosition(int _left, int _top, int _width, int _height) { setCoord(_left, _top, _width, _height); } MYGUI_OBSOLETE("use : int Tab::getButtonWidthAt(size_t _index)") int getSheetButtonWidthIndex(size_t _index) { return getButtonWidthAt(_index); } MYGUI_OBSOLETE("use : int Tab::getButtonWidth(TabItemPtr _item)") int getSheetButtonWidth(TabItemPtr _sheet) { return getButtonWidth(_sheet); } MYGUI_OBSOLETE("use : void Tab::setButtonWidthAt(size_t _index, int _width)") void setSheetButtonWidthIndex(size_t _index, int _width = DEFAULT) { setButtonWidthAt(_index, _width); } MYGUI_OBSOLETE("use : void Tab::setButtonWidth(TabItemPtr _item, int _width)") void setSheetButtonWidth(TabItemPtr _sheet, int _width = DEFAULT) { setButtonWidth(_sheet, _width); } MYGUI_OBSOLETE("use : void Tab::beginToItemAt(size_t _index)") void showBarButton(size_t _index) { beginToItemAt(_index); } MYGUI_OBSOLETE("use : void Tab::beginToItemSelected()") void showBarSelectButton() { beginToItemSelected(); } MYGUI_OBSOLETE("use : size_t Tab::getItemCount()") size_t getSheetCount() { return getItemCount(); } MYGUI_OBSOLETE("use : const Ogre::UTFString& Tab::getItemName(TabItemPtr _item)") const Ogre::UTFString& getSheetName(TabItemPtr _sheet) { return getItemName(_sheet); } MYGUI_OBSOLETE("use : const Ogre::UTFString& Tab::getItemNameAt(size_t _index)") const Ogre::UTFString& getSheetNameIndex(size_t _index) { return getItemNameAt(_index); } MYGUI_OBSOLETE("use : TabItemPtr Tab::getItemAt(size_t _index)") TabItemPtr getSheet(size_t _index) { return getItemAt(_index); } MYGUI_OBSOLETE("use : void Tab::setItemNameAt(size_t _index, const Ogre::UTFString & _name)") void setSheetNameIndex(size_t _index, const Ogre::UTFString& _name, int _width = DEFAULT) { setItemNameAt(_index, _name); } MYGUI_OBSOLETE("use : void Tab::setItemName(TabItemPtr _item, const Ogre::UTFString & _name)") void setSheetName(TabItemPtr _sheet, const Ogre::UTFString& _name, int _width = DEFAULT) { setItemName(_sheet, _name); } MYGUI_OBSOLETE("use : TabItemPtr Tab::addItem(const Ogre::UTFString & _name, Any _data)") TabItemPtr addSheet(const Ogre::UTFString& _name, int _width = DEFAULT) { return addItem(_name, _width); } MYGUI_OBSOLETE("use : TabItemPtr Tab::insertItemAt(size_t _index, const Ogre::UTFString & _name, Any _data)") TabItemPtr insertSheet(size_t _index, const Ogre::UTFString& _name, int _width = DEFAULT) { return insertItemAt(_index, _name); } MYGUI_OBSOLETE("use : void Tab::removeItemAt(size_t _index)") void removeSheetIndex(size_t _index) { removeItemAt(_index); } MYGUI_OBSOLETE("use : void Tab::removeItem(TabItemPtr _item)") void removeSheet(TabItemPtr _sheet) { removeItem(_sheet); } MYGUI_OBSOLETE("use : void Tab::setIndexSelected(size_t _index)") void selectSheetIndex(size_t _index, bool _smooth = true) { setIndexSelected(_index); } MYGUI_OBSOLETE("use : void Tab::setItemSelected(TabItemPtr _item)") void selectSheet(TabItemPtr _sheet, bool _smooth = true) { setItemSelected(_sheet); } MYGUI_OBSOLETE("use : size_t Tab::getIndexSelected()") size_t getSelectSheetIndex() { return getIndexSelected(); } MYGUI_OBSOLETE("use : size_t Widget::getIndexSelected()") size_t getItemIndexSelected() { return getIndexSelected(); } MYGUI_OBSOLETE("use : void Widget::setIndexSelected(size_t _index)") void setItemSelectedAt(size_t _index) { setIndexSelected(_index); } #endif // MYGUI_DONT_USE_OBSOLETE protected: Tab(WidgetStyle _style, const IntCoord& _coord, Align _align, const WidgetSkinInfoPtr _info, WidgetPtr _parent, ICroppedRectangle * _croppedParent, IWidgetCreator * _creator, const std::string & _name); virtual ~Tab(); void baseChangeWidgetSkin(WidgetSkinInfoPtr _info); // переопределяем для особого обслуживания страниц virtual WidgetPtr baseCreateWidget(WidgetStyle _style, const std::string & _type, const std::string & _skin, const IntCoord& _coord, Align _align, const std::string & _layer, const std::string & _name); void updateBar(); void notifyPressedButtonEvent(MyGUI::WidgetPtr _sender); void notifyPressedBarButtonEvent(MyGUI::WidgetPtr _sender); int _getTextWidth(const Ogre::UTFString& _text); void _showItem(TabItemPtr _sheet, bool _show, bool _smooth); void _createItemButton(); void _insertItem(size_t _index, const Ogre::UTFString & _name, TabItemPtr _sheet, Any _data); // вкладка при удалении уведомляет таб void _notifyDeleteItem(TabItemPtr _item); private: void initialiseWidgetSkin(WidgetSkinInfoPtr _info); void shutdownWidgetSkin(); void actionWidgetHide(WidgetPtr _widget); private: int mOffsetTab; // смещение бара при показе кнопок bool mButtonShow; int mWidthBar; // ширина в которую помещаються все кнопки VectorWidgetPtr mItemButton; // список кнопок, не должно равно списку страниц std::string mButtonSkinName, mEmptySkinName; WidgetPtr mWidgetBar; ButtonPtr mButtonLeft, mButtonRight, mButtonList; WidgetPtr mButtonDecor; VectorWidgetPtr mWidgetsPatch; // список виджетов которые нужно показать при показе кнопки WidgetPtr mEmptyBarWidget; WidgetPtr mItemTemplate; // информация о вкладках VectorTabItemInfo mItemsInfo; size_t mStartIndex; size_t mIndexSelect; int mButtonDefaultWidth; bool mSmoothShow; bool mButtonAutoWidth; // флаг, чтобы отсеч уведомления от вкладок, при общем шутдауне виджета bool mShutdown; }; } // namespace MyGUI #endif // __MYGUI_TAB_H__
[ "pablosn@06488772-1f9a-11de-8b5c-13accb87f508" ]
[ [ [ 1, 379 ] ] ]
5a95f4852fc6060bf8014f8d4c0f985d9621eca9
4c1d300ec1f41e9408520a2e8b56cc6a9bc43c19
/cob_driver/cob_platform/ros/src/cob_platform.cpp
cc80c8338c828ed7d9180faec38545078aaf660e
[]
no_license
phymur/care-o-bot
3be1cb0c5f5639f994a34fdf71dc7f51953ffca8
fa4979f99ac06cdbcf0bd67e9199a40f75a0bc48
refs/heads/master
2021-01-18T18:07:49.879125
2010-04-13T16:11:33
2010-04-13T16:11:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
11,463
cpp
/**************************************************************** * * Copyright (c) 2010 * * Fraunhofer Institute for Manufacturing Engineering * and Automation (IPA) * * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * Project name: care-o-bot * ROS stack name: cob_driver * ROS package name: cob3_platform * * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * Author: Florian Weisshardt, email:[email protected] * Supervised by: Christian Connette, email:[email protected] * * Date of creation: Jan 2010 * ToDo: * * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Fraunhofer Institute for Manufacturing * Engineering and Automation (IPA) nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License LGPL 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 Lesser General Public License LGPL for more details. * * You should have received a copy of the GNU Lesser General Public * License LGPL along with this program. * If not, see <http://www.gnu.org/licenses/>. * ****************************************************************/ //################## //#### includes #### // standard includes //-- // ROS includes #include <ros/ros.h> // ROS message includes #include <geometry_msgs/Twist.h> #include <tf/transform_broadcaster.h> #include <nav_msgs/Odometry.h> // ROS service includes #include <cob_srvs/Trigger.h> // external includes #include <cob_platform/PlatformHardware.h> //#################### //#### node class #### class NodeClass { // public: // create a handle for this node, initialize node ros::NodeHandle n; // topics to publish ros::Publisher topicPub_Pose2D; ros::Publisher topicPub_Odometry; tf::TransformBroadcaster odom_broadcaster; // topics to subscribe, callback is called for new messages arriving ros::Subscriber topicSub_CmdVel; // service servers ros::ServiceServer srvServer_Init; ros::ServiceServer srvServer_Home; ros::ServiceServer srvServer_Stop; ros::ServiceServer srvServer_Shutdown; // service clients //-- // global variables PlatformHardware* pltf; bool isInitialized; double cmdVelX, cmdVelY, cmdVelTh; double x, y, th; double dxMM, dyMM, dth, dvth; double vxMMS, vyMMS, vth, vvth; ros::Time current_time, last_time; // Constructor NodeClass() { // initialize global variables isInitialized = false; last_time = ros::Time::now(); current_time = ros::Time::now(); cmdVelX = cmdVelY = cmdVelTh = 0; x = y = th = 0; dxMM = dyMM = dth = dvth = 0; vxMMS = vyMMS = vth = vvth = 0; // implementation of topics to publish topicPub_Odometry = n.advertise<nav_msgs::Odometry>("odometry", 50); // implementation of topics to subscribe topicSub_CmdVel = n.subscribe("cmd_vel", 1, &NodeClass::topicCallback_CmdVel, this); // implementation of service servers srvServer_Init = n.advertiseService("Init", &NodeClass::srvCallback_Init, this); srvServer_Stop = n.advertiseService("Stop", &NodeClass::srvCallback_Stop, this); srvServer_Shutdown = n.advertiseService("Shutdown", &NodeClass::srvCallback_Shutdown, this); } // Destructor ~NodeClass() { pltf->setVelPltf(0, 0, 0, 0); pltf->shutdownPltf(); isInitialized = false; delete pltf; } // topic callback functions // function will be called when a new message arrives on a topic void topicCallback_CmdVel(const geometry_msgs::Twist::ConstPtr& msg) { ROS_DEBUG("received new velocity command [cmdVelX=%3.5f,cmdVelY=%3.5f,cmdVelTh=%3.5f]", msg->linear.x, msg->linear.y, msg->angular.z); cmdVelX = msg->linear.x; cmdVelY = msg->linear.y; cmdVelTh = msg->angular.z; } // service callback functions // function will be called when a service is querried bool srvCallback_Init(cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res ) { if(isInitialized == false) { ROS_INFO("...initializing platform..."); pltf = new PlatformHardware(); pltf->initPltf(); isInitialized = true; res.success = 0; // 0 = true, else = false } else { ROS_ERROR("...platform already initialized..."); res.success = 1; res.errorMessage.data = "platform already initialized"; } return true; } bool srvCallback_Stop(cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res ) { if(isInitialized == true) { ROS_INFO("...stopping platform..."); cmdVelX = 0; cmdVelY = 0; cmdVelTh = 0; res.success = 0; // 0 = true, else = false } else { ROS_ERROR("...platform not initialized..."); res.success = 1; res.errorMessage.data = "platform not initialized"; } return true; } bool srvCallback_Shutdown(cob_srvs::Trigger::Request &req, cob_srvs::Trigger::Response &res ) { if(isInitialized == true) { ROS_INFO("...shutting down platform..."); pltf->shutdownPltf(); isInitialized = false; res.success = 0; // 0 = true, else = false } else { ROS_ERROR("...platform not initialized..."); res.success = 1; res.errorMessage.data = "platform not initialized"; } return true; } // other function declarations void updateCmdVel() { // send vel if platform is initialized if(isInitialized == true) { ROS_DEBUG("update cmdVel"); pltf->setVelPltf(cmdVelX*1000, cmdVelY*1000, cmdVelTh, 0); // convert from m/s to mm/s } } void updateOdometry() { if(isInitialized == true) { double u_x,u_y,dt = 0.0; current_time = ros::Time::now(); dt = current_time.toSec() - last_time.toSec(); last_time = current_time; // get odometry from platform pltf->getDeltaPosePltf(dxMM, dyMM, dth, dvth, vxMMS, vyMMS, vth, vvth); // calculation from cpc /* if (fabs(vth) < 0.05) { u_x = vxMMS*dt/1000.0; u_y = vyMMS*dt/1000.0; } else { u_x = vxMMS*sin(vth*dt)/vth/1000.0 + vyMMS/vth/1000.0*(cos(vth*dt)-1.0); u_y = -vxMMS/vth/1000.0*(cos(vth*dt)-1.0) + vyMMS*sin(vth*dt)/vth/1000.0; if (fabs(u_x)>1 || fabs(u_y)>1) { ROS_INFO("u_x = %f, u_y=%f, vth=%f, vx=%f, vy=%f",u_x,u_y,vth,vxMMS,vyMMS); } } // add delta values to old values x += u_x*cos(th)-u_y*sin(th); y += u_x*sin(th)+u_y*cos(th); th += vth*dt; */ // calculation from ROS odom publisher tutorial http://www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom //compute odometry in a typical way given the velocities of the robot //double dt = (current_time - last_time).toSec(); double delta_x = (vxMMS/1000.0 * cos(th) - vyMMS/1000.0 * sin(th)) * dt; double delta_y = (vxMMS/1000.0 * sin(th) + vyMMS/1000.0 * cos(th)) * dt; double delta_th = vth * dt; x += delta_x; y += delta_y; th += delta_th; //since all odometry is 6DOF we'll need a quaternion created from yaw geometry_msgs::Quaternion odom_quat = tf::createQuaternionMsgFromYaw(th); //first, we'll publish the transform over tf geometry_msgs::TransformStamped odom_trans; odom_trans.header.stamp = current_time; odom_trans.header.frame_id = "/odom"; odom_trans.child_frame_id = "/base_footprint"; odom_trans.transform.translation.x = x; odom_trans.transform.translation.y = y; odom_trans.transform.translation.z = 0.0; odom_trans.transform.rotation = odom_quat; //send the transform odom_broadcaster.sendTransform(odom_trans); //next, we'll publish the odometry message over ROS nav_msgs::Odometry odom; odom.header.stamp = current_time; odom.header.frame_id = "/odom"; odom.child_frame_id = "/base_footprint"; //set the position odom.pose.pose.position.x = x; odom.pose.pose.position.y = y; odom.pose.pose.position.z = 0.0; odom.pose.pose.orientation = odom_quat; //set the velocity odom.twist.twist.linear.x = vxMMS / 1000.0; // convert from mm/s to m/s odom.twist.twist.linear.y = vyMMS / 1000.0; // convert from mm/s to m/s odom.twist.twist.angular.z = vth; //publish the message //topicPub_Odometry.publish(odom); last_time = current_time; } } }; //####################### //#### main programm #### int main(int argc, char** argv) { // initialize ROS, spezify name of node ros::init(argc, argv, "cob3_platform"); NodeClass nodeClass; // main loop ros::Rate loop_rate(25); // Hz while(nodeClass.n.ok()) { nodeClass.current_time = ros::Time::now(); // publish Odometry nodeClass.updateOdometry(); // update velocity of platform nodeClass.updateCmdVel(); ros::spinOnce(); loop_rate.sleep(); } // ros::spin(); return 0; }
[ "[email protected]", "[email protected]", "[email protected]", "cob@IPAHEPC07.(none)", "b-it-bots@cob3-1-pc2.(none)", "cob@cob3-2-PC3.(none)", "cob@cob3-2-PC4.(none)" ]
[ [ [ 1, 52 ], [ 68, 68 ], [ 124, 124 ], [ 155, 156 ], [ 175, 176 ], [ 195, 196 ], [ 281, 281 ], [ 297, 297 ], [ 311, 311 ], [ 323, 323 ], [ 328, 328 ] ], [ [ 53, 63 ], [ 66, 67 ], [ 69, 70 ], [ 72, 83 ], [ 87, 93 ], [ 95, 99 ], [ 107, 109 ], [ 123, 123 ], [ 125, 126 ], [ 130, 134 ], [ 139, 144 ], [ 146, 146 ], [ 151, 154 ], [ 157, 157 ], [ 172, 174 ], [ 177, 177 ], [ 211, 214 ], [ 226, 226 ], [ 315, 322 ], [ 324, 327 ], [ 329, 330 ], [ 339, 346 ] ], [ [ 64, 65 ], [ 84, 84 ], [ 86, 86 ], [ 94, 94 ], [ 100, 103 ], [ 110, 112 ], [ 115, 116 ], [ 119, 120 ], [ 122, 122 ], [ 135, 138 ], [ 147, 150 ], [ 158, 171 ], [ 178, 194 ], [ 197, 210 ], [ 215, 219 ], [ 222, 225 ], [ 227, 228 ], [ 234, 234 ], [ 237, 237 ], [ 254, 254 ], [ 292, 295 ], [ 298, 302 ], [ 304, 305 ], [ 308, 310 ], [ 312, 312 ], [ 314, 314 ], [ 331, 338 ] ], [ [ 71, 71 ] ], [ [ 85, 85 ], [ 106, 106 ], [ 113, 114 ], [ 229, 233 ], [ 238, 253 ], [ 255, 280 ], [ 282, 291 ], [ 296, 296 ], [ 303, 303 ], [ 313, 313 ] ], [ [ 104, 105 ], [ 117, 118 ], [ 145, 145 ], [ 220, 221 ], [ 235, 236 ], [ 306, 307 ] ], [ [ 121, 121 ], [ 127, 129 ] ] ]
7b60979dae326829091e870a9d311226d4b6718d
6c8c4728e608a4badd88de181910a294be56953a
/RpcUtilities/XmlRpcConnection.cpp
fad4902024fadf7c2bf48bab2549eebd575bf989
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
caocao/naali
29c544e121703221fe9c90b5c20b3480442875ef
67c5aa85fa357f7aae9869215f840af4b0e58897
refs/heads/master
2021-01-21T00:25:27.447991
2010-03-22T15:04:19
2010-03-22T15:04:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,708
cpp
// For conditions of distribution and use, see copyright notice in license.txt #include "StableHeaders.h" #include "XmlRpcException.h" #include "XmlRpcConnection.h" #include "Poco/URI.h" #include "boost/lexical_cast.hpp" #include "HttpRequest.h" XmlRpcConnection::XmlRpcConnection(const std::string& url) { SetServer(url); } XmlRpcConnection::XmlRpcConnection(const std::string& address, const std::string& port) { SetServerAddress(address, port); } void XmlRpcConnection::SetServerAddress(const std::string& address, const std::string& port) { std::string address_copy = address; if (address_copy.find("://") == std::string::npos) address_copy = "http://" + address_copy; Poco::URI uri = Poco::URI(address_copy); uri.setPort( boost::lexical_cast<int>(port) ); strUrl_ = uri.toString(); } XMLRPC_REQUEST XmlRpcConnection::Send(const char* data) { HttpUtilities::HttpRequest request; request.SetUrl(strUrl_); request.SetRequestData("text/xml", data); request.SetMethod(HttpUtilities::HttpRequest::Post); request.Perform(); const std::vector<u8> response_data = request.GetResponseData(); if (!request.GetSuccess()) throw XmlRpcException(std::string("XmlRpcEpi exception in XmlRpcConnection::Send() " + request.GetReason())); if (response_data.size() == 0) throw XmlRpcException(std::string("XmlRpcEpi exception in XmlRpcConnection::Send() response data size was zero: ")); // Convert the XML string to a XMLRPC reply structure. return XMLRPC_REQUEST_FromXML((const char*)&response_data[0], (int)(response_data.size()), 0); }
[ "tuoki@5b2332b8-efa3-11de-8684-7d64432d61a3", "cadaver@5b2332b8-efa3-11de-8684-7d64432d61a3", "jonnenau@5b2332b8-efa3-11de-8684-7d64432d61a3", "jaakkoallander@5b2332b8-efa3-11de-8684-7d64432d61a3" ]
[ [ [ 1, 2 ], [ 8, 8 ], [ 17, 17 ], [ 31, 32 ], [ 34, 34 ], [ 40, 40 ], [ 45, 46 ], [ 49, 49 ], [ 51, 51 ] ], [ [ 3, 3 ], [ 9, 9 ], [ 11, 15 ], [ 18, 18 ], [ 23, 30 ], [ 35, 39 ], [ 41, 43 ], [ 48, 48 ], [ 50, 50 ] ], [ [ 4, 5 ], [ 16, 16 ], [ 19, 22 ], [ 33, 33 ], [ 44, 44 ], [ 47, 47 ] ], [ [ 6, 7 ], [ 10, 10 ] ] ]
6f5ea4542df09956b9ef7c24bba6e4aa0963c863
a0bc9908be9d42d58af7a1a8f8398c2f7dcfa561
/SlonEngine/slon/Database/Proprietary/SXMLArchive.h
f819ec554ce2610a7efe3ef735abe44a3ed9c665
[]
no_license
BackupTheBerlios/slon
e0ca1137a84e8415798b5323bc7fd8f71fe1a9c6
dc10b00c8499b5b3966492e3d2260fa658fee2f3
refs/heads/master
2016-08-05T09:45:23.467442
2011-10-28T16:19:31
2011-10-28T16:19:31
39,895,039
0
0
null
null
null
null
UTF-8
C++
false
false
5,553
h
#ifndef __SLON_ENGINE_DATABASE_PROPRIETARY_SXML_ARCHIVE_H__ #define __SLON_ENGINE_DATABASE_PROPRIETARY_SXML_ARCHIVE_H__ #include "../../FileSystem/Forward.h" #include "../Archive.h" #include <xml++/document.h> #include <xml++/element.h> namespace slon { namespace database { class SXMLIArchive : public IArchive { private: typedef std::map<int, xmlpp::element_iterator> reference_element_map; typedef std::map<int, Serializable*> reference_serializable_map; public: SXMLIArchive(); /** Read archive content from file */ void readFromFile(filesystem::File& file); // Override Archive unsigned getVersion() const { return version; } // Override IArchive Serializable* readReference(int refId); Serializable* readSerializable(); bool openChunk(const char* name, chunk_info& info); void closeChunk(); void read(void* data); void readString(char* str) { memcpy(str, openedElement->get_text(), chunkInfo.size); } void readString(wchar_t* str) { /*memcpy(str, currentElement.get_text()); FIXME*/ } void read(boolean* values) { readImpl(values); } void read(int8* values) { readImpl(values); } void read(uint8* values) { readImpl(values); } void read(int16* values) { readImpl(values); } void read(uint16* values) { readImpl(values); } void read(int32* values) { readImpl(values); } void read(uint32* values) { readImpl(values); } void read(int64* values) { readImpl(values); } void read(uint64* values) { readImpl(values); } void read(float32* values) { readImpl(values); } void read(float64* values) { readImpl(values); } template<typename T> void readImpl(T* values) { if (!openedElement) { throw serialization_error(log::logger_ptr(), "Trying to read raw data from unopened chunk."); } else if (!chunkInfo.isLeaf) { throw serialization_error(log::logger_ptr(), "Trying to read raw data from not leaf chunk."); } std::istringstream ss( openedElement->get_text() ); for (size_t i = 0; i<chunkInfo.size; ++i) { ss >> values[i]; } } private: const chunk_info& readChunkInfo(); Serializable* readSerializable(xmlpp::element& el); private: unsigned version; reference_serializable_map referenceSerializables; reference_element_map referenceElements; xmlpp::document document; xmlpp::element_iterator openedElement; xmlpp::element_iterator nextElement; chunk_info chunkInfo; }; class SXMLOArchive : public OArchive { private: typedef std::map<const void*, int> reference_map; public: SXMLOArchive(unsigned version); // Override Archive unsigned getVersion() const { return version; } // Override OArchive int registerReference(const void* ptr); int getReferenceId(const void* ptr) const; void openChunk(const char* name, const void* ptr = 0); void closeChunk(); void writeReferenceChunk(int refId); void writeSerializable(const Serializable* serializable, bool writeReferenceIfPossible = true, bool rememberReference = true); void writeBinaryChunk(const char* name, const void* data, size_t size); void writeStringChunk(const char* name, const char* str, size_t size); void writeStringChunk(const char* name, const wchar_t* str, size_t size); void writeChunk(const char* name, const boolean* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const int8* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const uint8* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const int16* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const uint16* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const int32* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const uint32* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const int64* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const uint64* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const float32* values, size_t count = 1) { writeChunkImpl(name, values, count); } void writeChunk(const char* name, const float64* values, size_t count = 1) { writeChunkImpl(name, values, count); } template<typename T> void writeChunkImpl(const char* name, const T* values, size_t count) { xmlpp::element child(name); std::ostringstream ss; for (size_t i = 0; i<count; ++i) { ss << values[i]; if (i < count - 1) { ss << ' '; } } if (count > 1) { child.set_attribute_value("size", count); } child.set_text( ss.str().c_str() ); currentElement->add_child(child); } void writeToFile(filesystem::File& file) const; private: unsigned version; reference_map references; xmlpp::document document; xmlpp::element_iterator currentElement; }; } // namespace database } // namespace slon #endif // __SLON_ENGINE_DATABASE_PROPRIETARY_SXML_ARCHIVE_H__
[ "devnull@localhost" ]
[ [ [ 1, 152 ] ] ]
b0f3f644c6a638a5114d7f2314c721914136e71d
ef23e388061a637f82b815d32f7af8cb60c5bb1f
/frontend/system/sdl/SDLPlatform.h
91e5ef47d2cf03ba754437b89ec34ae5dfe144b2
[]
no_license
marcellodash/psmame
76fd877a210d50d34f23e50d338e65a17deff066
09f52313bd3b06311b910ed67a0e7c70c2dd2535
refs/heads/master
2021-05-29T23:57:23.333706
2011-06-23T20:11:22
2011-06-23T20:11:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
575
h
#pragma once #include <unistd.h> #include <assert.h> #include <dirent.h> #include <sys/stat.h> #include <SDL/SDL.h> #include <SDL/SDL_opengl.h> #include <SDL/SDL_net.h> #include <Cg/cg.h> #include <Cg/cgGL.h> #include "SDLInputConfig.h" #ifdef __WIN32__ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <shlobj.h> #endif class PlatformHelpers { public: static uint32_t GetTicks () { return SDL_GetTicks(); } static void Sleep (uint32_t aMilliseconds) { SDL_Delay(aMilliseconds); } };
[ "Mike@localhost" ]
[ [ [ 1, 35 ] ] ]
9056c397b3a9a754b660d014d66a5d1a0cdc7389
5ff30d64df43c7438bbbcfda528b09bb8fec9e6b
/kgraphics/math/Sphere.h
b7833b84a3a90018a95cd64876f5a6fa2de4815e
[]
no_license
lvtx/gamekernel
c80cdb4655f6d4930a7d035a5448b469ac9ae924
a84d9c268590a294a298a4c825d2dfe35e6eca21
refs/heads/master
2016-09-06T18:11:42.702216
2011-09-27T07:22:08
2011-09-27T07:22:08
38,255,025
3
1
null
null
null
null
UTF-8
C++
false
false
2,417
h
#pragma once #include <kgraphics/math/Writer.h> #include <kgraphics/math/Vector3.h> namespace gfx { class Quat; class Line3; class Matrix33; class Ray3; class LineSegment3; class Plane; class BoundingSphere { public: // constructor/destructor inline BoundingSphere() : mCenter( 0.0f, 0.0f, 0.0f ), mRadius( 1.0f ) {} inline BoundingSphere( const Vector3& center, float radius ) : mCenter( center ), mRadius( radius ) {} inline ~BoundingSphere() {} // copy operations BoundingSphere( const BoundingSphere& other ); BoundingSphere& operator=( const BoundingSphere& other ); // text output (for debugging) friend Writer& operator<<( Writer& out, const BoundingSphere& source ); // accessors inline const Vector3& GetCenter() const { return mCenter; } inline float GetRadius() const { return mRadius; } // comparison bool operator==( const BoundingSphere& other ) const; bool operator!=( const BoundingSphere& other ) const; // manipulators inline void SetCenter( const Vector3& center ) { mCenter = center; } inline void SetRadius( float radius ) { mRadius = radius; } void Set( const Vector3* points, unsigned int numPoints ); void AddPoint( const Vector3& point ); // transform! BoundingSphere Transform( float scale, const Quat& rotation, const Vector3& translation ) const; BoundingSphere Transform( float scale, const Matrix33& rotation, const Vector3& translation ) const; // intersection bool Intersect( const BoundingSphere& other ) const; bool Intersect( const Line3& line ) const; bool Intersect( const Ray3& ray ) const; bool Intersect( const LineSegment3& segment ) const; // signed distance to plane float Classify( const Plane& plane ) const; // merge friend void Merge( BoundingSphere& result, const BoundingSphere& s0, const BoundingSphere& s1 ); // collision parameters bool ComputeCollision( const BoundingSphere& other, Vector3& collisionNormal, Vector3& collisionPoint, float& penetration ) const; protected: Vector3 mCenter; float mRadius; private: }; } // namespace gfx
[ "keedongpark@keedongpark" ]
[ [ [ 1, 80 ] ] ]
f1ab74b834c7de761b27fb7028434897c5f5b12d
e7c45d18fa1e4285e5227e5984e07c47f8867d1d
/Application/SysCAD/SysCADView.h
7ca6cbd6192f10646c0f5316b39480775e988c5e
[]
no_license
abcweizhuo/Test3
0f3379e528a543c0d43aad09489b2444a2e0f86d
128a4edcf9a93d36a45e5585b70dee75e4502db4
refs/heads/master
2021-01-17T01:59:39.357645
2008-08-20T00:00:29
2008-08-20T00:00:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,891
h
// SysCADView.h : interface of the CSysCADView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_SYSCADVIEW_H__1F2FE57A_FD30_4733_AA4F_3F52A21D23CA__INCLUDED_) #define AFX_SYSCADVIEW_H__1F2FE57A_FD30_4733_AA4F_3F52A21D23CA__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CSysCADView : public CView { protected: // create from serialization only CSysCADView(); DECLARE_DYNCREATE(CSysCADView) // Attributes public: CSysCADDoc* GetDocument(); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CSysCADView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); //}}AFX_VIRTUAL // Implementation public: virtual ~CSysCADView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: //{{AFX_MSG(CSysCADView) // NOTE - the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in SysCADView.cpp inline CSysCADDoc* CSysCADView::GetDocument() { return (CSysCADDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SYSCADVIEW_H__1F2FE57A_FD30_4733_AA4F_3F52A21D23CA__INCLUDED_)
[ [ [ 1, 67 ] ] ]
0871286fcb18c86d52412c4b964f2a08e1ff51d3
974a20e0f85d6ac74c6d7e16be463565c637d135
/trunk/packages/dContainers/dRtti.h
520e36c6c0164e0d5c44ad133402cd5b4560bcfd
[]
no_license
Naddiseo/Newton-Dynamics-fork
cb0b8429943b9faca9a83126280aa4f2e6944f7f
91ac59c9687258c3e653f592c32a57b61dc62fb6
refs/heads/master
2021-01-15T13:45:04.651163
2011-11-12T04:02:33
2011-11-12T04:02:33
2,759,246
0
0
null
null
null
null
UTF-8
C++
false
false
2,231
h
/* Copyright (c) <2009> <Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely */ #ifndef __DRTTI_H__ #define __DRTTI_H__ #include "dCRC.h" class dRtti { public: dRtti(const char* typeName); dCRCTYPE GetTypeId() const; bool IsTypeID(dCRCTYPE id) const; private: dCRCTYPE m_typeId; }; inline dRtti::dRtti(const char* typeName) { m_typeId = dCRC64 (typeName); } inline dCRCTYPE dRtti::GetTypeId() const { return m_typeId; } inline bool dRtti::IsTypeID (dCRCTYPE id) const { return m_typeId == id; } // add these macros only to the root base class that you want to have rtti #define dRttiRootClassSupportDeclare(className) \ public: \ virtual dCRCTYPE GetTypeId () const \ { \ return m_rtti.GetTypeId (); \ } \ virtual bool IsType (dCRCTYPE typeId) const \ { \ return m_rtti.IsTypeID (typeId); \ } \ static dCRCTYPE GetRttiType() \ { \ return m_rtti.GetTypeId(); \ } \ private: \ static dRtti m_rtti; #define dRttiRootClassSupportImplement(className) \ dRtti className::m_rtti (#className); // add these macros to every derived class #define dAddRtti(baseClass) \ private: \ static dRtti m_rtti; \ public: \ virtual bool IsType (dCRCTYPE typeId) const \ { \ if (m_rtti.IsTypeID (typeId)) { \ return true; \ } \ return baseClass::IsType (typeId); \ } \ \ virtual dCRCTYPE GetTypeId () const \ { \ return m_rtti.GetTypeId (); \ } \ \ static dCRCTYPE GetRttiType() \ { \ return m_rtti.GetTypeId(); \ } #define dInitRtti(className) \ dRtti className::m_rtti (#className) #endif
[ "[email protected]@b7a2f1d6-d59d-a8fe-1e9e-8d4888b32692" ]
[ [ [ 1, 94 ] ] ]
34e975cdb8c5acd75ef18afd0cf8bf4bd256e67c
ea02e41514b3b979c78af4ea7b5c55e99834036b
/GetNetSdkLocation/stdafx.cpp
b8f7f601ef108dffd6921a7273109e89d5a1837f
[]
no_license
isabella232/wintools
446228b88eb4296633b0c2be05c18fe291d6b5d2
203f7b550c0a1660306d4cc0606b1dc6289e8d9a
refs/heads/master
2022-02-23T13:02:25.859592
2010-04-07T16:45:52
2010-04-07T16:45:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
304
cpp
// stdafx.cpp : source file that includes just the standard includes // GetNetSdkLocation.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
[ [ [ 1, 8 ] ] ]
1b2d0bf30351c77b4f81281b9eb5b066ec687a16
5dc78c30093221b4d2ce0e522d96b0f676f0c59a
/src/common/Vector.cpp
2d1a43aaef0f575df7e8c4ed37c6a48bc8570b93
[ "Zlib" ]
permissive
JackDanger/love
f03219b6cca452530bf590ca22825170c2b2eae1
596c98c88bde046f01d6898fda8b46013804aad6
refs/heads/master
2021-01-13T02:32:12.708770
2009-07-22T17:21:13
2009-07-22T17:21:13
142,595
1
0
null
null
null
null
UTF-8
C++
false
false
1,002
cpp
/** * Copyright (c) 2006-2009 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. **/ #include "Vector.h" namespace love { // Implementation in header. }
[ "prerude@3494dbca-881a-0410-bd34-8ecbaf855390" ]
[ [ [ 1, 26 ] ] ]
ce9c13093ee0ac9ac0e088d829bb45aaeb16d1ba
ef8e875dbd9e81d84edb53b502b495e25163725c
/litewiz/src/variants/variant_collection.h
2760e3b03b8f75a2f315a288a0ad8d478c0c1176
[]
no_license
panone/litewiz
22b9d549097727754c9a1e6286c50c5ad8e94f2d
e80ed9f9d845b08c55b687117acb1ed9b6e9a444
refs/heads/master
2021-01-10T19:54:31.146153
2010-10-01T13:29:38
2010-10-01T13:29:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,264
h
/******************************************************************************* *******************************************************************************/ #ifndef VARIANT_COLLECTION_H #define VARIANT_COLLECTION_H /******************************************************************************/ #include "file_cluster_collection.h" /******************************************************************************/ class FileCluster; class Variant; class VariantInfo; /******************************************************************************* *******************************************************************************/ class VariantCollection : public FileClusterCollection { public: Variant * addVariant ( VariantInfo const & variantInfo ); Variant * getVariant ( int const index ) const; void toggleReference ( int const index ); public: Variant * getVariant ( FileCluster * const cluster ) const; }; /******************************************************************************/ #endif /* VARIANT_COLLECTION_H */
[ [ [ 1, 50 ] ] ]
d1343078fd8e4c1e84d520231ef9d89fd899852a
ad85dfd8765f528fd5815d94acde96e28e210a43
/trunk/include/OpenLayer/Settings.hpp
484b9bb2391bd1eed82b40560a9c30bdf4c2efd3
[]
no_license
BackupTheBerlios/openlayer-svn
c53dcdd84b74fd4687c919642e6ccef3dd4bba79
3086e76972e6674c9b40282bb7028acb031d0593
refs/heads/master
2021-01-01T19:25:13.382956
2007-07-18T17:09:55
2007-07-18T17:09:55
40,823,139
1
0
null
null
null
null
UTF-8
C++
false
false
3,057
hpp
#ifndef OL_SETTINGS_HPP #define OL_SETTINGS_HPP #include "Includes.hpp" #include "Declspec.hpp" namespace ol { // Settings - General settings of OpenLayer // class OL_LIB_DECLSPEC Settings { public: // Turns the anti-aliasing on or off // // Anti-aliasing produces smoother graphics but slows down the rendering // static void SetAntialiasing( bool turnedOn ); // Sets the accuracy of the circle drawing functions // // The value should be between 0.0 and 1.0 but it should never be zero // // The more accuracy, the better the circles will generally look // // but rendering them will be slower // // This setting can be overridden by passing a different value // to the circle drawing function // static void SetCircleAccuracy( float accuracy ); // Returns the accuracy of the circles // inline static float GetCircleAccuracy() { return circleAccuracy; } // If you use OpenGL directly you might wish to choose // // if the texture mapping is turned on or not // // This doesn't affect OpenLayer's functions // static void SetTextureMapping( bool turnedOn ); // Returns true if texture mapping is used // static bool TextureMappingUsed() { return useTextures; } // Sets the orthographic projection mode (the "2D drawing mode") // // Ortographic projection is on by default // static void SetOrthographicProjection( int screenWidth = SCREEN_W, int screenHeight = SCREEN_H ); // Restores old projection that got changed when you called SetOrtographicProjection() // static void RestoreOldProjection(); // Turn the memory bitmap storage on or off // // Off by default // static void StoreMemoryBitmaps( bool turnedOn ); // Returns true if the Bitmaps are stored in the memory // static bool MemoryBitmapsStored(); // Sets the accuracy of the generated collision polygons // // Accuracy should always be positive and the highest value is 1.0 // // The default value is 0.3 // static void SetCollisionPolyAccuracy( float accuracy ); // Returns the accuracy of the generated collision polygons // static float GetCollisionPolyAccuracy(); // Sets the maxium alpha value which is considered transparent // // by the collision polygon generation // static void SetCollisionPolyAlphaLimit( float limit ) { collisionPolyAlphaLimit = int( limit * 255.0 ); } // Returns the maxium alpha value which is considered transparent // // by the collision polygon generation // static float GetCollisionPolyAlphaLimit() { return float( collisionPolyAlphaLimit )/255.0; } friend class GfxRend; friend class Bitmap; private: static float circleAccuracy; static float collisionPolyAccuracy; static int collisionPolyAlphaLimit; static bool useAntiAlias; static bool useTextures; static bool storeMemoryBitmaps; }; } #endif // OL_SETTINGS_HPP
[ "bradeeoh@9f4572f3-6e0d-0410-ba3b-903ab02ac46b", "juvinious@9f4572f3-6e0d-0410-ba3b-903ab02ac46b", "fladimir2002@9f4572f3-6e0d-0410-ba3b-903ab02ac46b" ]
[ [ [ 1, 4 ], [ 6, 11 ], [ 13, 60 ], [ 73, 93 ] ], [ [ 5, 5 ], [ 12, 12 ] ], [ [ 61, 72 ] ] ]
2bcc1734232d22e8040f609688a61a22771c8081
d9d498167237f41a9cf47f4ec2d444a49da4b23b
/zhangxin/example/NECTestPattern.cpp
5e8716d601668ca6bbe3b28044c258d1f46585d2
[]
no_license
wangluyi1982/piggypic
d81cf15a6b58bbb5a9cde3d124333348419c9663
d173e3acc6c3e57267733fb7b80b1b07cb21fa01
refs/heads/master
2021-01-10T20:13:42.615324
2010-03-17T13:44:49
2010-03-17T13:44:49
32,907,995
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
5,220
cpp
// NECTestPattern.cpp : アプリケーション用クラスの定義を行います。 // #include "stdafx.h" #include "NECTestPattern.h" #include "NECTestPatternDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CNECTestPatternApp BEGIN_MESSAGE_MAP(CNECTestPatternApp, CWinApp) //{{AFX_MSG_MAP(CNECTestPatternApp) // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します。 // この位置に生成されるコードを編集しないでください。 //}}AFX_MSG ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CNECTestPatternApp クラスの構築 CNECTestPatternApp::CNECTestPatternApp() { // TODO: この位置に構築用のコードを追加してください。 // ここに InitInstance 中の重要な初期化処理をすべて記述してください。 } ///////////////////////////////////////////////////////////////////////////// // 唯一の CNECTestPatternApp オブジェクト CNECTestPatternApp theApp; ///////////////////////////////////////////////////////////////////////////// // CNECTestPatternApp クラスの初期化 BOOL CNECTestPatternApp::InitInstance() { AfxEnableControlContainer(); GdiplusStartupInput gdiplusStartupInput; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); HWND hWnd; CString window_name; //アプリケーション唯一 window_name.LoadString(AFX_IDS_APP_TITLE); hWnd=FindWindow(NULL,window_name); if (hWnd) { ShowWindow(hWnd,SW_RESTORE); BringWindowToTop(hWnd); ::SetForegroundWindow(hWnd); return FALSE; } // 標準的な初期化処理 // もしこれらの機能を使用せず、実行ファイルのサイズを小さくしたけ // れば以下の特定の初期化ルーチンの中から不必要なものを削除して // ください。 #ifdef _AFXDLL Enable3dControls(); // 共有 DLL 内で MFC を使う場合はここをコールしてください。 #else Enable3dControlsStatic(); // MFC と静的にリンクする場合はここをコールしてください。 #endif //ユーザ使用設定を読み込む必要を判断 SetRegistryKey(window_name); int soft_save; // soft_save=GetProfileInt(_T("Language"),_T("LangID"),-1); soft_save=GetProfileInt(_T("Option"),_T("OldSeted"),-1); FristRun=soft_save; if(soft_save==0) { OldSeted=FALSE; } //ユーザ使用設定を読み込む if(soft_save==1) { soft_save=GetProfileInt(_T("Option"),_T("ExitMessageNoShow"),-1); if(soft_save!=-1) { ExitMessageNoShow=soft_save; } soft_save=GetProfileInt(_T("Option"),_T("TesttingMsg"),-1); if(soft_save!=-1) { TesttingMsg=soft_save; } soft_save=GetProfileInt(_T("Option"),_T("TesttingMsg_ALL"),-1); if(soft_save!=-1) { TesttingMsg_ALL=soft_save; } } //ソフト言語を読み込む soft_save=GetProfileInt(_T("Language"),_T("LangID"),-1); if(soft_save!=-1) { soft_Lang=soft_save; switch(soft_save) { case LANG_JAPANESE://日本語:0x11 SetThreadLocale(LANG_JAPANESE); break; case LANG_ENGLISH://英語:0x09 default://ほかの言語 SetThreadLocale(LANG_ENGLISH); break; } WriteProfileInt(_T("Language"),_T("LangID"),soft_Lang); } //一時フォルダを作成 GetSystemDirectory(my_name, MAX_PATH); GetFullPathName(my_name,MAX_PATH,filepath,&namebeg); strcpy(namebeg,"temp\\NECTestPattern\\"); namebeg+=20; CreateDirectory(filepath,0); TestDlg=NULL; CNECTestPatternDlg dlg; m_pMainWnd = &dlg; //マインダイアログを表示 int nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: ダイアログが <OK> で消された時のコードを // 記述してください。 } else if (nResponse == IDCANCEL) { //言語を切り替えて、ソフトを再起動 char ReRun[MAX_PATH+1]; GetModuleFileName(0, ReRun, MAX_PATH); ShellExecute(NULL,_T("open"),ReRun,NULL,NULL,SW_SHOW); // TODO: ダイアログが <キャンセル> で消された時のコードを // 記述してください。 } // ダイアログが閉じられてからアプリケーションのメッセージ ポンプを開始するよりは、 // アプリケーションを終了するために FALSE を返してください。 return FALSE; } int CNECTestPatternApp::ExitInstance() { //アプリケーション言語 WriteProfileInt(_T("Language"),_T("LangID"),soft_Lang); //ユーザ使用設定を保存 WriteProfileInt(_T("Option"),_T("OldSeted"),OldSeted); if(OldSeted) { WriteProfileInt(_T("Option"),_T("ExitMessageNoShow"),ExitMessageNoShow); WriteProfileInt(_T("Option"),_T("TesttingMsg"),TesttingMsg); WriteProfileInt(_T("Option"),_T("TesttingMsg_ALL"),TesttingMsg_ALL); } //GDI+クラスの終了処理 Gdiplus::GdiplusShutdown(gdiplusToken); return CWinApp::ExitInstance(); }
[ "zhangxin.sanjin@fa8d6de2-2387-11df-88d9-3f628f631586" ]
[ [ [ 1, 177 ] ] ]
cb2b354f3669549674bed81cec2b137f7f172c61
25a408954fdda07b6a27f84f74c9b9b6af1a282c
/ReLipsLib/StageGenerator_.h
9cca8cb21df9187f630826bc5462c2ab98f9dcfe
[]
no_license
nkuln/relips
6a6f9b99d72157d038bc9badff42a644fe094bf5
f6ec7614710e7b3785469b2e670f3abc854b9e2e
refs/heads/master
2016-09-11T02:58:48.354657
2009-02-17T15:29:02
2009-02-17T15:29:02
33,202,450
0
0
null
null
null
null
UTF-8
C++
false
false
280
h
#pragma once class StageGenerator_ { public: StageGenerator_(void); ~StageGenerator_(void); bool CreateStageFromFile(char* musicFile, char* outFile); void CreateStageFromFileAsync(char* musicFile, char* outFile); bool InOperation(); void AbortOperation(); };
[ "m3rlinez@4e9c09b0-ef73-11dd-a70c-37889e090ee0" ]
[ [ [ 1, 13 ] ] ]
abcd6dbf8012193876efbb4306d3db4853b07988
2582b165a8f0b05ecce1a844854c07dcd71b087f
/Powerbuilder-PBVM/powerbuilder.cpp
42bd64a17b0009aaeb628825abb35f5fa0f41fe8
[ "Artistic-1.0-Perl" ]
permissive
xlat/perl2powerbuilder
3dcae9ab3e6b0e2e1c1cee8f78bd49881167d209
1519a91e7aaa1559e97693276c596f6d7965ecaa
refs/heads/master
2016-09-06T05:16:46.129926
2010-04-02T08:49:25
2010-04-02T08:49:25
32,319,678
2
0
null
null
null
null
ISO-8859-2
C++
false
false
58,733
cpp
//#TODO: prefere Perl's memory allocation function than malloc/free //~ #define PB100 //~ #define PB105 //~ #define PB115 //~ #define PB120 //~ #define USE_LONGLONG #ifdef PB100 #define PBVM_DLL "pbvm100.dll" #endif #ifdef PB105 #define PBVM_DLL "pbvm105.dll" #endif #ifdef PB115 #define PBVM_DLL "pbvm115.dll" #endif #ifdef PB120 #define PBVM_DLL "pbvm120.dll" #endif //This files are copied from your installation path by Makefile.PL #include "sybase/include/pbext.h" #include "sybase/include/pbni.h" #include "sybase/include/PBCTXIF.h" #include "stdio.h" #include "ppport.h" #include "const-c.inc" // Additional fixes : // * in MATH.H : patched by adding an #if !defined( H_PERL ) ... template<class _Ty> ... #end if typedef PBXEXPORT PBXRESULT (*P_PB_GetVM)(IPB_VM** vm); #define PVOID (void*) //######################### #define pb_val _value() class Value{ public: //~ Value(){ i_value = NULL; } //~ Value( IPB_Value* v ){ i_value = v; } Value( void* v ){ i_value = (IPB_Value*)v; } ~Value(){ i_value = NULL; } void* get(){ return i_value; } void* GetClass(){ return (pbclass)pb_val->GetClass(); } unsigned short GetType(){ return (pbuint)pb_val->GetType(); } short IsArray(){ return (short)pb_val->IsArray(); } short IsObject(){ return (short)pb_val->IsObject(); } short IsEnum(){ return (short)pb_val->IsEnum(); } short IsByRef(){ return (short)pb_val->IsByRef(); } short IsNull(){ return (short)pb_val->IsNull(); } long SetToNull(){ return (long)pb_val->SetToNull(); } short GetInt(){ return (pbint)pb_val->GetInt(); } unsigned short GetUint(){ return (pbuint)pb_val->GetUint(); } short GetBool(){ return (short)pb_val->GetBool(); } long GetLong(){ return (pblong)pb_val->GetLong(); } unsigned long GetUlong(){ return (pbulong)pb_val->GetUlong(); } float GetReal(){ return (pbreal)pb_val->GetReal(); } double GetDouble(){ return (pbdouble)pb_val->GetDouble(); } void* GetDecimal(){ return (pbdec)pb_val->GetDecimal(); } unsigned short GetChar(){ return (pbchar)pb_val->GetChar(); } void* GetString(){ return (pbstring)pb_val->GetString(); } void* GetObject(){ return (pbobject)pb_val->GetObject(); } void* GetArray(){ return (pbarray)pb_val->GetArray(); } void* GetTime(){ return (pbtime)pb_val->GetTime(); } void* GetDate(){ return (pbdate)pb_val->GetDate(); } void* GetDateTime(){ return (pbdatetime)pb_val->GetDateTime(); } #if defined USE_LONGLONG pblonglong GetLongLong(){ return (pblonglong)pb_val->GetLongLong(); } #endif void* GetBlob(){ return (pbblob)pb_val->GetBlob(); } long SetInt(short v){ return (long)pb_val->SetInt(v); } long SetUint(unsigned short v){ return (long)pb_val->SetUint(v); } long SetBool(short v){ return (long)pb_val->SetBool(v); } long SetLong(long v){ return (long)pb_val->SetLong(v); } long SetUlong(unsigned long v){ return (long)pb_val->SetUlong(v); } long SetReal(float v){ return (long)pb_val->SetReal(v); } long SetDouble(double v){ return (long)pb_val->SetDouble(v); } long SetDecimal(void* v){ return (long)pb_val->SetDecimal((pbdec)v); } long SetChar(unsigned short v){ return (long)pb_val->SetChar(v); } long SetPBString(void* v){ return (long)pb_val->SetPBString((pbstring)v); } long SetString(char* v){ return (long)pb_val->SetString(v); } long SetArray(void* v){ return (long)pb_val->SetArray((pbarray)v); } long SetTime(void* v){ return (long)pb_val->SetTime((pbtime)v); } long SetDate(void* v){ return (long)pb_val->SetDate((pbdate)v); } long SetDateTime(void* v){ return (long)pb_val->SetDateTime((pbdatetime)v); } #if defined USE_LONGLONG long SetLongLong(pblonglong){ return (long)pb_val->SetLongLong(pblonglong); } #endif long SetBlob(void* v){ return (long)pb_val->SetBlob((pbblob)v); } long SetObject(void* v){ return (long)pb_val->SetObject((pbobject)v); } short IsReadOnly(){ return (short)pb_val->IsReadOnly(); } unsigned char GetByte(){ return (unsigned char)pb_val->GetByte(); } long SetByte(void* v){ return (long)pb_val->SetByte((pbbyte)v); } private: IPB_Value* i_value; IPB_Value* _value(){ if(i_value==NULL) croak("No value handle !"); return i_value; } }; #define pb_arg _argument() class Arguments{ public: Arguments( void* arg){ i_arguments = (IPB_Arguments*)arg; } ~Arguments(){ i_arguments = NULL; } short GetCount(){ return pb_arg->GetCount(); } void* GetAt(short i){ return (IPB_Value*)pb_arg->GetAt(i); } private: IPB_Arguments* i_arguments; IPB_Arguments* _argument(){ if(i_arguments==NULL) croak("No arguments handle !"); return i_arguments; } }; class CallInfo{ public: CallInfo(){} ~CallInfo(){} void* get(){ return &i_callinfo; } void* Args(){ return i_callinfo.pArgs; } void* returnValue(){ return i_callinfo.returnValue; } void* returnClass(){ return i_callinfo.returnClass; } private: PBCallInfo i_callinfo; }; class ArrayInfo{ public: ArrayInfo(void* arrayinfo){ i_arrayinfo = (PBArrayInfo*)arrayinfo; } ~ArrayInfo(){} void* get(){ return i_arrayinfo; } short IsBoundedArray(){ return i_arrayinfo->arrayType == PBArrayInfo::BoundedArray; } int valueType(){ return i_arrayinfo->valueType; } int numDimensions(){ return i_arrayinfo->numDimensions; } long ArrayBoundLower(long dimId){ return i_arrayinfo->bounds[dimId].lowerBound; } long ArrayBoundUpper(long dimId){ return i_arrayinfo->bounds[dimId].upperBound; } private: PBArrayInfo* i_arrayinfo; }; #define session _session() class PBVM { public: PBVM(){ pbvm = NULL; i_session = NULL; i_injected = false; i_hinst = LoadLibrary(PBVM_DLL); getvm = (P_PB_GetVM)GetProcAddress(i_hinst,"PB_GetVM"); getvm(&pbvm); } ~PBVM(){ if(i_session && !i_injected){ i_session->Release(); } FreeLibrary(i_hinst); } IPB_Session* _session(){ if(i_session==NULL) croak("No session !"); return i_session; } void AttachSession(){ //Becare By using this method: you absolutely need to be in the same process than the Session Owner //This could be done via some DllInjection thecnical... //This hack was tested only with PBVM115.DLL( v11.5 build 3127 ) //seams to be a constant pointer address in the owner process DWORD* sessionptr= (DWORD*)0xEF7940; sessionptr = (DWORD*)sessionptr[0]; i_session = (IPB_Session*)((void*)sessionptr); //vmGetInstance() ??? i_injected = true; } int ReleaseSession(){ if (i_session!=NULL){ session->Release(); i_session = NULL; } return 0; } unsigned long GetSessionAddr(){ return (unsigned long)((void*)i_session); } unsigned long getptr(void* ptr){ return (unsigned long)ptr; } void* ref(char* ptr){ return ptr; } char* unref(void* ptr){ return (char*)ptr; } //La liste des librairies doit etre séparé par des ; int CreateSession(char* appName, char* libs, int nblib){ char* copy_libs = (char*)malloc( 1 + strlen( libs ) ); //Assert( copy_libs ); strcpy(copy_libs, libs); char* cursor = copy_libs; long libcount=0; while( *cursor ){ if(*cursor == ';'){ libcount++; } cursor++; } LPCTSTR *list_libs; list_libs = (LPCTSTR *)malloc( sizeof(LPCTSTR) * (libcount+1) ); cursor = copy_libs; list_libs[ libcount=0 ] = cursor; while( *cursor ){ if(*cursor == ';'){ *cursor = 0; //make last pointer a real C string / null terminated string list_libs[ ++libcount ] = cursor + 1; } cursor++; } if(list_libs==NULL){ free(copy_libs); croak("Spliting libs: Could not allocate memory !"); } if(i_session!=NULL) ReleaseSession(); if ( pbvm->CreateSession( (LPCTSTR)appName, list_libs, nblib, &i_session) != PBX_OK ){ free( list_libs ); free(copy_libs); session->Release(); i_session = NULL; return 1; } free( list_libs ); free(copy_libs); return 0; } //La liste des librairies doit etre séparé par des ; int RunApplication(char* appName, char* libs, int nblib, char* cmdline){ char* copy_libs = (char*)malloc( 1 + strlen( libs ) ); //Assert( copy_libs ); strcpy(copy_libs, libs); char* cursor = copy_libs; long libcount=0; while( *cursor ){ if(*cursor == ';'){ libcount++; } cursor++; } LPCTSTR *list_libs; list_libs = (LPCTSTR *)malloc( sizeof(LPCTSTR) * (libcount+1) ); cursor = copy_libs; list_libs[ libcount=0 ] = cursor; while( *cursor ){ if(*cursor == ';'){ *cursor = 0; //make last pointer a real C string / null terminated string list_libs[ ++libcount ] = cursor + 1; } cursor++; } if(list_libs==NULL){ free(copy_libs); croak("Spliting libs: Could not allocate memory !"); } if(i_session!=NULL) ReleaseSession(); if ( pbvm->RunApplication( (LPCTSTR)appName, list_libs, nblib, cmdline, &i_session) != PBX_OK ){ free( list_libs ); free(copy_libs); session->Release(); i_session = NULL; return 1; } free( list_libs ); free(copy_libs); return 0; } //Interface to access String void* NewString(char* value){ return (void*)session->NewString( value?value:"" ); } const char* GetString(void* pb_string){ return session->GetString( (pbstring)pb_string ); } long SetString(void* pb_string, char* value){ return session->SetString( (pbstring)pb_string, value ); } long GetStringLength(void* pb_string){ return session->GetStringLength( (pbstring)pb_string ); } //Interface to access Binary. void* NewBlob(void* bin, long len){ return PVOID session->NewBlob(bin, len); } long SetBlob(void* blob, const void* bin, long len){ return session->SetBlob((pbblob)blob,bin,len); } long GetBlobLength(void* pbbin){ return session->GetBlobLength((pbblob)pbbin); } void* GetBlob(void* pbbin){ return PVOID session->GetBlob((pbblob)pbbin); } //interface to access decimal number void* NewDecimal(){ return PVOID session->NewDecimal(); } long SetDecimal(void* dec, char* dec_str){ return session->SetDecimal((pbdec)dec,dec_str); } void* GetDecimalString(void* dec){ return (char*)session->GetDecimalString((pbdec)dec); } void ReleaseDecimalString(void* s){ session->ReleaseDecimalString((const char*)s); } //Interface to access Date, Time and DateTime. void* NewDate() { return PVOID session->NewDate(); } void* NewTime() { return PVOID session->NewTime(); } void* NewDateTime() { return PVOID session->NewDateTime(); } long SetDate(void* date, short year, short month, short day){ return session->SetDate((pbdate)date, year, month, day); } long SetTime(void* time, short hour, short minute, double second){ return session->SetTime((pbtime) time, hour, minute, second); } long SetDateTime(void* dt, short year, short month, short day, short hour, short minute, double second){ return session->SetDateTime((pbdatetime) dt, year, month, day,hour, minute, second); } long CopyDateTime(void* dest, void* src){ return session->CopyDateTime((pbdatetime)dest, (pbdatetime)src); } long SplitDate(void* date, SV* year_sv, SV* month_sv, SV* day_sv){ short year, month, day; long res = session->SplitDate((pbdate) date, &year, &month, &day); SvIV_set( year_sv, year ); SvIV_set( month_sv, month ); SvIV_set( day_sv, day ); return res; } long SplitTime(void* time, SV* hour_sv, SV* minute_sv, SV* second_sv ){ short hour, minute; double second; long res = session->SplitTime((pbtime) time, &hour, &minute, &second); SvIV_set( hour_sv, hour ); SvIV_set( minute_sv, minute ); SvNV_set( second_sv, second ); return res; } long SplitDateTime(void* dt, SV* year_sv, SV* month_sv, SV* day_sv, SV* hour_sv, SV* minute_sv, SV* second_sv){ short year, month, day, hour, minute; double second; long res = session->SplitDateTime((pbdatetime) dt, &year, &month, &day, &hour, &minute, &second); SvIV_set( year_sv, year ); SvIV_set( month_sv, month ); SvIV_set( day_sv, day ); SvIV_set( hour_sv, hour ); SvIV_set( minute_sv, minute ); SvNV_set( second_sv, second ); return res; } void* GetDateString(void* a){ return (char*)session->GetDateString((pbdate)a); } void ReleaseDateString(void* a){ session->ReleaseDateString((const char*)a); } void* GetTimeString(void* a){ return (char*)session->GetTimeString((pbtime)a); } void ReleaseTimeString(void* a){ session->ReleaseTimeString((const char*)a); } void* GetDateTimeString(void* a){ return (char*)session->GetDateTimeString((pbdatetime)a); } void ReleaseDateTimeString(void* a){ session->ReleaseDateTimeString((const char*)a); } void* GetClass(void* obj){ return PVOID session->GetClass((pbobject)obj); } void* GetSystemGroup(){ return (pbgroup)session->GetSystemGroup(); } unsigned short GetMethodID(void* cls, char* methodName, int rt, char* signature, short publicOnly = true){ return (pbmethodID)session->GetMethodID((pbclass) cls, methodName, (PBRoutineType) rt, signature, publicOnly); } unsigned short FindMatchingFunction(void* cls, char* methodName, int rt, char* readableSignature){ return (pbmethodID)session->FindMatchingFunction((pbclass) cls, methodName, (PBRoutineType) rt, readableSignature); } unsigned short GetMethodIDByEventID(void* cls, char* eventID){ return (pbmethodID)session->GetMethodIDByEventID((pbclass) cls, eventID); } long InitCallInfo(void* cls, unsigned short mid, void* ci){ return (long)session->InitCallInfo((pbclass) cls, mid, (PBCallInfo *)ci); } void FreeCallInfo(void* ci){ session->FreeCallInfo((PBCallInfo *)ci); } void AddLocalRef(void* obj){ session->AddLocalRef((pbobject) obj); } void RemoveLocalRef(void* obj){ session->RemoveLocalRef((pbobject) obj); } void AddGlobalRef(void* obj){ session->AddGlobalRef((pbobject) obj); } void RemoveGlobalRef(void* obj){ session->RemoveGlobalRef((pbobject) obj); } void PushLocalFrame(){ session->PushLocalFrame(); } void PopLocalFrame(){ session->PopLocalFrame(); } // For passing variable arguments. long AddIntArgument(void* ci, short value, short isNull=FALSE){ return (long)session->AddIntArgument((PBCallInfo *)ci, value, isNull); } long AddLongArgument(void *ci, long value, short isNull=FALSE){ return (long)session->AddLongArgument((PBCallInfo *)ci, value, isNull); } long AddRealArgument(void* ci, float value, short isNull=FALSE){ return (long)session->AddRealArgument((PBCallInfo *)ci, value, isNull); } long AddDoubleArgument(void* ci, double value, short isNull=FALSE){ return (long)session->AddDoubleArgument((PBCallInfo *)ci, value, isNull); } long AddDecArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddDecArgument((PBCallInfo *)ci, (pbdec) value, isNull); } long AddPBStringArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddPBStringArgument((PBCallInfo *)ci, (pbstring) value, isNull); } long AddStringArgument(void* ci, char* value, short isNull=FALSE){ return (long)session->AddStringArgument((PBCallInfo *)ci, value, isNull); } long AddBoolArgument(void* ci, short value, short isNull=FALSE){ return (long)session->AddBoolArgument((PBCallInfo *)ci, value, isNull); } long AddUintArgument(void* ci, unsigned short value, short isNull=FALSE){ return (long)session->AddUintArgument((PBCallInfo *)ci, value, isNull); } long AddUlongArgument(void* ci, unsigned long value, short isNull=FALSE){ return (long)session->AddUlongArgument((PBCallInfo *)ci, value, isNull); } long AddBlobArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddBlobArgument((PBCallInfo *)ci, (pbblob) value, isNull); } long AddDateArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddDateArgument((PBCallInfo *)ci, (pbdate) value, isNull); } long AddTimeArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddTimeArgument((PBCallInfo *)ci, (pbtime) value, isNull); } long AddDateTimeArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddDateTimeArgument((PBCallInfo *)ci, (pbdatetime) value, isNull); } long AddCharArgument(void* ci, unsigned short value, short isNull=FALSE){ return (long)session->AddCharArgument((PBCallInfo *)ci, value, isNull); } #if defined USE_LONGLONG long AddLongLongArgument(void* ci, longlong value, short isNull=FALSE){ return (long)session->AddLongLongArgument((PBCallInfo *)ci, value, isNull); } #endif long AddObjectArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddObjectArgument((PBCallInfo *)ci, (pbobject) value, isNull); } long AddArrayArgument(void* ci, void* value, short isNull=FALSE){ return (long)session->AddArrayArgument((PBCallInfo *)ci, (pbarray) value, isNull); } long InvokeClassFunction(void* cls, unsigned short mid, void* ci){ return (long)session->InvokeClassFunction((pbclass) cls, mid, (PBCallInfo *)ci); } long InvokeObjectFunction(void* obj, unsigned short mid, void* ci){ return (long)session->InvokeObjectFunction((pbobject) obj, mid, (PBCallInfo *)ci); } long TriggerEvent(void* obj, unsigned short mid, void* ci){ return (long)session->TriggerEvent((pbobject) obj, mid, (PBCallInfo *)ci); } short HasExceptionThrown(){ return (short)session->HasExceptionThrown(); } void* GetException(){ return (pbobject)session->GetException(); } void ClearException(){ session->ClearException(); } void ThrowException(void* ex){ session->ThrowException((pbobject) ex); } void* GetCurrGroup(){ return (pbgroup)session->GetCurrGroup(); } void* FindGroup(char* name, int gt){ return (pbgroup)session->FindGroup(name, (pbgroup_type)gt); } void* FindClass(void* group, char* name){ return (pbclass)session->FindClass((pbgroup) group, name); } void* FindClassByClassID(void* group, short classID){ return (pbclass)session->FindClassByClassID((pbgroup) group, classID); } char* GetClassName(void* cls){ return (char*)session->GetClassName((pbclass) cls); } void* GetSuperClass(void* cls){ return (pbclass)session->GetSuperClass((pbclass) cls); } void* GetSystemClass(void* cls){ return (pbclass)session->GetSystemClass((pbclass) cls); } short IsAutoInstantiate(void* pbcls){ return (short)session->IsAutoInstantiate((pbclass) pbcls); } void* NewObject(void* cls){ return (pbobject)session->NewObject((pbclass) cls); } unsigned short GetFieldID(void* cls, char* fieldName){ return (pbfieldID)session->GetFieldID((pbclass) cls, fieldName); } unsigned short GetFieldType(void* cl, unsigned short f){ return (unsigned short)session->GetFieldType((pbclass)cl, f); } unsigned long GetNumOfFields(unsigned long cl){ return (unsigned long)session->GetNumOfFields((pbclass)cl); } char* GetFieldName(void* cl , unsigned short f){ return (char*)session->GetFieldName((pbclass)cl, f); } short IsFieldNull(void* o, unsigned short f){ return (short)session->IsFieldNull((pbobject)o, f); } void SetFieldToNull(void* o, unsigned short f){ session->SetFieldToNull((pbobject)o, f); } short IsFieldArray(void* cl, unsigned short f){ return (short)session->IsFieldArray((pbclass) cl, f); } short IsFieldObject(void* cl, unsigned short f){ return (short)session->IsFieldObject((pbclass) cl, f); } long UpdateField(void* obj, unsigned short fid){ return (long)session->UpdateField((pbobject) obj, fid); } short GetIntField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; short res = (short)session->GetIntField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long GetLongField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; long res = (long)session->GetLongField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } float GetRealField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; float res = (float)session->GetRealField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } double GetDoubleField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; double res = (double)session->GetDoubleField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDecField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdec)session->GetDecField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetStringField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbstring)session->GetStringField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } short GetBoolField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; short res = (short)session->GetBoolField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned short GetUintField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetUintField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned long GetUlongField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; unsigned long res = (unsigned long)session->GetUlongField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetBlobField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbblob)session->GetBlobField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDateField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdate)session->GetDateField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetTimeField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbtime)session->GetTimeField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDateTimeField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdatetime)session->GetDateTimeField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned short GetCharField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetCharField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } #if defined USE_LONGLONG longlong GetLongLongField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; longlong res = (longlong)session->GetLongLongField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } #endif void* GetObjectField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbobject)session->GetObjectField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetArrayField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbarray)session->GetArrayField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long SetIntField(void* obj, unsigned short fid, short value){ return (long)session->SetIntField((pbobject) obj, fid, value); } long SetLongField(void* obj, unsigned short fid, long value){ return (long)session->SetLongField((pbobject) obj, fid, value); } long SetRealField(void* obj, unsigned short fid, float value){ return (long)session->SetRealField((pbobject) obj, fid, value); } long SetDoubleField(void* obj, unsigned short fid, double value){ return (long)session->SetDoubleField((pbobject) obj, fid, value); } long SetDecField(void* obj, unsigned short fid, void* value){ return (long)session->SetDecField((pbobject) obj, fid, (pbdec) value); } long SetPBStringField(void* obj, unsigned short fid, void* value){ return (long)session->SetPBStringField((pbobject) obj, fid, (pbstring)value); } long SetStringField(void* obj, unsigned short fid, char* value){ return (long)session->SetStringField((pbobject) obj, fid, value); } long SetBoolField(void* obj, unsigned short fid, short value){ return (long)session->SetBoolField((pbobject) obj, fid, value); } long SetUintField(void* obj, unsigned short fid, unsigned short value){ return (long)session->SetUintField((pbobject) obj, fid, value); } long SetUlongField(void* obj, unsigned short fid, unsigned long value){ return (long)session->SetUlongField((pbobject) obj, fid, value); } long SetBlobField(void* obj, unsigned short fid, void* value){ return (long)session->SetBlobField((pbobject) obj, fid, (pbblob)value); } long SetDateField(void* obj, unsigned short fid, void* value){ return (long)session->SetDateField((pbobject) obj, fid, (pbdate)value); } long SetTimeField(void* obj, unsigned short fid, void* value){ return (long)session->SetTimeField((pbobject) obj, fid, (pbtime)value); } long SetDateTimeField(void* obj, unsigned short fid, void* value){ return (long)session->SetDateTimeField((pbobject) obj, fid, (pbdatetime)value); } long SetCharField(void* obj, unsigned short fid, unsigned short value){ return (long)session->SetCharField((pbobject) obj, fid, value); } #if defined USE_LONGLONG long SetLongLongField(void* obj, unsigned short fid, longlong value){ return (long)session->SetLongLongField((pbobject) obj, fid, longlong value); } #endif long SetObjectField(void* obj, unsigned short fid, void* value){ return (long)session->SetObjectField((pbobject) obj, fid, (pbobject) value); } long SetArrayField(void* obj, unsigned short fid, void* value){ return (long)session->SetArrayField((pbobject) obj, fid, (pbarray) value); } unsigned short GetSharedVarID(void* group, char* fieldName){ return (unsigned short)session->GetSharedVarID((pbgroup) group, fieldName); } unsigned short GetSharedVarType(void* g, unsigned short f){ return (unsigned short)session->GetSharedVarType((pbgroup)g, f); } short IsSharedVarNull(void* g, unsigned short f){ return (short)session->IsSharedVarNull((pbgroup)g, f); } void SetSharedVarToNull(void* g, unsigned short f){ session->SetSharedVarToNull((pbgroup)g, f); } short IsSharedVarArray(void* g, unsigned short f){ return (short)session->IsSharedVarArray((pbgroup)g, f); } short IsSharedVarObject(void* g, unsigned short f){ return (short)session->IsSharedVarObject((pbgroup)g, f); } short GetIntSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; short res = (short)session->GetIntSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long GetLongSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; long res = (long)session->GetLongSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } float GetRealSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; float res = (float)session->GetRealSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } double GetDoubleSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; double res = (double)session->GetDoubleSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDecSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdec)session->GetDecSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetStringSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbstring)session->GetStringSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } short GetBoolSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; short res = (short)session->GetBoolSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned short GetUintSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetUintSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned long GetUlongSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; unsigned long res = (unsigned long)session->GetUlongSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetBlobSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbblob)session->GetBlobSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDateSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdate)session->GetDateSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetTimeSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbtime)session->GetTimeSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDateTimeSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdatetime)session->GetDateTimeSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned short GetCharSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetCharSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } #if defined USE_LONGLONG longlong GetLongLongSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; longlong res = (longlong)session->GetLongLongSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } #endif void* GetObjectSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbobject)session->GetObjectSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetArraySharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbarray)session->GetArraySharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long SetIntSharedVar(void* group, unsigned short fid, short value){ return (long)session->SetIntSharedVar((pbgroup) group, fid, value); } long SetLongSharedVar(void* group, unsigned short fid, long value){ return (long)session->SetLongSharedVar((pbgroup) group, fid, value); } long SetRealSharedVar(void* group, unsigned short fid, float value){ return (long)session->SetRealSharedVar((pbgroup) group, fid, value); } long SetDoubleSharedVar(void* group, unsigned short fid, double value){ return (long)session->SetDoubleSharedVar((pbgroup) group, fid, value); } long SetDecSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetDecSharedVar((pbgroup) group, fid, (pbdec) value); } long SetPBStringSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetPBStringSharedVar((pbgroup) group, fid, (pbstring)value); } long SetStringSharedVar(void* group, unsigned short fid, char* value){ return (long)session->SetStringSharedVar((pbgroup) group, fid, value); } long SetBoolSharedVar(void* group, unsigned short fid, short value){ return (long)session->SetBoolSharedVar((pbgroup) group, fid, value); } long SetUintSharedVar(void* group, unsigned short fid, unsigned short value){ return (long)session->SetUintSharedVar((pbgroup) group, fid, value); } long SetUlongSharedVar(void* group, unsigned short fid, unsigned long value){ return (long)session->SetUlongSharedVar((pbgroup) group, fid, value); } long SetBlobSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetBlobSharedVar((pbgroup) group, fid, (pbblob)value); } long SetDateSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetDateSharedVar((pbgroup) group, fid, (pbdate)value); } long SetTimeSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetTimeSharedVar((pbgroup) group, fid, (pbtime)value); } long SetDateTimeSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetDateTimeSharedVar((pbgroup) group, fid, (pbdatetime)value); } long SetCharSharedVar(void* group, unsigned short fid, unsigned short value){ return (long)session->SetCharSharedVar((pbgroup) group, fid, value); } #if defined USE_LONGLONG long SetLongLongSharedVar(void* group, unsigned short fid, longlong value){ return (long)session->SetLongLongSharedVar((pbgroup) group, fid, (longlong) value); } #endif long SetObjectSharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetObjectSharedVar((pbgroup) group, fid, (pbobject) value); } long SetArraySharedVar(void* group, unsigned short fid, void* value){ return (long)session->SetArraySharedVar((pbgroup) group, fid, (pbarray) value); } //Interface to Global Variables unsigned short GetGlobalVarID(char* varName){ return (pbfieldID)session->GetGlobalVarID( varName); } unsigned short GetGlobalVarType(unsigned short f){ return (unsigned short)session->GetGlobalVarType( f); } short IsGlobalVarNull(unsigned short f){ return (short)session->IsGlobalVarNull(f); } void SetGlobalVarToNull(unsigned short f){ session->SetGlobalVarToNull( f); } short IsGlobalVarArray(unsigned short f){ return (short)session->IsGlobalVarArray( f); } short IsGlobalVarObject(unsigned short f){ return (short)session->IsGlobalVarObject( f); } short GetIntGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; short res = (short)session->GetIntGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long GetLongGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; long res = (long)session->GetLongGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } float GetRealGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; float res = (float)session->GetRealGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } double GetDoubleGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; double res = (double)session->GetDoubleGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDecGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdec)session->GetDecGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetStringGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbstring)session->GetStringGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } short GetBoolGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; short res = (short)session->GetBoolGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned short GetUintGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetUintGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } unsigned long GetUlongGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; unsigned long res = (unsigned long)session->GetUlongGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetBlobGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbblob)session->GetBlobGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDateGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdate)session->GetDateGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetTimeGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbtime)session->GetTimeGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetDateTimeGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbdatetime)session->GetDateTimeGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } char GetCharGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; char res = (char)session->GetCharGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } #if defined USE_LONGLONG longlong GetLongLongGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; longlong res = (longlong)session->GetLongLongGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } #endif void* GetObjectGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbobject)session->GetObjectGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetArrayGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; void* res = (pbarray)session->GetArrayGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long SetIntGlobalVar(unsigned short fid, short value){ return (long)session->SetIntGlobalVar( fid, value); } long SetLongGlobalVar(unsigned short fid, long value){ return (long)session->SetLongGlobalVar( fid, value); } long SetRealGlobalVar(unsigned short fid, float value){ return (long)session->SetRealGlobalVar( fid, value); } long SetDoubleGlobalVar(unsigned short fid, double value){ return (long)session->SetDoubleGlobalVar( fid, value); } long SetDecGlobalVar(unsigned short fid, void* value){ return (long)session->SetDecGlobalVar( fid, (pbdec) value); } long SetPBStringGlobalVar(unsigned short fid, void* value){ return (long)session->SetPBStringGlobalVar( fid, (pbstring)value); } long SetStringGlobalVar(unsigned short fid, char* value){ return (long)session->SetStringGlobalVar( fid, value); } long SetBoolGlobalVar(unsigned short fid, short value){ return (long)session->SetBoolGlobalVar( fid, value); } long SetUintGlobalVar(unsigned short fid, unsigned short value){ return (long)session->SetUintGlobalVar( fid, value); } long SetUlongGlobalVar(unsigned short fid, unsigned long value){ return (long)session->SetUlongGlobalVar( fid, value); } long SetBlobGlobalVar(unsigned short fid, void* value){ return (long)session->SetBlobGlobalVar( fid, (pbblob)value); } long SetDateGlobalVar(unsigned short fid, void* value){ return (long)session->SetDateGlobalVar( fid, (pbdate)value); } long SetTimeGlobalVar(unsigned short fid, void* value){ return (long)session->SetTimeGlobalVar( fid, (pbtime)value); } long SetDateTimeGlobalVar(unsigned short fid, void* value){ return (long)session->SetDateTimeGlobalVar( fid, (pbdatetime)value); } long SetCharGlobalVar(unsigned short fid, char value){ return (long)session->SetCharGlobalVar( fid, (unsigned short)value); } #if defined USE_LONGLONG long SetLongLongGlobalVar(unsigned short fid, longlong value){ return (long)session->SetLongLongGlobalVar( fid, longlong value); } #endif long SetObjectGlobalVar(unsigned short fid, void* value){ return (long)session->SetObjectGlobalVar( fid, (pbobject) value); } long SetArrayGlobalVar(unsigned short fid, void* value){ return (long)session->SetArrayGlobalVar( fid, (pbarray) value); } short IsNativeObject(void* obj){ return (short)session->IsNativeObject((pbobject) obj); } IPBX_UserObject* GetNativeInterface(void* obj){ return (IPBX_UserObject*)session->GetNativeInterface((pbobject) obj); } //Interface to access Array void* NewBoundedSimpleArray(unsigned short type, AV* boundaries ){ PBArrayInfo::ArrayBound *bounds; long dimensions; //sv_dump( (SV*)boundaries ); dimensions = av_len( boundaries ) +1; if(dimensions%2) croak( "usage: NewBoundedSimpleArray( type, [lowerbound, upperbound, ...] )" ); dimensions = dimensions/2; bounds = (PBArrayInfo::ArrayBound *) malloc( sizeof(PBArrayInfo::ArrayBound) * dimensions ); for(int i=0;i<dimensions; i++){ SV** value; value = av_fetch( boundaries, 2*i, 0); bounds[i].lowerBound = SvIV(*value); value = av_fetch( boundaries, 2*i+1, 0); bounds[i].upperBound = SvIV(*value); } pbarray a = (pbarray)session->NewBoundedSimpleArray(type, (unsigned short)dimensions, bounds); free(bounds); return a; } //bounded array are fixed size, can be multidimension void* NewUnboundedSimpleArray(unsigned short type){ return (pbarray)session->NewUnboundedSimpleArray(type); } //unbounded array are variable size, can only 1 dimension void* NewBoundedObjectArray(void* cl, unsigned short dimensions, void* bounds){ return (pbarray)session->NewBoundedObjectArray((pbclass) cl, dimensions, (PBArrayInfo::ArrayBound*) bounds); } //bounded array are fixed size, can be multidimension void* NewUnboundedObjectArray(void* c){ return (pbarray)session->NewUnboundedObjectArray((pbclass)c); } //unbounded array are variable size, can only 1 dimension long GetArrayLength(void* a){ return (long)session->GetArrayLength((pbarray) a); } void* GetArrayInfo(void* a){ return (PBArrayInfo*)session->GetArrayInfo((pbarray) a); } long ReleaseArrayInfo(void* a){ return (long)session->ReleaseArrayInfo((PBArrayInfo*) a); } // Release info, if and only if the memory is allocated from pb long* __AV2LongPtrPtr( AV* av_array ){ long* longpp; long alength; alength = av_len( av_array )+1; //~ sv_dump( (SV*) av_array ); if( !alength ) croak("usage: __AV2LongPtrPtr( [ l, m, n, ...] ) with #@>0 !"); Newx( longpp, alength, long ); for(int i=0;i<alength;i++){ SV** value = av_fetch( av_array, i, 0 ); longpp[i] = SvIV(*value); } return longpp; } short IsArrayItemNull(void* array, AV* dim_array){ long * dim = __AV2LongPtrPtr( dim_array ); short retval = (short)session->IsArrayItemNull((pbarray) array, dim); Safefree( dim ); return retval; } void SetArrayItemToNull(void* array, AV* dim_array){ long * dim = __AV2LongPtrPtr( dim_array ); session->SetArrayItemToNull((pbarray) array, dim ); Safefree( dim ); } unsigned short GetArrayItemType(void* array, AV* dim_array){ long * dim = __AV2LongPtrPtr( dim_array ); unsigned short retval = session->GetArrayItemType((pbarray) array, dim ); Safefree( dim ); return retval; } short GetIntArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); short res = (short)session->GetIntArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } long GetLongArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); long res = (long)session->GetLongArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } float GetRealArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); float res = (float)session->GetRealArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } double GetDoubleArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); double res = (double)session->GetDoubleArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* GetDecArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbdec)session->GetDecArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* GetStringArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbstring)session->GetStringArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } short GetBoolArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); short res = (short)session->GetBoolArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } unsigned short GetUintArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); unsigned short res = (unsigned short)session->GetUintArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } unsigned long GetUlongArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); unsigned long res = (unsigned long)session->GetUlongArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* GetBlobArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbblob)session->GetBlobArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* GetDateArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbdate)session->GetDateArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* GetTimeArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbtime)session->GetTimeArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* GetDateTimeArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbdatetime)session->GetDateTimeArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } unsigned short GetCharArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); unsigned short res = (unsigned short)session->GetCharArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } #if defined USE_LONGLONG longlong GetLongLongArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); longlong res = (longlong)session->GetLongLongArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } #endif void* GetObjectArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); void* res = (pbobject)session->GetObjectArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } long SetIntArrayItem(void* array, AV* dim_array, short v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetIntArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetLongArrayItem(void* array, AV* dim_array, long v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetLongArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetRealArrayItem(void* array, AV* dim_array, float v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetRealArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetDoubleArrayItem(void* array, AV* dim_array, double v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetDoubleArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetDecArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetDecArrayItem((pbarray) array, dim, (pbdec) v); Safefree( dim ); return retval; } long SetPBStringArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetPBStringArrayItem((pbarray) array, dim, (pbstring)v); Safefree( dim ); return retval; } long SetStringArrayItem(void* array, AV* dim_array, char* s){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetStringArrayItem((pbarray) array, dim, s); Safefree( dim ); return retval; } long SetBoolArrayItem(void* array, AV* dim_array, short v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetBoolArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetUintArrayItem(void* array, AV* dim_array, unsigned short v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetUintArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetUlongArrayItem(void* array, AV* dim_array, unsigned long v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetUlongArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } long SetBlobArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetBlobArrayItem((pbarray) array, dim, (pbblob)v); Safefree( dim ); return retval; } long SetDateArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetDateArrayItem((pbarray) array, dim, (pbdate)v); Safefree( dim ); return retval; } long SetTimeArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetTimeArrayItem((pbarray) array, dim, (pbtime)v); Safefree( dim ); return retval; } long SetDateTimeArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetDateTimeArrayItem((pbarray) array, dim, (pbdatetime)v); Safefree( dim ); return retval; } long SetCharArrayItem(void* array, AV* dim_array, unsigned short v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetCharArrayItem((pbarray) array, dim, v); Safefree( dim ); return retval; } #if defined USE_LONGLONG long SetLongLongArrayItem(void* array, AV* dim_array, longlong){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetLongLongArrayItem((pbarray) array, dim, longlong); Safefree( dim ); return retval; } #endif long SetObjectArrayItem(void* array, AV* dim_array, void* v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetObjectArrayItem((pbarray) array, dim, (pbobject) v); Safefree( dim ); return retval; } //------------------------------------------------------------------------------------------------------- void* NewProxyObject(void* cls){ return (pbproxyObject)session->NewProxyObject((pbclass) cls); } long SetMarshaler(void* obj, void* marshaler){ return (long)session->SetMarshaler((pbproxyObject) obj, (IPBX_Marshaler*) marshaler); } void* GetMarshaler(void* obj){ return (IPBX_Marshaler*)session->GetMarshaler((pbproxyObject) obj); } void* AcquireValue(void* value){ return (IPB_Value*)session->AcquireValue((IPB_Value*) value); } void* AcquireArrayItemValue(void* arr, AV* dim_array){ long * dim = __AV2LongPtrPtr( dim_array ); IPB_Value* retval = session->AcquireArrayItemValue((pbarray) arr, dim); Safefree( dim ); return retval; } void SetValue(void* dest, void* src){ session->SetValue((IPB_Value*) dest, (IPB_Value*) src); } void SetArrayItemValue(void* arr, AV* dim_array, void* src){ long * dim = __AV2LongPtrPtr( dim_array ); session->SetArrayItemValue((pbarray) arr, dim, (IPB_Value*) src); Safefree( dim ); } void ReleaseValue(void* value){ session->ReleaseValue((IPB_Value*) value); } void SetProp(char* name, void* data){ session->SetProp(name, data); } void* GetProp(char* name){ return (void*)session->GetProp(name); } void RemoveProp(char* name){ session->RemoveProp(name); } short ProcessPBMessage(){ return (short)session->ProcessPBMessage(); } long GetEnumItemValue(char* enumName, char* enumItemName){ return (long)session->GetEnumItemValue(enumName, enumItemName); } char* GetEnumItemName(char* enumName, long enumItemValue){ return (char*)session->GetEnumItemName(enumName, enumItemValue); } void* GetPBAnyField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; IPB_Value* res = (IPB_Value*)session->GetPBAnyField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetPBAnySharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; IPB_Value* res = (IPB_Value*)session->GetPBAnySharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetPBAnyGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; IPB_Value* res = (IPB_Value*)session->GetPBAnyGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } void* GetPBAnyArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); IPB_Value* res = (IPB_Value*)session->GetPBAnyArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } void* CreateResultSet(void* rs){ return (pbobject)session->CreateResultSet((IPB_ResultSetAccessor*) rs); } IPB_ResultSetAccessor* GetResultSetAccessor(void* rs){ return (IPB_ResultSetAccessor*)session->GetResultSetAccessor((pbobject) rs); } void ReleaseResultSetAccessor(void* rs){ session->ReleaseResultSetAccessor((IPB_ResultSetAccessor*) rs); } short RestartRequested(){ return (short)session->RestartRequested(); } short HasPBVisualObject(){ return (short)session->HasPBVisualObject(); } void SetDebugTrace(char* traceFile){ session->SetDebugTrace(traceFile); } //********************************************************** // Begin of the new type BYTE //********************************************************** long AddByteArgument(void *ci, unsigned char value, short isNull=FALSE){ return (long)session->AddByteArgument((PBCallInfo *)ci, value, isNull); } unsigned short GetByteField(void* obj, unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetByteField((pbobject) obj, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long SetByteField(void* obj, unsigned short fid, unsigned char value){ return (long)session->SetByteField((pbobject) obj, fid, value); } unsigned short GetByteSharedVar(void* group, unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetByteSharedVar((pbgroup) group, fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long SetByteSharedVar(void* group, unsigned short fid, unsigned char value){ return (long)session->SetByteSharedVar((pbgroup) group, fid, value); } unsigned short GetByteGlobalVar(unsigned short fid, SV* isNullsv){ short isNull; unsigned short res = (unsigned short)session->GetByteGlobalVar( fid, isNull); sv_setpviv( isNullsv, isNull ); return res; } long SetByteGlobalVar(unsigned short fid, unsigned char value){ return (long)session->SetByteGlobalVar( fid, value); } unsigned short GetByteArrayItem(void* array, AV* dim_array, SV* isNullsv){ short isNull; long * dim = __AV2LongPtrPtr( dim_array ); unsigned short res = (unsigned short)session->GetByteArrayItem((pbarray) array, dim, isNull); sv_setpviv( isNullsv, isNull ); Safefree( dim ); return res; } long SetByteArrayItem(void* array, AV* dim_array, unsigned short v){ long * dim = __AV2LongPtrPtr( dim_array ); long retval = (long)session->SetByteArrayItem((pbarray) array, dim, (unsigned char)v); Safefree( dim ); return retval; } //********************************************************** // End of the new type BYTE //********************************************************** bool doesScalarContainNumber(SV* sv ){ return SvNIOK( sv ); } private: HINSTANCE i_hinst; P_PB_GetVM getvm; IPB_VM* pbvm; IPB_Session* i_session; bool i_injected; };
[ "famille.georges@42a76a22-5c2f-11de-a2a3-1fafad8a8996" ]
[ [ [ 1, 1607 ] ] ]
a34b52fefdf9eba39cf8c9861bde83adcabc76ac
ad80c85f09a98b1bfc47191c0e99f3d4559b10d4
/code/src/nemesis/node_collideshapes.cc
9b77e4796d0c4c96c12a4b94e2e1e46d8239a243
[]
no_license
DSPNerd/m-nebula
76a4578f5504f6902e054ddd365b42672024de6d
52a32902773c10cf1c6bc3dabefd2fd1587d83b3
refs/heads/master
2021-12-07T18:23:07.272880
2009-07-07T09:47:09
2009-07-07T09:47:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
19,891
cc
#define N_IMPLEMENTS nOdeCollideShapes #include "nemesis/node_physics.h" #include "nemesis/node_collideshapes.h" #include "nemesis/node_collideobject.h" #include "gfx/ngfxserver.h" #include "mathlib/plane2.h" // DEFINES FOR ODE #define dSINGLE 1 // includes #include "ode/ode.h" #define MYMAX(a,b) ( (a) > (b) ? (a) : (b) ) // // Describes A Spherical ODE Shape by expanding on the // base nCollideShape's spherical properties. All other // collision shapes for ODE subclass this class. // nOdeSphereCollideShape::~nOdeSphereCollideShape() { } void nOdeSphereCollideShape::Visualize(nGfxServer *gs) { // Spherical representations are handled by the context // which can be confusing, so I overlay a purple one // to distinguish the two.. gs->Begin(N_PTYPE_LINE_LIST); gs->Rgba(0.4f,0.4f,0.4f,0.3f); // render the objects radii float radius = GetRadius(); int dim; float dr = n_deg2rad(10.0f); for (dim=0; dim<3; dim++) { float r; for (r=0.0f; r<n_deg2rad(360.0f); r+=dr) { float sin_r0 = (float) sin(r); float cos_r0 = (float) cos(r); float sin_r1 = (float) sin(r+dr); float cos_r1 = (float) cos(r+dr); vector3 v0_x(0.5f, sin_r0*radius, cos_r0*radius); vector3 v1_x(0.5f, sin_r1*radius, cos_r1*radius); vector3 v00_x(-0.5f, sin_r0*radius, cos_r0*radius); vector3 v11_x(-0.5f, sin_r1*radius, cos_r1*radius); vector3 v0_y(sin_r0*radius, 0.5f, cos_r0*radius); vector3 v1_y(sin_r1*radius, 0.5f, cos_r1*radius); vector3 v00_y(sin_r0*radius, -0.5f, cos_r0*radius); vector3 v11_y(sin_r1*radius, -0.5f, cos_r1*radius); vector3 v0_z(sin_r0*radius, cos_r0*radius, -0.5f); vector3 v1_z(sin_r1*radius, cos_r1*radius, -0.5f); vector3 v00_z(sin_r0*radius, cos_r0*radius, 0.5f); vector3 v11_z(sin_r1*radius, cos_r1*radius, 0.5f); gs->Coord(v0_x.x,v0_x.y,v0_x.z); gs->Coord(v1_x.x,v1_x.y,v1_x.z); gs->Coord(v00_x.x,v00_x.y,v00_x.z); gs->Coord(v11_x.x,v11_x.y,v11_x.z); gs->Coord(v0_y.x,v0_y.y,v0_y.z); gs->Coord(v1_y.x,v1_y.y,v1_y.z); gs->Coord(v00_y.x,v00_y.y,v00_y.z); gs->Coord(v11_y.x,v11_y.y,v11_y.z); gs->Coord(v0_z.x,v0_z.y,v0_z.z); gs->Coord(v1_z.x,v1_z.y,v1_z.z); gs->Coord(v00_z.x,v00_z.y,v00_z.z); gs->Coord(v11_z.x,v11_z.y,v11_z.z); } } gs->End(); } // Build the ODE object based on the information known for this subclass. // Since we can share this class among many nCollideObjects, we don't hold // the information locally, but instead let the nCollideObject ask for this // data. That way one shape can still feed MANY objects. dGeomID nOdeSphereCollideShape::buildOdeObject() { return(dCreateSphere( 0, GetRadius())); } // Uses mass information to build a proper mass object for this kind of shape void nOdeSphereCollideShape::buildOdeMass( dMass *mass ) { if (!myOverrideDefaultMass) { dMassSetSphere( mass, myDensity, this->GetRadius() ); } else { dMassSetParameters( mass, myMass, myCenter.x, myCenter.y, myCenter.z, myInertia.M11, myInertia.M22, myInertia.M33, myInertia.M12, myInertia.M13, myInertia.M23 ); } } void nOdeSphereCollideShape::Begin( int numv, int numt) { nCollideShape::Begin( numv, numt ); } void nOdeSphereCollideShape::SetVertex(int id, vector3& v0) { nCollideShape::SetVertex( id, v0); myAab.extendToFit( v0 ); } void nOdeSphereCollideShape::SetTriangle(int id, int v0, int v1, int v2) { nCollideShape::SetTriangle( id, v0, v1, v2 ); } void nOdeSphereCollideShape::End() { nCollideShape::End(); float theBoxSides[3]; theBoxSides[0] = fabs(myAab[3] - myAab[0]); theBoxSides[1] = fabs(myAab[4] - myAab[1]); theBoxSides[2] = fabs(myAab[5] - myAab[2]); if (myUseComputedCenter) { // Set the radius by the box, not the distance from vertex to 0/0/0 myMatrix.M41 = myAab[3] + ( theBoxSides[0] * 0.5 ); myMatrix.M42 = myAab[4] + ( theBoxSides[1] * 0.5 ); myMatrix.M43 = myAab[5] + ( theBoxSides[2] * 0.5 ); // vector3 test( myMatrix.pos_component() - myAab.boxMax ); // myRadius = test.getLength(); } // radius = MYMAX( theBoxSides[0], theBoxSides[1]); // radius = MYMAX( radius, theBoxSides[2] ); // radius *= 0.5; } /****************************************************************************************** Box Lunch ******************************************************************************************/ nOdeBoxCollideShape::~nOdeBoxCollideShape() { } void nOdeBoxCollideShape::Visualize(nGfxServer *gs) { // visualize the box gs->Begin(N_PTYPE_LINE_LIST); gs->Rgba(0.4f,0.4f,0.4f,0.3f); float x2 = fabs(myBoxSides[0]) *.5f; float y2 = fabs(myBoxSides[1]) *.5f; float z2 = fabs(myBoxSides[2]) *.5f; gs->Coord( -x2, -y2, -z2); gs->Coord(-x2, y2, -z2); gs->Coord( -x2, y2, -z2); gs->Coord( x2, y2, -z2); gs->Coord( x2, y2, -z2); gs->Coord( x2,-y2, -z2); gs->Coord( x2, -y2, -z2); gs->Coord(-x2,-y2, -z2); gs->Coord( -x2, -y2, z2); gs->Coord(-x2, y2, z2); gs->Coord( -x2, y2, z2); gs->Coord( x2, y2, z2); gs->Coord( x2, y2, z2); gs->Coord( x2,-y2, z2); gs->Coord( x2, -y2, z2); gs->Coord(-x2,-y2, z2); gs->Coord( -x2, -y2, -z2); gs->Coord(-x2, -y2, z2); gs->Coord( x2, -y2, -z2); gs->Coord( x2, -y2, z2); gs->Coord( x2, y2, -z2); gs->Coord( x2, y2, z2); gs->Coord( -x2, y2, -z2); gs->Coord(-x2, y2, z2); gs->End(); } void nOdeBoxCollideShape::setBoundingBox(float length, float width, float height) { myBoxSides[0] = length; myBoxSides[1] = width; myBoxSides[2] = height; float radius = GetRadius(); for (int i=0; i < 3; i++) { if (radius < DIST_EPSILON + myBoxSides[i] * 0.5f ) radius = DIST_EPSILON + myBoxSides[i] * 0.5f; } // Initialize the radius of the object vector3 v = vector3(0.0f, radius, 0.0f ); SetVertex(0, v); isBoxInitialized = true; } // Build the ODE object based on the information known for this subclass. // Since we can share this class among many nCollideObjects, we don't hold // the information locally, but instead let the nCollideObject ask for this // data. That way one shape can still feed MANY objects. dGeomID nOdeBoxCollideShape::buildOdeObject() { return( dCreateBox( 0, myBoxSides[0], myBoxSides[1], myBoxSides[2])); } // Uses mass information to build a proper mass object for this kind of shape void nOdeBoxCollideShape::buildOdeMass( dMass *mass ) { if (!myOverrideDefaultMass) { dMassSetBox( mass, myDensity, myBoxSides[0], myBoxSides[1], myBoxSides[2] ); } else { dMassSetParameters( mass, myMass, myCenter.x, myCenter.y, myCenter.z, myInertia.M11, myInertia.M22, myInertia.M33, myInertia.M12, myInertia.M13, myInertia.M23 ); } } void nOdeBoxCollideShape::End() { nCollideShape::End(); myBoxSides[0] = fabs(myAab[3] - myAab[0]); myBoxSides[1] = fabs(myAab[4] - myAab[1]); myBoxSides[2] = fabs(myAab[5] - myAab[2]); if (myUseComputedCenter) { // Set the radius by the box, not the distance from vertex to 0/0/0 myMatrix.M41 = myAab[3] + ( myBoxSides[0] * 0.5 ); myMatrix.M42 = myAab[4] + ( myBoxSides[1] * 0.5 ); myMatrix.M43 = myAab[5] + ( myBoxSides[2] * 0.5 ); } // Eek vector3 test( myMatrix.pos_component() - myAab.boxMax ); SetVertex(0, test ); } /****************************************************************************************** Cylindrical Seas ******************************************************************************************/ nOdeCylinderCollideShape::~nOdeCylinderCollideShape() { } void nOdeCylinderCollideShape::Visualize(nGfxServer *gs) { // ze the Cylinder gs->Begin(N_PTYPE_LINE_LIST); gs->Rgba(0.4f,0.4f,0.4f,0.3f); float halfHeight = myCylHeight * .5; float dr = n_deg2rad(360.0f / (float)48); for (float r = 0.0f; r < n_deg2rad(360.0f); r += dr) { float sin_r0 = (float) sin(r); float cos_r0 = (float) cos(r); float sin_r1 = (float) sin(r + dr); float cos_r1 = (float) cos(r + dr); vector3 v0_y(sin_r0 * myCylRadius, 0.0f, cos_r0 * myCylRadius); vector3 v1_y(sin_r1 * myCylRadius, 0.0f, cos_r1 * myCylRadius); v0_y.y -= halfHeight; v1_y.y -= halfHeight; gs->Coord(v0_y.x,v0_y.z,v0_y.y); gs->Coord(v1_y.x,v1_y.z,v1_y.y); gs->Coord(v0_y.x,v0_y.z,v0_y.y); v0_y.y += myCylHeight; v1_y.y += myCylHeight; gs->Coord(v0_y.x,v0_y.z,v0_y.y); gs->Coord(v0_y.x,v0_y.z,v0_y.y); gs->Coord(v1_y.x,v1_y.z,v1_y.y); } gs->Coord(0, 0, -myCylHeight * .50); gs->Coord(0, 0, myCylHeight * .50); // render the objects endcap int dim; for (dim=0; dim<3; dim++) { float r; for (r=n_deg2rad(-90.0f); r<n_deg2rad(90.0f); r+=dr) { float sin_r0 = (float) sin(r); float cos_r0 = (float) cos(r); float sin_r1 = (float) sin(r+dr); float cos_r1 = (float) cos(r+dr); vector3 v0_x(0.0f, sin_r0*this->myCylRadius, cos_r0*this->myCylRadius); vector3 v1_x(0.0f, sin_r1*this->myCylRadius, cos_r1*this->myCylRadius); vector3 v0_y(sin_r0*this->myCylRadius, 0.0f, cos_r0*this->myCylRadius); vector3 v1_y(sin_r1*this->myCylRadius, 0.0f, cos_r1*this->myCylRadius); gs->Coord(v0_x.x,v0_x.y,v0_x.z+halfHeight); gs->Coord(v1_x.x,v1_x.y,v1_x.z+halfHeight); gs->Coord(v0_y.x,v0_y.y,v0_y.z+halfHeight); gs->Coord(v1_y.x,v1_y.y,v1_y.z+halfHeight); } } // render the objects endcap for (dim=0; dim<3; dim++) { float r; for (r=n_deg2rad(90.0f); r<n_deg2rad(270.0f); r+=dr) { float sin_r0 = (float) sin(r); float cos_r0 = (float) cos(r); float sin_r1 = (float) sin(r+dr); float cos_r1 = (float) cos(r+dr); vector3 v0_x(0.0f, sin_r0*this->myCylRadius, cos_r0*this->myCylRadius); vector3 v1_x(0.0f, sin_r1*this->myCylRadius, cos_r1*this->myCylRadius); vector3 v0_y(sin_r0*this->myCylRadius, 0.0f, cos_r0*this->myCylRadius); vector3 v1_y(sin_r1*this->myCylRadius, 0.0f, cos_r1*this->myCylRadius); gs->Coord(v0_x.x,v0_x.y,v0_x.z-halfHeight); gs->Coord(v1_x.x,v1_x.y,v1_x.z-halfHeight); gs->Coord(v0_y.x,v0_y.y,v0_y.z-halfHeight); gs->Coord(v1_y.x,v1_y.y,v1_y.z-halfHeight); } } gs->End(); } void nOdeCylinderCollideShape::End() { nCollideShape::End(); float theBoxSides[3]; theBoxSides[0] = fabs(myAab[3] - myAab[0]); theBoxSides[1] = fabs(myAab[4] - myAab[1]); theBoxSides[2] = fabs(myAab[5] - myAab[2]); vector3 test( myMatrix.pos_component() - myAab.boxMax ); myCylRadius = MYMAX( theBoxSides[1], theBoxSides[2]) * .5; myCylHeight = theBoxSides[2]; } // Build the ODE object based on the information known for this subclass. // Since we can share this class among many nCollideObjects, we don't hold // the information locally, but instead let the nCollideObject ask for this // data. That way one shape can still feed MANY objects. dGeomID nOdeCylinderCollideShape::buildOdeObject() { return( dCreateCCylinder( 0, myCylRadius, myCylHeight) ); } // Uses mass information to build a proper mass object for this kind of shape void nOdeCylinderCollideShape::buildOdeMass( dMass *mass ) { if (!myOverrideDefaultMass) { dMassSetCappedCylinder( mass, myDensity, myDirection, myCylRadius, myCylHeight ); } else { dMassSetParameters( mass, myMass, myCenter.x, myCenter.y, myCenter.z, myInertia.M11, myInertia.M22, myInertia.M33, myInertia.M12, myInertia.M13, myInertia.M23 ); } } /****************************************************************************************** Planar Myalgia ******************************************************************************************/ nOdePlaneCollideShape::~nOdePlaneCollideShape() { delete myPlane; } void nOdePlaneCollideShape::setPlane( Plane p ) { // n_assert( myCollisionType == TEST_PLANE ); myPlane = new Plane( p ); vector3 v(0.0f, 1000.0f, 0.0f); // Sets the radius.. bleah SetVertex(0, v ); isPlaneInitialized = true; } void nOdePlaneCollideShape::Visualize(nGfxServer *gs) { // Uhmm -- given a normal, how does one get the Plane? // // It seems easy, since the normal is perpendicular to the // Plane, and we have a distance, but... I don't seem to // know the equation. // // Looks like Plane.makeWinding() may do it! gs->Begin(N_PTYPE_LINE_LIST); Winding w; float size = myPlane->getDistance(); myPlane->makeWinding( gs->clip_maxz / 2.0, w); gs->Rgba(0.4f,0.4f,0.4f,0.3f); gs->Coord( w[0].position.x, w[0].position.y, w[0].position.z ); gs->Coord( w[1].position.x, w[1].position.y, w[1].position.z ); gs->Coord( w[1].position.x, w[1].position.y, w[1].position.z ); gs->Coord( w[2].position.x, w[2].position.y, w[2].position.z ); gs->Coord( w[2].position.x, w[2].position.y, w[2].position.z ); gs->Coord( w[0].position.x, w[0].position.y, w[0].position.z ); gs->Coord( w[0].position.x, w[0].position.y, w[0].position.z ); gs->Coord( w[3].position.x, w[3].position.y, w[3].position.z ); gs->Coord( w[3].position.x, w[3].position.y, w[3].position.z ); gs->Coord( w[2].position.x, w[2].position.y, w[2].position.z ); gs->Coord( w[2].position.x, w[2].position.y, w[2].position.z ); gs->Coord( w[1].position.x, w[1].position.y, w[1].position.z ); gs->Coord( w[1].position.x, w[1].position.y, w[1].position.z ); gs->Coord( w[3].position.x, w[3].position.y, w[3].position.z ); gs->End(); } // Build the ODE object based on the information known for this subclass. // Since we can share this class among many nCollideObjects, we don't hold // the information locally, but instead let the nCollideObject ask for this // data. That way one shape can still feed MANY objects. dGeomID nOdePlaneCollideShape::buildOdeObject() { vector3 normal = myPlane->getNormal(); return( dCreatePlane( 0, normal.x, normal.y, normal.z, myPlane->getDistance()) ); } // Uses mass information to build a proper mass object for this kind of shape void nOdePlaneCollideShape::buildOdeMass( dMass *mass ) { // Planes are massless entities for now. dMassSetZero( mass ); } /****************************************************************************************** TriList Liberty ******************************************************************************************/ nOdeTriListCollideShape::~nOdeTriListCollideShape() { } void nOdeTriListCollideShape::Visualize(nGfxServer *gs) { // Spherical representations are handled by the context // which can be confusing, so I overlay a purple one // to distinguish the two.. gs->Begin(N_PTYPE_LINE_LIST); int face = 0; for( int i = 0; i < numIndices; i += 3, face++) { if (testFaces.find(face) != testFaces.end()) gs->Rgba(1.0f,1.0f,0.0f,0.3f); else if (hitFaces.find(face) != hitFaces.end() || (lastHitFace == face) ) gs->Rgba(1.0f,0.0f,0.0f,0.3f); else gs->Rgba(0.4f,0.4f,0.4f,0.3f); gs->Coord(myVertices[myIndices[i]].x,myVertices[myIndices[i]].y,myVertices[myIndices[i]].z); gs->Coord(myVertices[myIndices[i+1]].x,myVertices[myIndices[i+1]].y,myVertices[myIndices[i+1]].z); gs->Coord(myVertices[myIndices[i+1]].x,myVertices[myIndices[i+1]].y,myVertices[myIndices[i+1]].z); gs->Coord(myVertices[myIndices[i+2]].x,myVertices[myIndices[i+2]].y,myVertices[myIndices[i+2]].z); gs->Coord(myVertices[myIndices[i+2]].x,myVertices[myIndices[i+2]].y,myVertices[myIndices[i+2]].z); gs->Coord(myVertices[myIndices[i]].x,myVertices[myIndices[i]].y,myVertices[myIndices[i]].z); } gs->End(); testFaces.clear(); hitFaces.clear(); } // Build the ODE object based on the information known for this subclass. // Since we can share this class among many nCollideObjects, we don't hold // the information locally, but instead let the nCollideObject ask for this // data. That way one shape can still feed MANY objects. dGeomID nOdeTriListCollideShape::buildOdeObject() { // If dTriCallBack or dTriArrayCallback are null, it is ok dGeomID id = dCreateTriList( 0, &dTriCallback, &dTriArrayCallback, &dTriHitCallback/*myTriRayCallback*/ ); int vertexStride = sizeof(dcVector3); int indexStride = sizeof(int); int triStride = 3*sizeof(int); dGeomTriListBuild( id, myVertices, vertexStride, numVertices, myIndices, indexStride, numIndices, triStride ); return(id); } // Uses mass information to build a proper mass object for this kind of shape void nOdeTriListCollideShape::buildOdeMass( dMass *mass ) { if (!myOverrideDefaultMass) { dMassSetSphere( mass, myDensity, this->GetRadius() ); } else { dMassSetParameters( mass, myMass, myCenter.x, myCenter.y, myCenter.z, myInertia.M11, myInertia.M22, myInertia.M33, myInertia.M12, myInertia.M13, myInertia.M23 ); } } void nOdeTriListCollideShape::Begin( int numv, int numt) { myVertices = new dcVector3[ numv ]; numVertices = numv; myIndices = new int[numt * 3]; numIndices = numt * 3; nCollideShape::Begin( numv, numt ); } void nOdeTriListCollideShape::SetVertex(int id, vector3& v0) { memcpy(&myVertices[id], &v0, sizeof(dVector3)); nCollideShape::SetVertex( id, v0); myAab.extendToFit( v0 ); } void nOdeTriListCollideShape::SetTriangle(int id, int v0, int v1, int v2) { int base = id * 3; myIndices[ base ] = v0; myIndices[ base + 1] = v1; myIndices[ base + 2] = v2; nCollideShape::SetTriangle( id, v0, v1, v2 ); } void nOdeTriListCollideShape::End() { nCollideShape::End(); float theBoxSides[3]; theBoxSides[0] = fabs(myAab[3] - myAab[0]); theBoxSides[1] = fabs(myAab[4] - myAab[1]); theBoxSides[2] = fabs(myAab[5] - myAab[2]); if (myUseComputedCenter) { myMatrix.M41 = myAab[3] + ( theBoxSides[0] * 0.5 ); myMatrix.M42 = myAab[4] + ( theBoxSides[1] * 0.5 ); myMatrix.M43 = myAab[5] + ( theBoxSides[2] * 0.5 ); } } void nOdeTriListCollideShape::setTestFaces( const int *faces, int numFaces ) { for (int i = 0; i < numFaces; i++ ) { testFaces.insert( faces[i] ); } } void nOdeTriListCollideShape::setHitFace( int face ) { if (testFaces.find( face ) != testFaces.end()) testFaces.erase( face ); hitFaces.insert( face ); lastHitFace = face; } void nOdeTriListCollideShape::dTriArrayCallback(dGeomID TriList, dGeomID RefObject, const int* TriIndices, int TriCount) { nOdeTriListCollideShape *self = (nOdeTriListCollideShape *)((nOdeCollideObject *)dGeomGetData(TriList))->GetShape(); self->setTestFaces( TriIndices, TriCount ); } int nOdeTriListCollideShape::myTriRayCallback(dGeomID TriList, dGeomID Ray, int TriangleIndex, dReal u, dReal v) { // nlin - copied from outdated dTriHitCallback - hope it is correct nOdeTriListCollideShape *self = (nOdeTriListCollideShape *)((nOdeCollideObject *)dGeomGetData(TriList))->GetShape(); self->setHitFace( TriangleIndex ); } void nOdeTriListCollideShape::dTriHitCallback(dGeomID TriList, dGeomID RefObject, int TriIndex) { nOdeTriListCollideShape *self = (nOdeTriListCollideShape *)((nOdeCollideObject *)dGeomGetData(TriList))->GetShape(); self->setHitFace( TriIndex ); } int nOdeTriListCollideShape::dTriCallback(dGeomID TriList, dGeomID RefObject, int TriangleIndex) { return 1; }
[ "plushe@411252de-2431-11de-b186-ef1da62b6547" ]
[ [ [ 1, 597 ] ] ]
f99272695edcec6a1af6701a90384817f65db83d
d6dbf57842d0b5121b3ece85f7b8ffc195519d51
/OgreMax/Version.cpp
9ec6a7221ffd0740232bb8c0070272f6c6d2184f
[]
no_license
tunnuz/cel-language
3f0baddaa04a51afa10cf2fed4a47f4c93bb28a8
afaa3f201d56c33099e7787b1613daeab21cf027
refs/heads/master
2020-05-18T12:55:56.785687
2010-07-06T12:51:15
2010-07-06T12:51:15
32,117,063
0
0
null
null
null
null
UTF-8
C++
false
false
3,530
cpp
/* * OgreMaxViewer - An Ogre 3D-based viewer for .scene and .mesh files * Copyright 2008 Derek Nedelman * * This code is available under the OgreMax Free License: * -You may use this code for any purpose, commercial or non-commercial. * -If distributing derived works (that use this source code) in binary or source code form, * you must give the following credit in your work's end-user documentation: * "Portions of this work provided by OgreMax (www.ogremax.com)" * * Derek Nedelman assumes no responsibility for any harm caused by using this code. * * OgreMaxViewer was written by Derek Nedelman and released at www.ogremax.com */ //Includes--------------------------------------------------------------------- #include "Version.hpp" #include <OgreStringConverter.h> using namespace Ogre; using namespace OgreMax; //Implementation--------------------------------------------------------------- Version::Version() { for (int index = 0; index < MAX_COMPONENTS; index++) this->components[index] = 0; } Version::Version(int major, int minor, int patch) { this->components[MAJOR] = major; this->components[MINOR] = minor; this->components[PATCH] = patch; } Version::Version(const String& version) { size_t length = version.length(); size_t offset = 0; size_t foundAt; String component; int index = 0; while (index < MAX_COMPONENTS && offset < length) { //Extract the current component foundAt = version.find('.', offset); component = version.substr(offset); this->components[index++] = StringConverter::parseInt(component); //Break out if there is no next '.' if (foundAt == String::npos) break; //Move past the next '.' offset = foundAt + 1; } for (; index < MAX_COMPONENTS; index++) this->components[index] = 0; } int Version::GetMajor() const { return this->components[MAJOR]; } int Version::GetMinor() const { return this->components[MINOR]; } int Version::GetPatch() const { return this->components[PATCH]; } void Version::ToString(String& text) const { StringUtil::StrStreamType versionText; //Find the last non-zero component int lastNonzeroComponent = -1; for (int index = MAX_COMPONENTS - 1; index >= 0; index--) { if (this->components[index] != 0) { lastNonzeroComponent = index; break; } } //Output everything up to the last non-zero component if (lastNonzeroComponent >= 0) { for (int index = 0; index <= lastNonzeroComponent; index++) { versionText << this->components[index]; if (index < lastNonzeroComponent) versionText << "."; } } else { //All components are zero versionText << "0"; } text = versionText.str(); } String Version::ToString() const { String text; ToString(text); return text; } int Version::ToInt() const { int version = 0; int multiplier = 1; for (int index = 0; index < MAX_COMPONENTS; index++) { version += this->components[index] * multiplier; multiplier *= 100; } return version; } int Version::Compare(const Version& version1, const Version& version2) { return version1.ToInt() - version2.ToInt(); }
[ "tunnuz@5541800f-1273-12b8-a6ef-86c1fc29b7c3" ]
[ [ [ 1, 137 ] ] ]
f95a7dc92db0d6c0748121b91cd47685e609b5c8
4a99fa98abd0285bc3b5671f237b932114123340
/physics/LinearMath/btTransform.h
6ed43be8438e22604d8baef70bddc403332c7766
[]
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
8,047
h
/* Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef btTransform_H #define btTransform_H #include "btMatrix3x3.h" /**@brief The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear. *It can be used in combination with btVector3, btQuaternion and btMatrix3x3 linear algebra classes. */ class btTransform { ///Storage for the rotation btMatrix3x3 m_basis; ///Storage for the translation btVector3 m_origin; public: /**@brief No initialization constructor */ btTransform() {} /**@brief Constructor from btQuaternion (optional btVector3 ) * @param q Rotation from quaternion * @param c Translation from Vector (default 0,0,0) */ explicit SIMD_FORCE_INLINE btTransform(const btQuaternion& q, const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) : m_basis(q), m_origin(c) {} /**@brief Constructor from btMatrix3x3 (optional btVector3) * @param b Rotation from Matrix * @param c Translation from Vector default (0,0,0)*/ explicit SIMD_FORCE_INLINE btTransform(const btMatrix3x3& b, const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) : m_basis(b), m_origin(c) {} /**@brief Copy constructor */ SIMD_FORCE_INLINE btTransform (const btTransform& other) : m_basis(other.m_basis), m_origin(other.m_origin) { } /**@brief Assignment Operator */ SIMD_FORCE_INLINE btTransform& operator=(const btTransform& other) { m_basis = other.m_basis; m_origin = other.m_origin; return *this; } /**@brief Set the current transform as the value of the product of two transforms * @param t1 Transform 1 * @param t2 Transform 2 * This = Transform1 * Transform2 */ SIMD_FORCE_INLINE void mult(const btTransform& t1, const btTransform& t2) { m_basis = t1.m_basis * t2.m_basis; m_origin = t1(t2.m_origin); } /* void multInverseLeft(const btTransform& t1, const btTransform& t2) { btVector3 v = t2.m_origin - t1.m_origin; m_basis = btMultTransposeLeft(t1.m_basis, t2.m_basis); m_origin = v * t1.m_basis; } */ /**@brief Return the transform of the vector */ SIMD_FORCE_INLINE btVector3 operator()(const btVector3& x) const { return btVector3(m_basis[0].dot(x) + m_origin.x(), m_basis[1].dot(x) + m_origin.y(), m_basis[2].dot(x) + m_origin.z()); } /**@brief Return the transform of the vector */ SIMD_FORCE_INLINE btVector3 operator*(const btVector3& x) const { return (*this)(x); } /**@brief Return the transform of the btQuaternion */ SIMD_FORCE_INLINE btQuaternion operator*(const btQuaternion& q) const { return getRotation() * q; } /**@brief Return the basis matrix for the rotation */ SIMD_FORCE_INLINE btMatrix3x3& getBasis() { return m_basis; } /**@brief Return the basis matrix for the rotation */ SIMD_FORCE_INLINE const btMatrix3x3& getBasis() const { return m_basis; } /**@brief Return the origin vector translation */ SIMD_FORCE_INLINE btVector3& getOrigin() { return m_origin; } /**@brief Return the origin vector translation */ SIMD_FORCE_INLINE const btVector3& getOrigin() const { return m_origin; } /**@brief Return a quaternion representing the rotation */ btQuaternion getRotation() const { btQuaternion q; m_basis.getRotation(q); return q; } /**@brief Set from an array * @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */ void setFromOpenGLMatrix(const btScalar *m) { m_basis.setFromOpenGLSubMatrix(m); m_origin.setValue(m[12],m[13],m[14]); } /**@brief Fill an array representation * @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */ void getOpenGLMatrix(btScalar *m) const { m_basis.getOpenGLSubMatrix(m); m[12] = m_origin.x(); m[13] = m_origin.y(); m[14] = m_origin.z(); m[15] = btScalar(1.0); } /**@brief Set the translational element * @param origin The vector to set the translation to */ SIMD_FORCE_INLINE void setOrigin(const btVector3& origin) { m_origin = origin; } SIMD_FORCE_INLINE btVector3 invXform(const btVector3& inVec) const; /**@brief Set the rotational element by btMatrix3x3 */ SIMD_FORCE_INLINE void setBasis(const btMatrix3x3& basis) { m_basis = basis; } /**@brief Set the rotational element by btQuaternion */ SIMD_FORCE_INLINE void setRotation(const btQuaternion& q) { m_basis.setRotation(q); } /**@brief Set this transformation to the identity */ void setIdentity() { m_basis.setIdentity(); m_origin.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); } /**@brief Multiply this Transform by another(this = this * another) * @param t The other transform */ btTransform& operator*=(const btTransform& t) { m_origin += m_basis * t.m_origin; m_basis *= t.m_basis; return *this; } /**@brief Return the inverse of this transform */ btTransform inverse() const { btMatrix3x3 inv = m_basis.transpose(); return btTransform(inv, inv * -m_origin); } /**@brief Return the inverse of this transform times the other transform * @param t The other transform * return this.inverse() * the other */ btTransform inverseTimes(const btTransform& t) const; /**@brief Return the product of this transform and the other */ btTransform operator*(const btTransform& t) const; /**@brief Return an identity transform */ static const btTransform& getIdentity() { static const btTransform identityTransform(btMatrix3x3::getIdentity()); return identityTransform; } void serialize(struct btTransformData& dataOut) const; void deSerialize(const struct btTransformData& dataIn); }; SIMD_FORCE_INLINE btVector3 btTransform::invXform(const btVector3& inVec) const { btVector3 v = inVec - m_origin; return (m_basis.transpose() * v); } SIMD_FORCE_INLINE btTransform btTransform::inverseTimes(const btTransform& t) const { btVector3 v = t.getOrigin() - m_origin; return btTransform(m_basis.transposeTimes(t.m_basis), v * m_basis); } SIMD_FORCE_INLINE btTransform btTransform::operator*(const btTransform& t) const { return btTransform(m_basis * t.m_basis, (*this)(t.m_origin)); } /**@brief Test if two transforms have all elements equal */ SIMD_FORCE_INLINE bool operator==(const btTransform& t1, const btTransform& t2) { return ( t1.getBasis() == t2.getBasis() && t1.getOrigin() == t2.getOrigin() ); } ///for serialization struct btTransformData { btMatrix3x3Data m_basis; btVector3Data m_origin; }; SIMD_FORCE_INLINE void btTransform::serialize(btTransformData& dataOut) const { m_basis.serialize(dataOut.m_basis); m_origin.serialize(dataOut.m_origin); } SIMD_FORCE_INLINE void btTransform::deSerialize(const btTransformData& dataIn) { m_basis.deSerialize(dataIn.m_basis); m_origin.deSerialize(dataIn.m_origin); } #endif
[ [ [ 1, 265 ] ] ]
fe32f64382ce52d6623159641b72c44812d6970d
82e8d2fca1858c076ea1593ed0364583356789dd
/CCoverageHandler.h
b21686d7ae242b73628653d932953f1ee8b39a0b
[]
no_license
slogic/E323AI
1ddbf179d1edaf49c460a2726f21794ceb39f141
dfd540283198b12b3d70907e279df33843c1ac99
refs/heads/master
2021-01-18T12:20:39.082252
2011-01-09T18:37:11
2011-01-09T18:37:11
489,916
0
0
null
null
null
null
UTF-8
C++
false
false
1,975
h
#ifndef E323_CCOVERAGEHANDLER_H #define E323_CCOVERAGEHANDLER_H #include <string> #include <map> #include "CCoverageCell.h" class ARegistrar; class CUnit; class CCoverageHandler: ARegistrar { public: CCoverageHandler(AIClasses* _ai): ai(_ai) { visualizationEnabled = false; } ~CCoverageHandler() {} /* Register unit */ void addUnit(CUnit* unit); /* Get closest build site */ float3 getNextClosestBuildSite(const CUnit* builder, UnitType* toBuild); /* Get the most valuable build site */ float3 getNextImportantBuildSite(UnitType* toBuild); float3 getClosestDefendedPos(float3& pos) const; /* Not implemented */ float3 getBestDefendedPos(float safetyLevel = 0.0f) const; /* Update call */ void update(); /* Overloaded */ void remove(ARegistrar& obj); float getCoreRange(CCoverageCell::NType type, UnitType* ut); /* Get number of cores in a layer */ int getLayerSize(CCoverageCell::NType layer); /* Get coverage type which can be based upon units of this type */ CCoverageCell::NType getCoreType(const UnitType* ut) const; bool isUnitCovered(int uid, CCoverageCell::NType layer); ARegistrar::NType regtype() const { return ARegistrar::COVERAGE_HANDLER; } bool toggleVisualization(); protected: AIClasses* ai; private: bool visualizationEnabled; CCoverageCell::NType visualizationLayer; std::map<CCoverageCell::NType, std::list<CCoverageCell*> > layers; std::map<CCoverageCell::NType, std::map<int, CCoverageCell*> > unitsCoveredBy; std::map<int, CCoverageCell*> coreUnits; std::map<int, int> unitsCoveredCount; /* Update position using k-means clusterization method */ void updateBestBuildSite(UnitType* toBuild, float3& pos); /* Get list of units worth to cover by current layer */ std::map<int, CUnit*>* getScanList(CCoverageCell::NType layer) const; void addUncoveredUnits(CCoverageCell* c); void visualizeLayer(CCoverageCell::NType layer); }; #endif
[ [ [ 1, 66 ] ] ]
1f2bfc83a592258a2d0a755a2147e98646fc04db
33cdd09e352529963fe8b28b04e0d2e33483777b
/trunk/ReportAsistent/WaitDialog.h
f686680872350dd433dcf1f36447498abc5b431f
[]
no_license
BackupTheBerlios/reportasistent-svn
20e386c86b6990abafb679eeb9205f2aef1af1ac
209650c8cbb0c72a6e8489b0346327374356b57c
refs/heads/master
2020-06-04T16:28:21.972009
2010-05-18T12:06:48
2010-05-18T12:06:48
40,804,982
0
0
null
null
null
null
UTF-8
C++
false
false
5,283
h
#if !defined(AFX_WAITDIALOG_H__0B638672_B800_4827_965C_AA552188BC84__INCLUDED_) #define AFX_WAITDIALOG_H__0B638672_B800_4827_965C_AA552188BC84__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // WaitDialog.h : header file // /* This file is part of LM Report Asistent. Authors: Jan Dedek, Jan Kodym, Martin Chrz, Iva Bartunkova LM Report Asistent 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. LM Report Asistent 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 LM Report Asistent; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "WaitAnimation.h" ///////////////////////////////////////////////////////////////////////////// // CWaitDialog dialog /** * class CWaitDialog: Class of Wait Dialog, used for long time operations of LM-RA. * * @author */ class CWaitDialog : public CDialog { private: /** * struct SThreadPramas: * * @author */ struct SThreadPramas { HWND hWaitDlg; void * pUserFunction; int nParams; //number of prametrs LPARAM params[5]; } * m_pThreadPramas; public: // DoThreadFunction(WaitUserThreadFunction5 f, LPARAM Param1, LPARAM Param2, LPARAM Param3, LPARAM Param4, LPARAM Param5) /** * WaitUserThreadFunction0: */ typedef void (* WaitUserThreadFunction0) (); /** * WaitUserThreadFunction1: */ typedef void (* WaitUserThreadFunction1) (LPARAM Param1); /** * WaitUserThreadFunction2: */ typedef void (* WaitUserThreadFunction2) (LPARAM Param1, LPARAM Param2); /** * WaitUserThreadFunction3: */ typedef void (* WaitUserThreadFunction3) (LPARAM Param1, LPARAM Param2, LPARAM Param3); /** * WaitUserThreadFunction4: */ typedef void (* WaitUserThreadFunction4) (LPARAM Param1, LPARAM Param2, LPARAM Param3, LPARAM Param4); /** * WaitUserThreadFunction5: */ typedef void (* WaitUserThreadFunction5) (LPARAM Param1, LPARAM Param2, LPARAM Param3, LPARAM Param4, LPARAM Param5); // Construction public: /** * DoThreadFunction: * * @param f * @param Param1 * @param Param2 * @param Param3 * @param Param4 * @param Param5 * @return void */ void DoThreadFunction(WaitUserThreadFunction5 f, LPARAM Param1, LPARAM Param2, LPARAM Param3, LPARAM Param4, LPARAM Param5); /** * DoThreadFunction: * * @param f * @param Param1 * @param Param2 * @param Param3 * @param Param4 * @return void */ void DoThreadFunction(WaitUserThreadFunction4 f, LPARAM Param1, LPARAM Param2, LPARAM Param3, LPARAM Param4); /** * DoThreadFunction: * * @param f * @param Param1 * @param Param2 * @param Param3 * @return void */ void DoThreadFunction(WaitUserThreadFunction3 f, LPARAM Param1, LPARAM Param2, LPARAM Param3); /** * DoThreadFunction: * * @param f * @param Param1 * @param Param2 * @return void */ void DoThreadFunction(WaitUserThreadFunction2 f, LPARAM Param1, LPARAM Param2); /** * DoThreadFunction: * * @param f * @param Param1 * @return void */ void DoThreadFunction(WaitUserThreadFunction1 f, LPARAM Param1); /** * DoThreadFunction: * * @param f * @return void */ void DoThreadFunction(WaitUserThreadFunction0 f); /** * CWaitDialog: * * @param strDlgText * @param bShowKillButtons * @param pParent * @return */ CWaitDialog(LPCTSTR strDlgText, BOOL bShowKillButtons = TRUE, CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CWaitDialog) enum { IDD = IDD_WAIT_DIALOG }; CStatic m_ReasonText; CWaitAnimation m_wait_animation; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CWaitDialog) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: /** * DoThreadFunctionImpl: * * @param f * @return void */ void DoThreadFunctionImpl(void * f); // Generated message map functions //{{AFX_MSG(CWaitDialog) virtual BOOL OnInitDialog(); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnExitButton(); virtual void OnCancel(); afx_msg void OnKillThreadButton(); afx_msg void OnResumeAppButton(); afx_msg void OnDestroy(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: BOOL m_bShowKillButtons; UINT m_nTimer; CWinThread * m_pWorkerThread; static UINT ThreadControllingFunction( LPVOID pParam ); LPCTSTR m_strDlgText; BOOL m_bEndDialog; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_WAITDIALOG_H__0B638672_B800_4827_965C_AA552188BC84__INCLUDED_)
[ "dedej1am@fded5620-0c03-0410-a24c-85322fa64ba0", "chrzm@fded5620-0c03-0410-a24c-85322fa64ba0", "ibart@fded5620-0c03-0410-a24c-85322fa64ba0" ]
[ [ [ 1, 8 ], [ 11, 11 ], [ 28, 32 ], [ 38, 40 ], [ 46, 55 ], [ 59, 59 ], [ 63, 63 ], [ 67, 67 ], [ 71, 71 ], [ 75, 75 ], [ 79, 83 ], [ 95, 95 ], [ 106, 106 ], [ 116, 116 ], [ 125, 125 ], [ 133, 133 ], [ 140, 142 ], [ 151, 169 ], [ 176, 201 ] ], [ [ 9, 10 ], [ 12, 27 ], [ 33, 33 ], [ 35, 37 ], [ 41, 45 ], [ 56, 58 ], [ 60, 62 ], [ 64, 66 ], [ 68, 70 ], [ 72, 74 ], [ 76, 78 ], [ 84, 94 ], [ 96, 105 ], [ 107, 115 ], [ 117, 124 ], [ 126, 132 ], [ 134, 139 ], [ 143, 150 ], [ 170, 175 ] ], [ [ 34, 34 ] ] ]
bac25971b8eb7222de871e5c1c793d86f6cf0188
197ac28d1481843225f35aff4aa85f1909ef36bf
/examples/matrix_keyb/matrix_keyb.cpp
59a7dff1540554ce533350a73fff42d62eee7548
[ "BSD-3-Clause" ]
permissive
xandroalmeida/Mcucpp
831e1088eb38dfcf65bfb6fb3205d4448666983c
6fc5c8d5b9839ade60b3f57acc78a0ed63995fca
refs/heads/master
2020-12-24T12:13:53.497692
2011-11-21T15:36:03
2011-11-21T15:36:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,414
cpp
#include <avr/io.h> #include <iopins.h> #include <pinlist.h> template<class Rows, class Cols, bool decoder = false> class MatrixKeyboard { typedef typename Cols::DataType DataType; public: static unsigned GetKeyCode() { Cols::template SetConfiguration<Cols::PullUpOrDownIn>(); Cols::template Write(0); Rows::template SetConfiguration<Rows::Out>(); unsigned result = 0; const DataType rowsCount = decoder ? (1 << Rows::Length) - 1: Rows::Length; for(DataType i=0; i < rowsCount; i++) { if(decoder) Rows::Write(i); else Rows::Write(1 << i); asm("nop\nnop\nnop\n"); DataType cols = Cols::PinRead(); if((DataType)(cols & (cols-1)) == 0) // only one key pressed in one row { for(DataType j = 1; j < Cols::Length + 1; j++, cols >>= 1) if(cols & 1) { result = i * Cols::Length + j; break; } } } Cols::template SetConfiguration<Cols::PullUpOrDownIn>(); Cols::template Write<0>(); Rows::template SetConfiguration<Rows::PullUpOrDownIn>(); Cols::template Write<0>(); return result; } }; using namespace IO; typedef PinList<Pb0Inv, Pb1Inv, Pb2Inv, Pb3Inv> KeybRows; typedef PinList<Pa4Inv, Pa5Inv, Pa6Inv, Pa7Inv> KeybCols; typedef MatrixKeyboard<KeybRows, KeybCols, false> Keyb; int main() { PORTC = Keyb::GetKeyCode(); while(1) { } }
[ [ [ 1, 69 ] ] ]
e9b22ec80893c28cb395db2b7ea6b4219b3c05cb
dc74c703265aa159cef253ad50531e5e69655056
/src/shared_buffers/AbstractBuffer.hpp
852fa07e096438e2d78736ce49da550692dbce86
[ "ISC" ]
permissive
Medo42/GM-shared-buffers
9c180a008d922195d58c956f20bba9ab030d225a
72b520f43444ea6a7704027e9b204f4e2fa236b8
refs/heads/master
2021-01-13T02:27:27.940514
2011-06-05T19:25:45
2011-06-05T19:25:45
1,678,012
2
0
null
null
null
null
UTF-8
C++
false
false
5,793
hpp
#pragma once #include <stddef.h> #include <stdint.h> #include <algorithm> namespace shb { class AbstractStream { public: /** * Read size bytes into the provided data buffer. Where the data comes from is * completely up to the implementation. If less data is available, as much as is * available will be copied to the beginning of the buffer. * * The actual number of bytes read is returned. */ virtual size_t read(uint8_t* data, size_t size) = 0; /** * peek behaves like read, except that the data is not removed from the stream. * That is, subsequent calls to read must return the same data that is returned * by the peek operation. */ virtual size_t peek(uint8_t* data, size_t size) = 0; /** * skip behaves like read, except that the data is removed from the stream without * being copied. The actual number of bytes skipped is returned. */ virtual size_t skip(size_t size) = 0; /** * Write size bytes from the provided data buffer. Where the data is written to * is completely up to the implementation. If less than size bytes can be written, * as much data as possible is written instead. Implementations should clearly * document if and when this can happen. * * The actual number of bytes written is returned. */ virtual size_t write(const uint8_t* data, size_t size) = 0; /** * Return the number of bytes that can be read at the moment. */ virtual size_t getBytesLeft() = 0; virtual ~AbstractStream() {} }; /** * In order to allow buffer users to rely on some common behaviour, implementations should follow the * specification below. It's not formally complete, but I think it gets the major points across. In short, * implementations should behave like you would expect a memory buffer to behave. * * A buffer is a collection of bytes indexed by a contiguous range of numbers starting from 0. * length is the number of bytes in the buffer, and is thus equal to the highest index plus one. * readPos and writePos are numbers in the range [0, length]. * * read(data, size) will copy size bytes starting from the one indexed by readPos into the data * array, if size <= length-readPos. Otherwise as many bytes as possible are copied. readPos is incremented * by the number of bytes actually read, and that number is returned. * * write(data, size) will copy size bytes from the data array into the buffer, starting at the index * writePos, if size <= length-writePos or the buffer can be resized to the required length. Otherwise * as many bytes as possible are copied. writePos is incremented by the number of bytes actually written, * and that number is returned. * * getReadPos, getWritePos, setReadPos and setWritePos return or modify the current value of readPos * and writePos. Attempting to set either to a value greater than length shall set it to length instead. * * getLength returns the current length. setLength(newLength) resizes the buffer so that * lenght=newLength, if this is possible. If newLength < length, all data with index of newLength and * greater is discarded. If newLength > length, the new memory available must be initialized to 0. * All data in the index range [0, min(length, newLength)-1] must be kept intact. If the resize is * successful, true is returned. Otherwise, false is returned and the contents of the buffer are not modified. * In that case, the new length of the buffer may be anything between the old size and the requested size. */ class AbstractBuffer : public AbstractStream { public: virtual size_t read(uint8_t* data, size_t size); virtual size_t write(const uint8_t* data, size_t size); virtual size_t getReadPos() = 0; virtual size_t getWritePos() = 0; virtual void setReadPos(size_t pos) = 0; virtual void setWritePos(size_t pos) = 0; virtual size_t getLength() = 0; virtual bool setLength(size_t length) = 0; /** * Default implementation using read(), getReadPos() and setReadPos(). */ virtual size_t peek(uint8_t* data, size_t size); /** * Default implementation using getReadPos() and setReadPos(). */ virtual size_t skip(size_t size); /** * Default implementation using getLength() and getReadPos(). */ virtual size_t getBytesLeft(); /** * Convenience function. */ void clear() { setLength(0); } /** * Convenience function. */ size_t read(uint8_t* data, size_t startPos, size_t size) { size_t oldReadPos = getReadPos(); setReadPos(startPos); size_t ammountRead = read(data, size); setReadPos(oldReadPos); return ammountRead; } virtual ~AbstractBuffer() {} }; /** * Read size bytes from the source stream or buffer and write them to the destination * stream or buffer. * * If fewer bytes are available to be read from source or if not everything can be written, * as much as possible is written. It will always be attempted to read size bytes from the * source stream, or the ammount returned by source.getBytesLeft() (whichever is smaller), * even if fewer bytes can be written. * * The actual number of bytes written is returned. */ size_t copyStream(AbstractStream& dest, AbstractStream& source, size_t size); /** * Read size bytes starting on position sourceStartPos in the source buffer and * write them to the dest stream or buffer. * * The read position of the source buffer will be preserved. If fewer bytes are available * to be read or if not everything can be written, as much as possible is written. * * The actual number of bytes written is returned. */ size_t copyBuffer(AbstractStream& dest, AbstractBuffer& source, size_t sourceStartPos, size_t size); } #include "impl/AbstractBuffer.ipp"
[ [ [ 1, 153 ] ] ]
660b950f3da93971fdb571e0561f78f40cad5cd6
4b4e6844d1df21457cdd77b51960b276cedec243
/http_request.cpp
a1aab69b5bd71f727caec34a020e3022c37b5b1f
[]
no_license
leonhong/sitemon2
45681c0e6788cf764889a201ba1917aa476d27cf
c376953f584d9e8bfc3af69117586f5d1f5a3863
refs/heads/master
2021-01-16T20:00:19.591266
2010-04-11T16:09:15
2010-04-11T16:09:15
null
0
0
null
null
null
null
UTF-8
C++
false
false
937
cpp
/* * http_request.cpp * sitemon * * Created by Peter Pearson on 27/02/2010. * Copyright 2010 __MyCompanyName__. All rights reserved. * */ #include "http_request.h" HTTPRequest::HTTPRequest() : m_requestType(HTTP_GET), m_pauseTime(0), m_acceptCompressed(false), m_storeHeader(true), m_storeBody(true), m_downloadContent(false) { } HTTPRequest::HTTPRequest(const std::string &url) : m_url(url), m_requestType(HTTP_GET), m_pauseTime(0), m_acceptCompressed(false), m_storeHeader(true), m_storeBody(true), m_downloadContent(false) { } void HTTPRequest::addParameter(std::string &name, std::string &value) { HTTPParameter param; param.name = name; param.value = value; m_aParameters.push_back(param); } void HTTPRequest::addCookie(std::string &name, std::string &value) { HTTPCookie param; param.name = name; param.value = value; m_aCookies.push_back(param); }
[ [ [ 1, 40 ] ] ]
6e2b3e06680b1060e4d68714b83f50fe92d79c0c
9e79b20463b122df1d83a1e394f54689a949fb4e
/libs/FSM/FiniteStateMachine.cpp
8434708b81074ac3d08c3cbefad238ff9551a067
[]
no_license
michaelvandam/mojoduino
4870c522b7be77a33cb19d1a6448dbee9ca9c148
57233cadde626b5b9a7accf941d78470ebe17000
refs/heads/master
2021-01-02T22:51:23.392713
2010-10-23T01:45:30
2010-10-23T01:45:30
32,952,233
0
0
null
null
null
null
UTF-8
C++
false
false
2,702
cpp
/* || || @file FiniteStateMachine.cpp || @version 1.2 || @author Alexander Brevig || @contact [email protected] || || @description || | Provide an easy way of making finite state machines || # || || @license || | This library is free software; you can redistribute it and/or || | modify it under the terms of the GNU Lesser General Public || | License as published by the Free Software Foundation; version || | 2.1 of the License. || | || | This library 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 || | Lesser General Public License for more details. || | || | You should have received a copy of the GNU Lesser General Public || | License along with this library; if not, write to the Free Software || | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA || # || */ #include "FiniteStateMachine.h" //FINITE STATE State::State( void (*updateFunction)() ){ userEnter = 0; userUpdate = updateFunction; userExit = 0; } State::State( void (*enterFunction)(), void (*updateFunction)(), void (*exitFunction)() ){ userEnter = enterFunction; userUpdate = updateFunction; userExit = exitFunction; } //what to do when entering this state void State::enter(){ if (userEnter){ userEnter(); } } //what to do when this state updates void State::update(){ if (userUpdate){ userUpdate(); } } //what to do when exiting this state void State::exit(){ if (userExit){ userExit(); } } //END FINITE STATE //FINITE STATE MACHINE FiniteStateMachine::FiniteStateMachine(State& current){ currentState = nextState = &current; } FiniteStateMachine& FiniteStateMachine::update(){ if (currentState != nextState){ immediateTransitionTo(*nextState); } currentState->update(); return *this; } FiniteStateMachine& FiniteStateMachine::transitionTo(State& state){ nextState = &state; return *this; } FiniteStateMachine& FiniteStateMachine::immediateTransitionTo(State& state){ currentState->exit(); currentState = nextState = &state; currentState->enter(); return *this; } //Added by Henry Herman 10-30-09 bool FiniteStateMachine::isInState(State& state) { if (&state == currentState) { return true; } else { return false; } } //END FINITE STATE MACHINE /* || @changelog || | 2009-08-11 - Alexander Brevig : Added if check for functionpointers || | 2009-05-18 - Alexander Brevig : Added support for cascaded calls || | 2009-04-13 - Alexander Brevig : Initial Release || # */
[ "henry.herman@2cfd8b6e-c46e-11de-b12b-e93134c88cf6" ]
[ [ [ 1, 111 ] ] ]
a41a6f77ab5fbf4133d31ac494e08de3be443ab6
7461bdef94212ae9326bc4ab923d59950ac93f89
/includes/muParser/muParserTokenReader.h
1ebca61aa4f7b083f4410884a81d6b6b92440566
[]
no_license
zOrg1331/qzdisp
9ddc7bee7116fbc25dabb34f45274bc30bbdad82
f15afba02e4c86002b1a90c9901bbe4767e5300f
refs/heads/master
2016-08-04T17:43:07.193313
2008-03-22T14:23:44
2008-03-22T14:23:44
32,092,059
0
0
null
null
null
null
UTF-8
C++
false
false
5,295
h
/* Copyright (C) 2005 Ingo Berg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef MU_PARSER_TOKEN_READER_H #define MU_PARSER_TOKEN_READER_H #include <cassert> #include <cstdio> #include <cstring> #include <map> #include <memory> #include <stack> #include <string> #include "muParserDef.h" #include "muParserToken.h" namespace mu { // Forward declaration class ParserBase; /** \brief Token reader for the ParserBase class. */ class ParserTokenReader { private: typedef ParserToken<value_type, string_type> token_type; private: ParserBase *m_pParser; string_type m_strFormula; int m_iPos; int m_iSynFlags; bool m_bIgnoreUndefVar; const funmap_type *m_pFunDef; const funmap_type *m_pPostOprtDef; const funmap_type *m_pInfixOprtDef; const funmap_type *m_pOprtDef; const valmap_type *m_pConstDef; const strmap_type *m_pStrVarDef; varmap_type *m_pVarDef; ///< The only non const pointer to parser internals facfun_type m_pFactory; std::vector<identfun_type> m_vIdentFun; ///< Value token identification function varmap_type m_UsedVar; value_type m_fZero; ///< Dummy value of zero, referenced by undefined variables int m_iBrackets; // // private Functions // private: /** \brief Syntax codes. The syntax codes control the syntax check done during the first time parsing of the expression string. They are flags that indicate which tokens are allowed next if certain tokens are identified. */ enum ESynCodes { noBO = 1 << 0, ///< to avoid i.e. "cos(7)(" noBC = 1 << 1, ///< to avoid i.e. "sin)" or "()" noVAL = 1 << 2, ///< to avoid i.e. "tan 2" or "sin(8)3.14" noVAR = 1 << 3, ///< to avoid i.e. "sin a" or "sin(8)a" noCOMMA = 1 << 4, ///< to avoid i.e. ",," or "+," ... noFUN = 1 << 5, ///< to avoid i.e. "sqrt cos" or "(1)sin" noOPT = 1 << 6, ///< to avoid i.e. "(+)" noPOSTOP = 1 << 7, ///< to avoid i.e. "(5!!)" "sin!" noINFIXOP = 1 << 8, ///< to avoid i.e. "++4" "!!4" noEND = 1 << 9, ///< to avoid unexpected end of formula noSTR = 1 << 10, ///< to block numeric arguments on string functions noASSIGN = 1 << 11, ///< to block assignement to constant i.e. "4=7" noANY = ~0 ///< All of he above flags set }; ParserTokenReader(const ParserTokenReader &a_Reader); ParserTokenReader& operator=(const ParserTokenReader &a_Reader); void Assign(const ParserTokenReader &a_Reader); public: ParserTokenReader(ParserBase *a_pParent); ~ParserTokenReader(); ParserTokenReader* Clone(ParserBase *a_pParent) const; void AddValIdent(identfun_type a_pCallback); void SetVarCreator(facfun_type a_pFactory); int GetPos() const; const string_type& GetFormula() const; const varmap_type& GetUsedVar() const; void SetFormula(const string_type &a_strFormula); void SetDefs( const funmap_type *a_pFunDef, const funmap_type *a_pOprtDef, const funmap_type *a_pInfixOprtDef, const funmap_type *a_pPostOprtDef, varmap_type *a_pVarDef, const strmap_type *a_pStrVarDef, const valmap_type *a_pConstDef ); void IgnoreUndefVar(bool bIgnore); void ReInit(); token_type ReadNextToken(); // // private functions // private: void SetParent(ParserBase *a_pParent); int ExtractToken( const char_type *a_szCharSet, string_type &a_strTok, int a_iPos ) const; bool IsBuiltIn(token_type &a_Tok); bool IsEOF(token_type &a_Tok); bool IsInfixOpTok(token_type &a_Tok); bool IsFunTok(token_type &a_Tok); bool IsPostOpTok(token_type &a_Tok); bool IsOprt(token_type &a_Tok); bool IsValTok(token_type &a_Tok); bool IsVarTok(token_type &a_Tok); bool IsStrVarTok(token_type &a_Tok); bool IsUndefVarTok(token_type &a_Tok); bool IsString(token_type &a_Tok); void Error( EErrorCodes a_iErrc, int a_iPos = -1, const string_type &a_sTok = string_type() ) const; }; } // namespace mu #endif
[ "zOrg1331@b5c66ea7-0549-0410-9719-5941d86a54b7" ]
[ [ [ 1, 146 ] ] ]
1a395c6977da84914aded9efbc121d171bf0d5b5
ef23e388061a637f82b815d32f7af8cb60c5bb1f
/src/mame/includes/ddragon.h
52bacd9ae92edbd8a382a65dae298e6b504cac09
[]
no_license
marcellodash/psmame
76fd877a210d50d34f23e50d338e65a17deff066
09f52313bd3b06311b910ed67a0e7c70c2dd2535
refs/heads/master
2021-05-29T23:57:23.333706
2011-06-23T20:11:22
2011-06-23T20:11:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,035
h
/************************************************************************* Double Dragon & Double Dragon II (but also China Gate) *************************************************************************/ class ddragon_state : public driver_device { public: ddragon_state(running_machine &machine, const driver_device_config_base &config) : driver_device(machine, config) { } /* memory pointers */ UINT8 * m_rambase; UINT8 * m_bgvideoram; UINT8 * m_fgvideoram; UINT8 * m_spriteram; UINT8 * m_scrollx_lo; UINT8 * m_scrolly_lo; UINT8 * m_darktowr_mcu_ports; // UINT8 * m_paletteram; // currently this uses generic palette handling // UINT8 * m_paletteram_2; // currently this uses generic palette handling size_t m_spriteram_size; // FIXME: this appears in chinagat.c, but is it really used? /* video-related */ tilemap_t *m_fg_tilemap; tilemap_t *m_bg_tilemap; UINT8 m_technos_video_hw; UINT8 m_scrollx_hi; UINT8 m_scrolly_hi; /* misc */ UINT8 m_dd_sub_cpu_busy; UINT8 m_sprite_irq; UINT8 m_sound_irq; UINT8 m_ym_irq; UINT8 m_adpcm_sound_irq; UINT32 m_adpcm_pos[2]; UINT32 m_adpcm_end[2]; UINT8 m_adpcm_idle[2]; int m_adpcm_data[2]; /* for Sai Yu Gou Ma Roku */ int m_adpcm_addr; int m_i8748_P1; int m_i8748_P2; int m_pcm_shift; int m_pcm_nibble; int m_mcu_command; #if 0 int m_m5205_clk; #endif /* devices */ device_t *m_maincpu; device_t *m_snd_cpu; device_t *m_sub_cpu; device_t *m_adpcm_1; device_t *m_adpcm_2; }; /*----------- defined in video/ddragon.c -----------*/ WRITE8_HANDLER( ddragon_bgvideoram_w ); WRITE8_HANDLER( ddragon_fgvideoram_w ); VIDEO_START( chinagat ); VIDEO_START( ddragon ); SCREEN_UPDATE( ddragon );
[ "Mike@localhost" ]
[ [ [ 1, 72 ] ] ]
1fee0d0732486576a0b032c302c1ff23ac88f124
8f828231b15af1203c30cac311dbbd166f9f743f
/hellocairo/myapp.cpp
44bea933289b31bf0874bfb32531e370085701fa
[]
no_license
d3ru/cairo-for-symbian
07a1e4ceeb433ab7bc3485134903f123884e1939
1031d4d020701003161f19e207b32324d89cf8b6
refs/heads/master
2016-08-11T14:19:16.881139
2009-03-15T14:00:11
2009-03-15T14:00:11
36,205,677
0
1
null
null
null
null
WINDOWS-1252
C++
false
false
1,523
cpp
/* * Copyright © 2009 [email protected] * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include "mydoc.h" #include "myapp.h" const TUid KUidMyApp = { 0xa000018f }; CApaDocument* CMyApplication::CreateDocumentL() { return static_cast<CApaDocument*>(CMyDocument::NewL(*this)); } TUid CMyApplication::AppDllUid() const { return KUidMyApp; }
[ "[email protected]@a20834f0-d954-11dd-a2b5-e5f827957e07" ]
[ [ [ 1, 38 ] ] ]
d72fdd284ac0a055704cd9dc04749a705baaf3e2
eda410906c2ec64689d8c0b84f3c2862f469144b
/DropSendCore/data/entities/sentfile.cpp
5828b89534b37274e6a10ef67a65c67fef622314
[]
no_license
redbox/Dropsend
640ea157a2caec88aa145f5bdc7fa85db95203a5
8fe4b4478616b9850b55011a506653026a28f7da
refs/heads/master
2020-06-02T20:54:18.301786
2010-09-06T16:16:05
2010-09-06T16:16:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
170
cpp
#include "sentfile.h" using namespace dropsend::data::entities; SentFile::SentFile() { } int SentFile::getRecipientId() const { return recipient_id_; }
[ [ [ 1, 11 ] ] ]
c53e3da4410d5875c41e29411d3add958334e3bf
12203ea9fe0801d613bbb2159d4f69cab3c84816
/Export/cpp/windows/obj/src/nme/display/IGraphicsData.cpp
d2c9010d8189f544a43630fda5f7930629174fd4
[]
no_license
alecmce/haxe_game_of_life
91b5557132043c6e9526254d17fdd9bcea9c5086
35ceb1565e06d12c89481451a7bedbbce20fa871
refs/heads/master
2016-09-16T00:47:24.032302
2011-10-10T12:38:14
2011-10-10T12:38:14
2,547,793
0
0
null
null
null
null
UTF-8
C++
false
false
2,306
cpp
#include <hxcpp.h> #ifndef INCLUDED_nme_display_IGraphicsData #include <nme/display/IGraphicsData.h> #endif namespace nme{ namespace display{ Void IGraphicsData_obj::__construct(Dynamic inHandle) { { HX_SOURCE_POS("C:\\Motion-Twin\\haxe\\dev\\nme/nme/display/IGraphicsData.hx",9) this->nmeHandle = inHandle; } ; return null(); } IGraphicsData_obj::~IGraphicsData_obj() { } Dynamic IGraphicsData_obj::__CreateEmpty() { return new IGraphicsData_obj; } hx::ObjectPtr< IGraphicsData_obj > IGraphicsData_obj::__new(Dynamic inHandle) { hx::ObjectPtr< IGraphicsData_obj > result = new IGraphicsData_obj(); result->__construct(inHandle); return result;} Dynamic IGraphicsData_obj::__Create(hx::DynamicArray inArgs) { hx::ObjectPtr< IGraphicsData_obj > result = new IGraphicsData_obj(); result->__construct(inArgs[0]); return result;} IGraphicsData_obj::IGraphicsData_obj() { } void IGraphicsData_obj::__Mark(HX_MARK_PARAMS) { HX_MARK_BEGIN_CLASS(IGraphicsData); HX_MARK_MEMBER_NAME(nmeHandle,"nmeHandle"); HX_MARK_END_CLASS(); } Dynamic IGraphicsData_obj::__Field(const ::String &inName) { switch(inName.length) { case 9: if (HX_FIELD_EQ(inName,"nmeHandle") ) { return nmeHandle; } } return super::__Field(inName); } Dynamic IGraphicsData_obj::__SetField(const ::String &inName,const Dynamic &inValue) { switch(inName.length) { case 9: if (HX_FIELD_EQ(inName,"nmeHandle") ) { nmeHandle=inValue.Cast< Dynamic >(); return inValue; } } return super::__SetField(inName,inValue); } void IGraphicsData_obj::__GetFields(Array< ::String> &outFields) { outFields->push(HX_CSTRING("nmeHandle")); super::__GetFields(outFields); }; static ::String sStaticFields[] = { String(null()) }; static ::String sMemberFields[] = { HX_CSTRING("nmeHandle"), String(null()) }; static void sMarkStatics(HX_MARK_PARAMS) { }; Class IGraphicsData_obj::__mClass; void IGraphicsData_obj::__register() { Static(__mClass) = hx::RegisterClass(HX_CSTRING("nme.display.IGraphicsData"), hx::TCanCast< IGraphicsData_obj> ,sStaticFields,sMemberFields, &__CreateEmpty, &__Create, &super::__SGetClass(), 0, sMarkStatics); } void IGraphicsData_obj::__boot() { } } // end namespace nme } // end namespace display
[ [ [ 1, 92 ] ] ]
6fc8271375a02b6b69ceb6d7c95c80057a9c6846
33f59b1ba6b12c2dd3080b24830331c37bba9fe2
/Depend/Foundation/Intersection/Wm4IntrSegment2Circle2.cpp
a15d87f0a7e02aeff0ea217f1e6e66343be703a1
[]
no_license
daleaddink/flagship3d
4835c223fe1b6429c12e325770c14679c42ae3c6
6cce5b1ff7e7a2d5d0df7aa0594a70d795c7979a
refs/heads/master
2021-01-15T16:29:12.196094
2009-11-01T10:18:11
2009-11-01T10:18:11
37,734,654
1
0
null
null
null
null
UTF-8
C++
false
false
3,683
cpp
// Geometric Tools, Inc. // http://www.geometrictools.com // Copyright (c) 1998-2006. All Rights Reserved // // The Wild Magic Version 4 Foundation Library source code is supplied // under the terms of the license agreement // http://www.geometrictools.com/License/Wm4FoundationLicense.pdf // and may not be copied or disclosed except in accordance with the terms // of that agreement. #include "Wm4FoundationPCH.h" #include "Wm4IntrSegment2Circle2.h" #include "Wm4IntrLine2Circle2.h" namespace Wm4 { //---------------------------------------------------------------------------- template <class Real> IntrSegment2Circle2<Real>::IntrSegment2Circle2 ( const Segment2<Real>& rkSegment, const Circle2<Real>& rkCircle) : m_rkSegment(rkSegment), m_rkCircle(rkCircle) { } //---------------------------------------------------------------------------- template <class Real> const Segment2<Real>& IntrSegment2Circle2<Real>::GetSegment () const { return m_rkSegment; } //---------------------------------------------------------------------------- template <class Real> const Circle2<Real>& IntrSegment2Circle2<Real>::GetCircle () const { return m_rkCircle; } //---------------------------------------------------------------------------- template <class Real> bool IntrSegment2Circle2<Real>::Find () { Real afT[2]; bool bIntersects = IntrLine2Circle2<Real>::Find(m_rkSegment.Origin, m_rkSegment.Direction,m_rkCircle.Center,m_rkCircle.Radius,m_iQuantity, afT); if (bIntersects) { // reduce root count if line-circle intersections are not on segment if (m_iQuantity == 1) { if (Math<Real>::FAbs(afT[0]) > m_rkSegment.Extent) { m_iQuantity = 0; } } else { if (afT[1] < -m_rkSegment.Extent || afT[0] > m_rkSegment.Extent) { m_iQuantity = 0; } else { if (afT[1] <= m_rkSegment.Extent) { if (afT[0] < -m_rkSegment.Extent) { m_iQuantity = 1; afT[0] = afT[1]; } } else { m_iQuantity = (afT[0] >= -m_rkSegment.Extent ? 1 : 0); } } } for (int i = 0; i < m_iQuantity; i++) { m_akPoint[i] = m_rkSegment.Origin + afT[i]*m_rkSegment.Direction; } } m_iIntersectionType = (m_iQuantity > 0 ? IT_POINT : IT_EMPTY); return m_iIntersectionType != IT_EMPTY; } //---------------------------------------------------------------------------- template <class Real> int IntrSegment2Circle2<Real>::GetQuantity () const { return m_iQuantity; } //---------------------------------------------------------------------------- template <class Real> const Vector2<Real>& IntrSegment2Circle2<Real>::GetPoint (int i) const { assert(0 <= i && i < m_iQuantity); return m_akPoint[i]; } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // explicit instantiation //---------------------------------------------------------------------------- template WM4_FOUNDATION_ITEM class IntrSegment2Circle2<float>; template WM4_FOUNDATION_ITEM class IntrSegment2Circle2<double>; //---------------------------------------------------------------------------- }
[ "yf.flagship@e79fdf7c-a9d8-11de-b950-3d5b5f4ea0aa" ]
[ [ [ 1, 115 ] ] ]
f44bb19a63b91a72d1e21a1cbf7a1b5bf37b64bc
057b7a4ab47221853edb46d8dde178b888b9433c
/trunk/utf8/bonuspck/defines2.inc
f83c5897714685b58b1fde1dd02fe271bbc10455
[]
no_license
BackupTheBerlios/pointmaster-svn
97f776cbd15433e3870ef73a7d8975026dfacdba
74aefceea62a4290a059b91a4d2c309fb9fc1075
refs/heads/master
2020-05-21T00:43:00.722683
2011-08-09T18:57:42
2011-08-09T18:57:42
40,771,866
1
1
null
null
null
null
UTF-8
C++
false
false
10,032
inc
Uses Objects; Type TAddr=Record Zone, Net, Node, Point: Integer; Domain:String; End; Type PVarTagRec=^VarTagRec; VarTagRec=Record Tag:String[30]; Flag:Word; End; {Const NotAllowedFileNames:Array[0..10] of String=( 'NUL','CON','LPT1', 'LPT2','LPT3','CLOCK$','AUX', 'COM1','COM2','COM3','COM4');} {Var TotalBytes:LongInt; ReadedBytes:LongInt; CurrentOperation:String; MsgMaskToSet:Word;} Const CriticalMemorySize:LongInt=2000; _flgNone:Word=0; _flgDeletePoint=1; cmInsert=203; cmDelete=204; cmSearch=205; cmEdit=206; cmViewPoints=207; cmViewBosses=208; cmOpenPointList=202; {_repCantChangeAnotherBoss=3; _repAllDone=4; _repNotAllowForPoint=5; _repSegmentRequest=6; _repHelpRequest=7; _repErrorsInMessage=8; _repErrorsInPointList=9; _repStatisticRequest=10;} {Var _logSearchForMsg, _logFoundMsg, _logFoundRequest, _logCantOpenFile, _logBossAddress, _logAddedBosses, _logDeletedBosses, _logFalseDeletedBosses, _logAddedPoints, _logDeletedPoints, _logChangedPoints, _logFalseDeletedPoints, _logFalseChangedPoints, _logDuplicateBosses, _logTryChangeAnotherBoss, _logCantOpenTpl, _logCantCreateMessage, _logMasterIsBusyInAnotherTask, _logCantCreateBusyFlag, _logCantRemoveBusyFlag, _logNotEnoughMemory, _logCantDeleteFile, _logCircularInclude, {_logReadingAllMsg,} {_logBuildingPointList, _logCreatingAllDoneReport, _logCreatingFalseReport, {_oprCreatingSegmentReport, _oprCreatingStatisticReport, _oprCreatingHelpReport} {_logCreatingRequestReport:String;} Const NULL=0; NOT_PROCESS_STRING=32; INCLUDE_FILE=64; INCLUDE_SEGMENT=128; INCLUDE_LISTERRORS=256; INCLUDE_MESSAGEERRORS=512; INCLUDE_STATISTIC=1024; MODE_NOTHING=1; MODE_MSG=2; MODE_BUILD=4; MODE_MSG_BUILD=8; _flgBossNotFound=1; _flgDupeBosses=2; _flgSingle=1; _flgCollection=2; Var _flgDebug:Boolean; {_flgProcessMessages:Boolean;} {_flgBuildPointList:Boolean;} _flgWasEdited:Boolean; AddedPoints, DeletedPoints, ChangedPoints, FalseChangedPoints, FalseDeletedPoints, AddedBosses, DeletedBosses, FalseDeletedBosses, DuplicateBosses, WrongPoints:Integer; WorkMode:Word; CurrentPointListName:String; Const {ConfigNameTag='CONFIGNAME'; LanguageNameTag='PM.LNG';} IncludeTag='#INCLUDE'; DefineTag='#DEFINE'; SegmentBodyTag='#SEGMENT'; ListErrorsTag='#ERRORSINLIST'; MessageErrorsTag='#ERRORSINMESSAGE'; StatisticTag='#STATISTIC'; {OriginTag='* Origin: '; TearLineTag='--- '; BossTag='BOSS'; PointTag='POINT'; _klgFMPT='FMPT'; _klgTOPT='TOPT'; _klgMSGID='MSGID';} Yes='YES'; No='NO'; {PntMasterVersion='PointMaster v.0.05a'; PntMasterName='PointMaster';} {TaskNumberTag:VarTagRec=( Tag:'TASK'; Flag:_flgSingle); MasterVerTag:VarTagRec=( Tag:'VERSION'; Flag:_flgSingle); MasterNameTag:VarTagRec=( Tag:'MASTERNAME'; Flag:_flgCollection); SysOpNameTag:VarTagRec=( Tag:'SYSOPNAME'; Flag:_flgSingle); SysOpAddressTag:VarTagRec=( Tag:'SYSOPADDRESS'; Flag:_flgSingle); FromFNameTag:VarTagRec=( Tag:'FROMFNAME'; Flag:_flgSingle); FromLNameTag:VarTagRec=( Tag:'FROMLNAME'; Flag:_flgSingle); FromFLNameTag:VarTagRec=( Tag:'FROMFULLNAME'; Flag:_flgSingle); FromAddressTag:VarTagRec=( Tag:'FROMADDRESS'; Flag:_flgSingle); MasterAddressTag:VarTagRec=( Tag:'MASTERADDRESS'; Flag:_flgSingle); MasterLogNameTag:VarTagRec=( Tag:'LOG'; Flag:_flgSingle); LogSizeTag:VarTagRec=( Tag:'LOGSIZE'; Flag:_flgSingle); StatFileNameTag:VarTagRec=( Tag:'BINARYSTATFILE'; Flag:_flgSingle); PointSegmentNameTag:VarTagRec=( Tag:'LISTSEGMENT'; Flag:_flgCollection);} EditorNameTag:VarTagRec=( Tag:'EDITORNAME'; Flag:_flgSingle); DeleteListAfterProcessTag:VarTagRec=( Tag:'DELETELISTAFTERPROCESS'; Flag:_flgSingle); DestPointListNameTag:VarTagRec=( Tag:'DESTPOINTLIST'; Flag:_flgSingle); {PointListNameTag:VarTagRec=( Tag:'POINTLIST'; Flag:_flgCollection); NetMailPathTag:VarTagRec=( Tag:'NETMAILPATH'; Flag:_flgSingle); CurrentMessageNameTag:VarTagRec=( Tag:'CURMSG'; Flag:_flgSingle); KillSentTag:VarTagRec=( Tag:'KILLSENT'; Flag:_flgSingle); SafeMsgModeTag:VarTagRec=( Tag:'SAFEMSGMODE'; Flag:_flgSingle); SplitCharTag:VarTagRec=( Tag:'SPLITCHAR'; Flag:_flgSingle); DeleteCharsTag:VarTagRec=( Tag:'DELETEPOINTCHARS'; Flag:_flgSingle);} CommentsBeforeBossTag:VarTagRec=( Tag:'COMMENTSBEFOREBOSS'; Flag:_flgSingle); StringsToSkipAtBeginOfListTag:VarTagRec=( Tag:'SKIPATBEGINOFLIST'; Flag:_flgSingle); AddSemicolonAfterEachBossTag:VarTagRec=( Tag:'ADDSEMICOLONAFTEREACH'; Flag:_flgSingle); {BusyFlagNameTag:VarTagRec=( Tag:'BUSYFLAG'; Flag:_flgSingle); FileAttachPathTag:VarTagRec=( Tag:'FILEATTACHPATH'; Flag:_flgSingle); ProcessFileAttachTag:VarTagRec=( Tag:'PROCESSFILEATTACH'; Flag:_flgSingle); UseFileAttachPathTag:VarTagRec=( Tag:'USEFILEATTACHPATH'; Flag:_flgSingle);} ValidateStringTag:VarTagRec=( Tag:'VALIDATESTRING'; Flag:_flgSingle); UseValidateTag:VartagRec=( Tag:'USEVALIDATE'; Flag:_flgSingle); CurDateStrTag:VarTagRec=( Tag:'CURDATE'; Flag:_flgSingle); CurTimeStrTag:VarTagRec=( Tag:'CURTIME'; Flag:_flgSingle);{ SubjTag:VarTagRec=( Tag:'SUBJ'; Flag:_flgSingle); FromTag:VarTagRec=( Tag:'FROM'; Flag:_flgSingle); ToTag:VarTagRec=( Tag:'TO'; Flag:_flgSingle); TearLineStrTag:VarTagRec=( Tag:'TEARLINE'; Flag:_flgSingle); OriginStrTag:VarTagRec=( Tag:'ORIGIN'; Flag:_flgSingle); RequestTag:VarTagRec=( Tag:'REQUEST'; Flag:_flgSingle); DeletedBossesTag:VarTagRec=( Tag:'DELBOSSES'; Flag:_flgSingle); AddedBossesTag:VartagRec=( Tag:'ADDBOSSES'; Flag:_flgSingle); FalseDeletedBossesTag:VarTagRec=( Tag:'FDELBOSSES'; Flag:_flgSingle); DeletedPointsTag:VarTagRec=( Tag:'DELPOINTS'; Flag:_flgSingle); AddedPointsTag:VarTagRec=( Tag:'ADDPOINTS'; Flag:_flgSingle); ChangedPointsTag:VarTagRec=( Tag:'CHGPOINTS'; Flag:_flgSingle); FalseDeletedPointsTag:VarTagRec=( Tag:'FDELPOINTS'; Flag:_flgSingle); FalseChangedPointsTag:VarTagRec=( Tag:'FCHGPOINTS'; Flag:_flgSingle); DuplicateBossesTag:VarTagRec=( Tag:'DUPEBOSSES'; Flag:_flgSingle); StatisticStringTag:VarTagRec=( Tag:'STATSTRING'; Flag:_flgSingle); StatisticDateTag:VarTagRec=( Tag:'STATDATE'; Flag:_flgSingle);} {Requests} {SegmentRequestTag:VarTagRec=( Tag:'%SEGMENT'; Flag:_flgSingle); HelpRequestTag:VarTagRec=( Tag:'%HELP'; Flag:_flgSingle); StatisticRequestTag:VarTagRec=( Tag:'%STATISTIC'; Flag:_flgSingle); {Requests} {Templates} {_tplAllDone:String='ALLDONETPL'; _tplNotAllowForPoint:String='NOTFORPOINTTPL'; _tplNotSupportAddNewBoss:String='NOTNEWBOSSTPL'; _tplCantChangeAnotherBoss:String='NOTANOTHERBOSSTPL'; _tplDoneSegRequest:String='SEGMENTREQUESTTPL'; _tplDoneHelpRequest:String='HELPREQUESTTPL'; _tplPntListHeader:String='LISTHEADER'; _tplPntListFooter:String='LISTFOOTER';} {_tplAllDone:VarTagRec=( Tag:'ALLDONETPL'; Flag:_flgSingle); _tplNotAllowForPoint:VarTagRec=( Tag:'NOTFORPOINTTPL'; Flag:_flgSingle); _tplCantChangeAnotherBoss:VarTagRec=( Tag:'NOTANOTHERBOSSTPL'; Flag:_flgSingle); _tplDoneSegRequest:VarTagRec=( Tag:'SEGMENTREQUESTTPL'; Flag:_flgSingle); _tplDoneHelpRequest:VarTagRec=( Tag:'HELPREQUESTTPL'; Flag:_flgSingle); _tplStatisticRequest:VarTagRec=( Tag:'STATISTICREQUESTTPL'; Flag:_flgSingle); _tplErrorsInMessage:VarTagRec=( Tag:'ERRORSINMESSAGETPL'; Flag:_flgSingle); _tplErrorsInPointList:VarTagRec=( Tag:'ERRORSINPOINTLISTTPL'; Flag:_flgSingle);} _tplPntListHeader:VarTagRec=( Tag:'LISTHEADER'; Flag:_flgSingle); _tplPntListFooter:VarTagRec=( Tag:'LISTFOOTER'; Flag:_flgSingle); {Templates}
[ "hiddenman@8f2bff23-c20a-0410-b248-e1a4ae964857" ]
[ [ [ 1, 353 ] ] ]
aff03ff2d43cb687a4522c3c393f27f4946da4d3
a77c496f4faefb2c030e6c97deed4d4aa9a3bc0a
/rcracki_mt/branches/rcracki_mt_0.6.1/MemoryPool.cpp
9c12de22fb3f22cecb08cdfc2d5f620937f7e66b
[]
no_license
0wnrepo/rcracki_mt
7cc26abdcc53479cd163bf797645297840643542
9e59303c1abd08544b67443df37c2bc5778db94d
refs/heads/master
2021-01-20T01:11:31.891122
2011-01-14T06:08:07
2011-01-14T06:08:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,758
cpp
/* RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique. Copyright (C) Zhu Shuanglei <[email protected]> */ #include "MemoryPool.h" #include "Public.h" CMemoryPool::CMemoryPool(unsigned int bytesForChainWalkSet) { m_pMem = NULL; m_nMemSize = 0; unsigned int nAvailPhys = GetAvailPhysMemorySize(); if (nAvailPhys < 32 * 1024 * 1024) { nAvailPhys = 256 * 1024 * 1024; // There is atleast 256 mb available (Some Linux distros returns a really low GetAvailPhysMemorySize()) } m_nMemMax = nAvailPhys - bytesForChainWalkSet; // Leave memory for CChainWalkSet if (m_nMemMax < 16 * 1024 * 1024) m_nMemMax = 16 * 1024 * 1024; } CMemoryPool::~CMemoryPool() { if (m_pMem != NULL) { delete m_pMem; m_pMem = NULL; m_nMemSize = 0; } } unsigned char* CMemoryPool::Allocate(unsigned int nFileLen, unsigned int& nAllocatedSize) { if (nFileLen <= m_nMemSize) { nAllocatedSize = nFileLen; return m_pMem; } unsigned int nTargetSize; if (nFileLen < m_nMemMax) nTargetSize = nFileLen; else nTargetSize = m_nMemMax; // Free existing memory if (m_pMem != NULL) { delete m_pMem; m_pMem = NULL; m_nMemSize = 0; } // Allocate new memory //printf("allocating %u bytes memory\n", nTargetSize); m_pMem = new (nothrow) unsigned char[nTargetSize]; while (m_pMem == NULL && nTargetSize >= 32 * 1024 * 1024 ) { nTargetSize -= 16 * 1024 * 1024; m_pMem = new (nothrow) unsigned char[nTargetSize]; } if (m_pMem != NULL) { m_nMemSize = nTargetSize; nAllocatedSize = nTargetSize; return m_pMem; } else { m_nMemSize = 0; nAllocatedSize = 0; return NULL; } }
[ "neinbrucke@d3517bff-0f9d-46f7-b303-814026e826cd" ]
[ [ [ 1, 81 ] ] ]
2a33268054e07b93898b35736887807f563e3185
286232fa72afb9aafc034d3d32802541694d6e3c
/lib/complex/simplicial/SimplexCell.cpp
6c3fd9d77d55c8377cad9c478778afc2a7895db0
[]
no_license
hubwag/SComplex
dd4f15444f9816b29d39e6a1cc7ab874a6bb5ebe
0d7af7e69a13325bdd443ac53e120b1982a3b2d9
refs/heads/master
2021-01-15T20:17:53.620089
2010-05-30T22:35:16
2010-05-30T22:35:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
380
cpp
/* #include <redHom/complex/simplicial/Simplex.hpp> int SimplexCell::getColor() const { return simp->getColor(); } void SimplexCell::setColor(int col) { simp->setColor(col); } int SimplexCell::getDim() const { return simp->getDim(); } bool SimplexCell::operator<(const SimplexCell& b) const { return (this->simp->nrs) < (b.simp->nrs); } */
[ "[email protected]", "mj@mj-laptop.(none)", "[email protected]" ]
[ [ [ 1, 1 ], [ 3, 17 ], [ 22, 22 ] ], [ [ 2, 2 ] ], [ [ 18, 21 ] ] ]
ab9818e18283de0df597bfaa309d324f2c0fbe94
91b964984762870246a2a71cb32187eb9e85d74e
/SRC/OFFI SRC!/boost_1_34_1/boost_1_34_1/libs/numeric/ublas/test/common/init.hpp
1e6d5bd7d08b3cccdbfb5d3e9ff9baf3836566ab
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
willrebuild/flyffsf
e5911fb412221e00a20a6867fd00c55afca593c7
d38cc11790480d617b38bb5fc50729d676aef80d
refs/heads/master
2021-01-19T20:27:35.200154
2011-02-10T12:34:43
2011-02-10T12:34:43
32,710,780
3
0
null
null
null
null
UTF-8
C++
false
false
3,228
hpp
/* * Copyright (c) 2004 Michael Stevens * Use, modification and distribution are subject to 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) */ /* * Default construct test when possible */ template <class E> struct default_construct { static void test() {} }; template <class VC> struct default_construct<boost::numeric::ublas::vector_container<VC> > { static void test () { VC default_constuct; initialize_vector (default_constuct); std::cout << "default construct = " << default_constuct << std::endl; } }; template <class MC> struct default_construct<boost::numeric::ublas::matrix_container<MC> > { static void test () { MC default_constuct; initialize_vector (default_constuct); std::cout << "default construct = " << default_constuct << std::endl; } }; /* * Initialise test values in vector/matrix */ template<class V> void initialize_vector (V &v) { typename V::size_type size = v.size (); for (typename V::size_type i = 0; i < size; ++ i) v [i] = typename V::value_type (i + 1); } template<class M> void initialize_matrix_impl (M &m, ublas::packed_proxy_tag) { typename M::size_type size1 = m.size1 (); #ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i) for (typename M::iterator2 j = i.begin(); j != i.end(); ++ j) *j = typename M::value_type (i.index1() * size1 + j.index2() + 1); #else for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i) for (typename M::iterator2 j = ublas::begin (i, ublas::iterator1_tag ()); j != ublas::end (i, ublas::iterator1_tag ()); ++ j) *j = typename M::value_type (i.index1() * size1 + j.index2() + 1); #endif } template<class M> void initialize_matrix_impl (M &m, ublas::sparse_proxy_tag) { typename M::size_type size1 = m.size1 (); typename M::size_type size2 = m.size2 (); for (typename M::size_type i = 0; i < size1; ++ i) for (typename M::size_type j = 0; j < size2; ++ j) m (i, j) = typename M::value_type (i * size1 + j + 1.f); } template<class M> void initialize_matrix (M &m) { initialize_matrix_impl (m, typename M::storage_category()); } template<class M> void initialize_matrix (M &m, ublas::lower_tag) { typename M::size_type size1 = m.size1 (); typename M::size_type size2 = m.size2 (); for (typename M::size_type i = 0; i < size1; ++ i) { typename M::size_type j = 0; for (; j <= i; ++ j) m (i, j) = i * size1 + j + 1.f; for (; j < size2; ++ j) m (i, j) = 0.f; } } template<class M> void initialize_matrix (M &m, ublas::upper_tag) { typename M::size_type size1 = m.size1 (); typename M::size_type size2 = m.size2 (); for (typename M::size_type i = 0; i < size1; ++ i) { typename M::size_type j = 0; for (; j < i; ++ j) m (i, j) = 0.f; for (; j < size2; ++ j) m (i, j) = i * size1 + j + 1.f; } }
[ "[email protected]@e2c90bd7-ee55-cca0-76d2-bbf4e3699278" ]
[ [ [ 1, 100 ] ] ]
0382e07a32c831a93d30474172aa8ece66bc2dce
208475bcab65438eed5d8380f26eacd25eb58f70
/UpdateExe/yx_DownLoad.h
d42f28cec66d816acc3b46b9b01058e6cc6e6159
[]
no_license
awzhang/MyWork
83b3f0b9df5ff37330c0e976310d75593f806ec4
075ad5d0726c793a0c08f9158080a144e0bb5ea5
refs/heads/master
2021-01-18T07:57:03.219372
2011-07-05T02:41:55
2011-07-05T02:46:30
15,523,223
1
2
null
null
null
null
GB18030
C++
false
false
2,727
h
#ifndef _YX_DOWNLOAD_H_ #define _YX_DOWNLOAD_H_ void *G_ThreadDownLoad(void *arg); #define MAX_FRAME_LEN 1400 class CDownLoad { public: CDownLoad(); ~CDownLoad(); int Init(); int Release(); void P_ThreadDownLoad(); void P_TmRetran(); void AnalyseRecvData(char *v_szRecvBuf, DWORD v_dwRecvLen); void SendSockData(); private: void _SendOneFrame(char v_szTranType, char v_szDataType, char *v_szFrameBuf, int v_iFrameLen, bool v_bNeedRetran, DWORD v_dwRetranTm); int _WaitForAnswer(DWORD v_dwWaitTm, char v_szTranType, char v_szDataType); bool _DeleteFile(DWORD v_dwID); bool _RenewFileLst(); int _ConvertBlockSta(byte *v_bytSta_in, byte *v_bytSta_out, ushort v_usCurBlockSize); byte _GetCrc(const byte *v_bytCarId, const int v_iLen); void _GetCarId(ulong &v_ulCarId); bool _SetTimeToRtc(struct tm* v_SetTime); public: bool m_bNetFined; // 网络是否畅通 bool m_bLoginNow; // 是否立即登陆 bool m_bRtcTimeChecked; //RTC校时标志 bool m_bRtcNeedChk; //是否需要对时true:需要 false:不需要 #if WIRELESS_UPDATE_TYPE == 1 bool m_bNeedUpdate; // 使用维护中心进行远程升级,是否要升级的标志 #endif private: pthread_t m_pThreadDown; bool m_bThreadExit; // 线程退出标志 byte m_bytSta; // 状态机 ulong m_ulCarId; // 车辆ID bool m_bReturnIdl; // 是否返回空闲状态 CInnerDataMng m_objRecvMsg; // 接收队列 CInnerDataMng m_objSendMsg; // 发送队列 byte m_bytRecvBuf[MAX_FRAME_LEN + 10]; // 当前接收帧数据 DWORD m_dwRecvLen; // 当前接收帧长度 byte m_bytSendBuf[MAX_FRAME_LEN + 10]; // 当前发送帧数据 DWORD m_dwSendLen; // 当前发送帧长度 DWORD m_dwLastLoginTm; // 上次登陆时刻 FileList m_objFileList; // 文件下载列表 DWORD m_dwSoftId; DWORD m_dwLineId; DWORD m_dwFileId; // 当前正在下载的文件ID DWORD m_dwFileSize; // 当前正在下载的文件大小 DWORD m_dwDownSize; // 已下载大小 DWORD m_dwDownFrameCt; // 已下载帧数 byte m_bytMd5[32]; // 当前正在下载的加密过的md5值 byte m_bytFlstNo; // 当前下载文件在文件列表中的位置 byte m_bytFileType; bool m_bMd5ok; // 校验结果 // 当前下载 byte *m_pAllDownBuf; // 文件缓存指针 byte *m_pDownBuf; // 指针 ushort m_usBlockSize; // 块大小 ushort m_usFrameSize; // 帧大小 byte m_bytBlockSta[1024];// 块状态 ushort m_usBlockNo; // 块序号 // 其他 bool m_sended; //是否发送请求的标志 DWORD m_timeout; //接收节目数据超时时间标志 int m_informed; //发送网络故障的次数 }; #endif
[ [ [ 1, 89 ] ] ]
26b058602d298033d0cd19d73811253a4a168798
4aaf7fcab53538c906f506d6596e6e271819db80
/LzwTestDlg.h
1a716b01a3d5fd07434c13cf4d734297cbc56657
[ "MIT" ]
permissive
marknelson/LZW
b8888dde9f18aacf78bddd552b40b811afd9ba94
f6e18af09b947312e88d8153bf0779ba6a8b23c6
refs/heads/master
2020-02-26T14:51:07.470011
2011-12-24T18:26:57
2011-12-24T18:26:57
3,022,433
8
2
null
null
null
null
UTF-8
C++
false
false
1,236
h
// // Copyright (c) 2011 Mark Nelson // // This software is licensed under the OSI MIT License, contained in // the file license.txt included with this project. // // LzwTestDlg.h : header file // #pragma once #include "afxwin.h" #include "afxcmn.h" // CLzwTestDlg dialog class CLzwTestDlg : public CDialogEx { // Construction public: CLzwTestDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data enum { IDD = IDD_LZWTEST_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: // Generated message map functions virtual BOOL OnInitDialog(); virtual void OnOK(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnBnClickedPickDirButton(); afx_msg void OnBnClickedCompressButton(); afx_msg void OnBnClickedCopyData(); DECLARE_MESSAGE_MAP() void RedrawList(void); void PopulateList(CString dir); static UINT _cdecl CompressorThread( LPVOID pParam ); HICON m_hIcon; CEdit m_DirectoryName; CListCtrl m_List; CComboBox m_MaxCodeCombo; CButton m_RecurseCheckBox; CStatic m_FileInProgress; int m_MaxCodeSize; public: };
[ [ [ 1, 56 ] ] ]
27dd870e6c2162bb795962fd4b6cd9b7cd298704
13a683bacff74be42a305f22401cf1a25fcab751
/src/edgeSegmentator.cpp
b6921863d38294d5eb250e96a84ddd158fc6dfaa
[]
no_license
ivan444/overlapping-object-recognition
e15b4b5e86cdf7305ff5e710d3b3678f11d275bb
3638f20bd254a5598ceefc22bf99d9af33d7a452
refs/heads/master
2016-09-15T20:33:38.210079
2011-01-28T03:28:56
2011-01-28T03:28:56
33,362,592
0
0
null
null
null
null
ISO-8859-13
C++
false
false
6,088
cpp
#include "edgeSegmentator.h" #include <iostream> EdgeSegmentator::EdgeSegmentator(){} EdgeSegmentator::~EdgeSegmentator(){} bool compareDot(PixelCoordinates a, PixelCoordinates b) { return abs((int)a.x - (int)b.x) < 3 && abs((int)a.y - (int)b.y) < 3; } vector<EdgeSegment> EdgeSegmentator::extractFeatures (GrayImage *src, double threshold, string id, double angleThreshold) { vector<EdgeSegment> features; //GrayImage *dst; vector<PixelCoordinates> points = this->borderFind(src); vector<PixelCoordinates> points1; vector<PixelCoordinates> points2; points2 = points1 = points; int i1 = 0; int i2 = points1.size()/2; PixelCoordinates first = points1[i1]; PixelCoordinates last = points1[i2]; points1.erase(points1.begin()+i2+1,points1.end()); points2.erase(points2.begin(),points2.begin()+i2); points2.push_back(points1[0]); //EdgeSegment initSegment1(first, last); //EdgeSegment initSegment1(last, first); //divide and conquer edge segmentation vector<EdgeSegment> segments1 = this->divideAndConquer(threshold, points1, id); vector<EdgeSegment> segments2 = this->divideAndConquer(threshold, points2, id); // Spajanje segmenata koji se nalaze na istom pravcu vector<int> segs2ToDelete; for (int i = 0; i < segments1.size(); i++) { for (int j = 0; j < segments2.size(); j++) { double diffS = fabs(segments1[i].getAngle()-segments2[j].getAngle()); if(! (diffS < angleThreshold || fabs(diffS - M_PI) < angleThreshold)) continue; if (compareDot(segments1[i].getFirst(), segments2[j].getFirst())) { segments1[i].setFirst(segments2[j].getLast()); segs2ToDelete.push_back(j); } else if (compareDot(segments1[i].getFirst(), segments2[j].getLast())) { segments1[i].setFirst(segments2[j].getFirst()); segs2ToDelete.push_back(j); } else if (compareDot(segments1[i].getLast(), segments2[j].getFirst())) { segments1[i].setLast(segments2[j].getLast()); segs2ToDelete.push_back(j); } else if (compareDot(segments1[i].getLast(), segments2[j].getLast())) { segments1[i].setLast(segments2[j].getFirst()); segs2ToDelete.push_back(j); //EdgeSegment newSeg(segments1[i].getFirst(), segments1[i].getLast(), segments1[i].getImagrID()); //segments1[i] = newSeg; } } } for (int i = 0; i < segs2ToDelete.size(); i++) { segments2.erase(segments2.begin()+segs2ToDelete[i]); } features = segments1; features.insert(features.end(),segments2.begin(),segments2.end()); //računa kut izmešu trenutnog segmenta i prethodnog double alpha, beta; alpha = features[features.size()-1].getAngle(); beta = features[0].getAngle(); features[0].setAngle_A(alpha - beta); for (int i = 1; i<features.size(); i++) { alpha = features[i-1].getAngle(); beta = features[i].getAngle(); features[i].setAngle_A(alpha - beta); } return features; } vector<PixelCoordinates> EdgeSegmentator::borderFind(GrayImage *img) { vector<PixelCoordinates> points; //GrayImage *boundImg = new GrayImage(img->getWidth(), img->getHeight()); PixelCoordinates white, black; bool isOver = false; for(int y = 0; y < img->getHeight(); y++){ for(int x = 1; x < img->getWidth(); x++){ if(img->get(x-1,y).v == 255 && img->get(x,y).v == 0){ white.x = x-1; white.y = y; black.x = x; black.y = y; points = followBoundary(img, white, black); isOver = true; break; } if(isOver) break; } } return points; } vector<PixelCoordinates> EdgeSegmentator::followBoundary(GrayImage *origImg, PixelCoordinates moon, PixelCoordinates planet){ vector<PixelCoordinates> points; int xOffset[8] = {-1,-1,0,1,1,1,0,-1}; int yOffset[8] = {0,-1,-1,-1,0,1,1,1}; int offsetIter = 0; GrayPixel white; white.v = 255; //boundImg->set(planet.x, planet.y, white); PixelCoordinates start; start.x = planet.x; start.y = planet.y; points.push_back(start); for(int k = 0; k < origImg->getWidth()*origImg->getHeight(); k++){ for(int i = 1; i < 8; i++){ int orbitX = (planet.x+xOffset[(offsetIter+i)%8])%origImg->getWidth(); int orbitY = (planet.y+yOffset[(offsetIter+i)%8])%origImg->getHeight(); if(origImg->get(orbitX, orbitY).v == 0){ planet.x = orbitX; planet.y = orbitY; //boundImg->set(planet.x, planet.y, white); points.push_back(planet); offsetIter = ((int)((offsetIter+i)/2)+3)%4*2; break; } } if(start.x == planet.x && start.y == planet.y) break; } return points; } vector<EdgeSegment> EdgeSegmentator::divideAndConquer(double threshold, vector<PixelCoordinates> &points, string id) { EdgeSegment segment(points[0], points[points.size()-1], id); double dx = ((int) segment.getLast().x)- ((int) segment.getFirst().x); double dy = ((int) segment.getLast().y)- ((int) segment.getFirst().y); double a = dy; double b = -dx; double c =dx*segment.getFirst().y -dy*segment.getFirst().x; int iMax= -1, jMax= -1; double maxD = 0; PixelCoordinates maxPoint; for (int i = 0; i<points.size(); i++) { double d = points[i].x*a + points[i].y*b + c; d = abs (d/sqrt(a*a + b*b)); if (d > maxD) { maxD = d; maxPoint.x = points[i].x; maxPoint.y = points[i].y; iMax = i; } } vector<EdgeSegment> segments; if (maxD > threshold) { //EdgeSegment s1(segment.getFirst(),maxPoint); //EdgeSegment s2(maxPoint, segment.getLast()); vector<PixelCoordinates> points1, points2; points1.insert(points1.end(), points.begin(), points.begin() + iMax+1); points2.insert(points2.end(), points.begin()+iMax, points.end()); //points2.push_back(points[0]); vector<EdgeSegment> segs1 = divideAndConquer(threshold, points1, id); vector<EdgeSegment> segs2 = divideAndConquer(threshold, points2, id); segments = segs1; segments.insert(segments.end(),segs2.begin(),segs2.end()); //if (segs2.back().getAngle() != segments.back().getAngle()) //segments.push_back(segs2.back()); } else { segments.push_back(segment); } return segments; }
[ "[email protected]@6100b896-52a2-3748-62e0-4fb15095d2ea", "ivan.kristo@6100b896-52a2-3748-62e0-4fb15095d2ea", "[email protected]@6100b896-52a2-3748-62e0-4fb15095d2ea" ]
[ [ [ 1, 6 ] ], [ [ 7, 11 ], [ 33, 67 ] ], [ [ 12, 32 ], [ 68, 187 ] ] ]
7e470c5740b373d3eb254ba8cdf6f614f87f8e15
6b99c157ea698e70fca17073c680638f8e516d08
/SvpeSender.cpp
7dfee72b395541719e0becc8c1e274aafc31abb9
[]
no_license
melagabri/sendelf
3aef89b2e3e7d0424e738fbe87701672d6026fbf
beb17f02ceef3f71cf9e13cae545abe77c282764
refs/heads/master
2021-01-10T06:30:37.130626
2009-10-10T16:39:39
2009-10-10T16:39:39
54,057,363
0
0
null
null
null
null
UTF-8
C++
false
false
359
cpp
#include "StdAfx.h" #include "SvpeSender.h" #include "globals.h" CSvpeSender::CSvpeSender(void) { } CSvpeSender::~CSvpeSender(void) { } void CSvpeSender::SendHeaders() { char buf[4]; int fSize = EndianFlip(GetFilesize()); memcpy(&buf, (void *) &fSize, 4); Send((const char *) &buf, 4); } void CSvpeSender::SendArguments() { }
[ [ [ 1, 25 ] ] ]
b90e7d7e470946537f1ad9ba7c66bf128993c515
da9e4cd28021ecc9e17e48ac3ded33b798aae59c
/SRC/DRIVERS/CF_ATAPI/COMMON/atamain.cpp
462fb56150cf2526a3494b3ff5353f51efee4202
[]
no_license
hibive/sjmt6410pm090728
d45242e74b94f954cf0960a4392f07178088e560
45ceea6c3a5a28172f7cd0b439d40c494355015c
refs/heads/master
2021-01-10T10:02:35.925367
2011-01-27T04:22:44
2011-01-27T04:22:44
43,739,703
1
1
null
null
null
null
UTF-8
C++
false
false
59,478
cpp
// // Copyright (c) Microsoft Corporation. All rights reserved. // // // Use of this sample source code is subject to the terms of the Microsoft // license agreement under which you licensed this sample source code. If // you did not accept the terms of the license agreement, you are not // authorized to use this sample source code. For the terms of the license, // please see the license agreement between you and Microsoft or, if applicable, // see the LICENSE.RTF on your install media or the root of your tools installation. // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. // #include <atamain.h> #include <diskmain.h> //#include "../atapiromi/atapiromi.h" // DLL instance handle; differentiate this driver from other ATAPI instances // (what other buses?) HINSTANCE g_hInstance; // List of active devices/disks CDisk *g_pDiskRoot = NULL; // Protect global variables CRITICAL_SECTION g_csMain; // Debug extern "C" BOOL RegisterDbgZones(HMODULE hMod, LPDBGPARAM lpdbgparam); // Definitions typedef CDisk *(* POBJECTFUNCTION)(HKEY hKey); // IDE/ATA bus implementation // Constructor CIDEBUS::CIDEBUS( ) { // initialize device handle table and device registry key name table for (int i = 0; i < MAX_DEVICES_PER_CONTROLLER; i++) { m_hDevice[i] = NULL; m_szDevice[i] = NULL; m_pPort[i] = NULL; } // initialize DDKREGWINDOW structure memset(&m_dwi, 0, sizeof(m_dwi)); m_pIdeReg = NULL; m_bisIOMapped = TRUE; } // Destructor CIDEBUS::~CIDEBUS( ) { // deinitialize device handle table and device registry key name table for (int i = 0; i < MAX_DEVICES_PER_CONTROLLER; i++) { if (m_hDevice[i]) { BOOL fOk = DeactivateDevice(m_hDevice[i]); DEBUGCHK(fOk); DEBUGCHK(m_szDevice[i] != NULL); } if (m_szDevice[i] != NULL) { delete m_szDevice[i]; } } // delete IDE_ registry value set if (m_pIdeReg) { if (m_pIdeReg->pszSpawnFunction) { LocalFree(m_pIdeReg->pszSpawnFunction); } if (m_pIdeReg->pszIsrDll) { LocalFree(m_pIdeReg->pszIsrDll); } if (m_pIdeReg->pszIsrHandler) { LocalFree(m_pIdeReg->pszIsrHandler); } LocalFree(m_pIdeReg); } // deinitialize port structures for (int i = 0; i < MAX_DEVICES_PER_CONTROLLER; i++) { if (m_pPort[i]) delete m_pPort[i]; } } // IDE/ATA channel/port implementation // Constructor CPort::CPort( CIDEBUS *pParent ) { DEBUGCHK(pParent); InitializeCriticalSection(&m_csPort); // hook up bus m_pController = pParent; // initialize flags m_fInitialized = 0; m_dwFlag = 0; // initialize I/O ports m_dwRegBase = 0; m_dwRegAlt = 0; m_dwBMR = 0; m_dwBMRStatic = 0; // initialize interrupt data m_hIRQEvent = NULL; m_hThread = NULL; m_dwSysIntr = SYSINTR_NOP; m_dwIrq = IRQ_UNSPECIFIED; // initialize master/slave registry value set m_pDskReg[0] = NULL; m_pDskReg[1] = NULL; // initialize master/slave stream interface handles m_pDisk[0] = NULL; m_pDisk[1] = NULL; } // Destructor CPort::~CPort( ) { DeleteCriticalSection(&m_csPort); // unmap ATA channel's I/O windows if they had been memory mapped if (!m_pController->m_bisIOMapped) { if (m_dwRegBase) { MmUnmapIoSpace((LPVOID)m_dwRegBase, ATA_REG_LENGTH); } if (m_dwRegAlt) { MmUnmapIoSpace((LPVOID)m_dwRegAlt, ATA_REG_LENGTH); } if (m_dwBMR) { MmUnmapIoSpace((LPVOID)m_dwBMR, 16); } } // close interrupt event handle if (m_hIRQEvent) { CloseHandle(m_hIRQEvent); } // close interrupt thread if (m_hThread) { CloseHandle(m_hThread); } // disable interrupt if (m_dwSysIntr != SYSINTR_NOP) { InterruptDisable(m_dwSysIntr); } // free DSK_ registry value set if (m_pDskReg[0]) { LocalFree(m_pDskReg[0]); } if (m_pDskReg[1]) { LocalFree(m_pDskReg[1]); } } // Acquire exclusive access to IDE/ATA channel's I/O window VOID CPort::TakeCS( ) { EnterCriticalSection(&m_csPort); } // Release exclusive access to IDE/ATA channel's I/O window VOID CPort::ReleaseCS( ) { LeaveCriticalSection(&m_csPort); } // Write I/O window and interrupt data to debug output VOID CPort::PrintInfo( ) { DEBUGMSG(ZONE_INIT, (TEXT("dwRegBase = %08X\r\n"), m_dwRegBase)); DEBUGMSG(ZONE_INIT, (TEXT("dwRegAlt = %08X\r\n"), m_dwRegAlt)); DEBUGMSG(ZONE_INIT, (TEXT("dwBMR = %08X\r\n"), m_dwBMR)); DEBUGMSG(ZONE_INIT, (TEXT("dwSysIntr = %08X\r\n"), m_dwSysIntr)); DEBUGMSG(ZONE_INIT, (TEXT("dwIrq = %08X\r\n"), m_dwIrq)); DEBUGMSG(ZONE_INIT, (TEXT("dwBMRStatic = %08X\r\n"), m_dwBMRStatic)); } // Helper functions // This function is used by an Xxx_Init function to fetch the name of and return // a handle to the instance/device ("Key") key from an Active key HKEY AtaLoadRegKey( HKEY hActiveKey, TCHAR **pszDevKey ) { DWORD dwValueType; // registry value type DWORD dwValueLength = 0; // registry value length PTSTR szDeviceKey = NULL; // name of device key; value associated with "Key" HKEY hDeviceKey = NULL; // handle to device key; handle to "Key" // query the value of "Key" with @dwValueLength=0, to determine the actual // length of the value (so as to allocate the exact amount of memory) if (ERROR_SUCCESS == RegQueryValueEx(hActiveKey, DEVLOAD_DEVKEY_VALNAME, NULL, &dwValueType, NULL, &dwValueLength)) { // allocate just enough memory to store the value of "Key" szDeviceKey = (PTSTR)LocalAlloc(LPTR, dwValueLength); if (szDeviceKey) { // read the actual value of "Key" and null terminate the target buffer if ( ERROR_SUCCESS == RegQueryValueEx(hActiveKey, DEVLOAD_DEVKEY_VALNAME, NULL, &dwValueType, (PBYTE)szDeviceKey, &dwValueLength)) { DEBUGCHK(dwValueLength != 0); szDeviceKey[(dwValueLength / sizeof(TCHAR)) - 1] = 0; // open the device key if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, szDeviceKey, 0, 0, &hDeviceKey)) { DEBUGMSG(ZONE_INIT, (_T( "AtaLoadRegyKey> Failed to open %s\r\n" ), szDeviceKey)); hDeviceKey = NULL; } } } } if (!hDeviceKey) { if (szDeviceKey) { LocalFree(szDeviceKey); } *pszDevKey = NULL; } else { *pszDevKey = szDeviceKey; } return hDeviceKey; } // This function is used to determine whether a target disk instance is valid BOOL AtaIsValidDisk( CDisk *pDisk ) { CDisk *pTemp = g_pDiskRoot; while (pTemp) { if (pTemp == pDisk) { return TRUE; } pTemp = pTemp->m_pNextDisk; } return FALSE; } // This function is used to fetch an IDE/ATA channel's I/O window from its instance // key; this function recovers gracefully if an OEM has a proprietary registry // configuration that doesn't specify bus type or bus number BOOL AtaGetRegistryResources( HKEY hDevKey, PDDKWINDOWINFO pdwi ) { DEBUGCHK(pdwi != NULL); if (!pdwi) { return FALSE; } // fetch I/O window information pdwi->cbSize = sizeof(*pdwi); if (ERROR_SUCCESS != ::DDKReg_GetWindowInfo(hDevKey, pdwi)) { return FALSE; } // if interface not specified, then assume PCI if (pdwi->dwInterfaceType == InterfaceTypeUndefined) { DEBUGMSG(ZONE_WARNING, (_T( "Atapi!AtaGetRegistryResources> bus type not specified, using PCI as default\r\n" ))); pdwi->dwInterfaceType = PCIBus; } return TRUE; } // This function translates a bus address in an I/O window to a virtual address DWORD DoIoTranslation( PDDKWINDOWINFO pdwi, DWORD dwIoWindowIndex, PBOOL pbisIOmapped ) { PHYSICAL_ADDRESS PhysicalAddress; // bus address DWORD AddressSpace = 1; // mark bus address as being in an I/O window LPVOID pAddress; // return DEBUGCHK(pbisIOmapped != NULL); *pbisIOmapped = TRUE; DEBUGCHK(pdwi != NULL); DEBUGCHK(dwIoWindowIndex < MAX_DEVICE_WINDOWS); if (!pdwi) { return NULL; } // extract the target bus address PhysicalAddress.HighPart = 0; PhysicalAddress.LowPart = pdwi->ioWindows[dwIoWindowIndex].dwBase; // translate the target bus address to a virtual address if (!TransBusAddrToVirtual( (INTERFACE_TYPE)pdwi->dwInterfaceType, pdwi->dwBusNumber, PhysicalAddress, pdwi->ioWindows[dwIoWindowIndex].dwLen, &AddressSpace, &pAddress )) { return NULL; } *pbisIOmapped = BOOL(AddressSpace); return (DWORD)pAddress; } // This function translates a bus address to a statically physical address DWORD DoStaticTranslation( PDDKWINDOWINFO pdwi, DWORD dwIoWindowIndex ) { PHYSICAL_ADDRESS PhysicalAddress; // bus address DWORD AddressSpace = 1; // mark bus address as being in an I/O window LPVOID pAddress; // return DEBUGCHK(pdwi != NULL); DEBUGCHK(dwIoWindowIndex < MAX_DEVICE_WINDOWS); if (!pdwi) { return NULL; } // extract bus address PhysicalAddress.HighPart = 0; PhysicalAddress.LowPart = pdwi->ioWindows[dwIoWindowIndex].dwBase; // translate the target bus address to a statically mapped physical address if (!TransBusAddrToStatic( (INTERFACE_TYPE)pdwi->dwInterfaceType, pdwi->dwBusNumber, PhysicalAddress, pdwi->ioWindows[dwIoWindowIndex].dwLen, &AddressSpace, &pAddress )) { return NULL; } return (DWORD)pAddress; } // This function reads the IDE registry value set from the IDE/ATA controller's // registry key BOOL GetIDERegistryValueSet( HKEY hIDEInstanceKey, PIDEREG pIdeReg ) { BOOL fRet; DEBUGCHK(NULL != pIdeReg); // fetch legacy boolean fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_LEGACY, &pIdeReg->dwLegacy); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_LEGACY)); return FALSE; } if (pIdeReg->dwLegacy >= 2) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Bad value(%d) for %s in IDE instance key; valid: {0, 1}\r\n" ), pIdeReg->dwLegacy, REG_VAL_IDE_LEGACY)); return FALSE; } // fetch IRQ; this value is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_IRQ, &pIdeReg->dwIrq); if (!fRet) { pIdeReg->dwIrq = IRQ_UNSPECIFIED; } // fetch SysIntr; this is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_SYSINTR, &pIdeReg->dwSysIntr); if (!fRet) { pIdeReg->dwSysIntr = SYSINTR_NOP; } // fetch vendor id; this is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_VENDORID, &pIdeReg->dwVendorId); if (!fRet) { pIdeReg->dwVendorId = 0; } // fetch DMA alignment; this is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_DMAALIGNMENT, &pIdeReg->dwDMAAlignment); if (!fRet) { pIdeReg->dwDMAAlignment = 0; } // fetch soft reset timeout fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_SOFTRESETTIMEOUT, &pIdeReg->dwSoftResetTimeout); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_SOFTRESETTIMEOUT)); return FALSE; } // fetch Status register poll cycles fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_STATUSPOLLCYCLES, &pIdeReg->dwStatusPollCycles); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_STATUSPOLLCYCLES)); return FALSE; } // fetch Status register polls per cycle fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_STATUSPOLLSPERCYCLE, &pIdeReg->dwStatusPollsPerCycle); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_STATUSPOLLSPERCYCLE)); return FALSE; } // fetch Status register poll cycle pause fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_STATUSPOLLCYCLEPAUSE, &pIdeReg->dwStatusPollCyclePause); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_STATUSPOLLCYCLEPAUSE)); return FALSE; } // fetch spawn function fRet = AtaGetRegistryString(hIDEInstanceKey, REG_VAL_IDE_SPAWNFUNCTION, &pIdeReg->pszSpawnFunction); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_SPAWNFUNCTION)); return FALSE; } // fetch ISR dll; this is not mandatory; allocate pszIsrDll fRet = AtaGetRegistryString(hIDEInstanceKey, REG_VAL_IDE_ISRDLL, &pIdeReg->pszIsrDll, 0); if (!fRet) { pIdeReg->pszIsrDll = NULL; } // fetch ISR handler; this is not mandatory; allocate pszIsrHandler fRet = AtaGetRegistryString(hIDEInstanceKey, REG_VAL_IDE_ISRHANDLER, &pIdeReg->pszIsrHandler, 0); if (!fRet) { pIdeReg->pszIsrHandler = NULL; } // fetch device control offset; this is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_DEVICECONTROLOFFSET, &pIdeReg->dwDeviceControlOffset); if (!fRet) { // this value is only used by atapipcmcia pIdeReg->dwDeviceControlOffset = ATA_REG_ALT_STATUS; } // fetch alternate status offset; this is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_ALTERNATESTATUSOFFSET, &pIdeReg->dwAlternateStatusOffset); if (!fRet) { // this value is only used by atapipcmcia pIdeReg->dwAlternateStatusOffset = ATA_REG_DRV_CTRL; } // fetch register stride fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_REGISTERSTRIDE, &pIdeReg->dwRegisterStride); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Failed to read %s from IDE instance key\r\n" ), REG_VAL_IDE_REGISTERSTRIDE)); return FALSE; } if (0 == pIdeReg->dwRegisterStride) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetIDERegistryValueSet> Bad value(%d) for %s in IDE instance key; valid: > 0\r\n" ), pIdeReg->dwRegisterStride, REG_VAL_IDE_REGISTERSTRIDE)); return FALSE; } // fetch disable 48-bit LBA boolean; this is not mandatory fRet = AtaGetRegistryValue(hIDEInstanceKey, REG_VAL_IDE_DISABLE48BITLBA, &pIdeReg->dwDisable48BitLBA); if (!fRet) { pIdeReg->dwDisable48BitLBA = 0; } return TRUE; } // This function reads the DSK registry value set from the IDE/ATA controller's // registry key BOOL GetDSKRegistryValueSet( HKEY hDSKInstanceKey, PDSKREG pDskReg ) { BOOL fRet; // fetch device ID fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_DEVICEID, &pDskReg->dwDeviceId); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_DEVICEID)); return FALSE; } if (!((0 <= pDskReg->dwDeviceId) && (pDskReg->dwDeviceId <= 3))) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {0, 1, 2, 3}\r\n" ), pDskReg->dwDeviceId, REG_VAL_DSK_DEVICEID)); return FALSE; } // fetch interrupt driven I/O boolean fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_INTERRUPTDRIVEN, &pDskReg->dwInterruptDriven); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_INTERRUPTDRIVEN)); return FALSE; } if (pDskReg->dwInterruptDriven >= 2) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {0, 1}\r\n" ), pDskReg->dwInterruptDriven, REG_VAL_DSK_INTERRUPTDRIVEN)); return FALSE; } // fetch DMA triple fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_DMA, &pDskReg->dwDMA); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_DMA)); pDskReg->dwDMA = 0; } if (pDskReg->dwDMA >= 3) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {0=no DMA, 1=DMA, 2=ATA DMA only}\r\n" ), pDskReg->dwDMA, REG_VAL_DSK_DMA)); return FALSE; } // fetch double buffer size fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_DOUBLEBUFFERSIZE, &pDskReg->dwDoubleBufferSize); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_DOUBLEBUFFERSIZE)); return FALSE; } if ((0 != pDskReg->dwDoubleBufferSize) && ((pDskReg->dwDoubleBufferSize < REG_VAL_DSK_DOUBLEBUFFERSIZE_MIN) || (pDskReg->dwDoubleBufferSize > REG_VAL_DSK_DOUBLEBUFFERSIZE_MAX))) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {%d, ..., %d}\r\n" ), pDskReg->dwDoubleBufferSize, REG_VAL_DSK_DOUBLEBUFFERSIZE, REG_VAL_DSK_DOUBLEBUFFERSIZE_MIN, REG_VAL_DSK_DOUBLEBUFFERSIZE_MAX)); return FALSE; } if (0 != (pDskReg->dwDoubleBufferSize % SECTOR_SIZE)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; must be multiple of %d\r\n" ), pDskReg->dwDoubleBufferSize, REG_VAL_DSK_DOUBLEBUFFERSIZE, SECTOR_SIZE)); return FALSE; } // fetch DRQ data block size fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_DRQDATABLOCKSIZE, &pDskReg->dwDrqDataBlockSize); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_DRQDATABLOCKSIZE)); return FALSE; } if (pDskReg->dwDrqDataBlockSize > REG_VAL_DSK_DRQDATABLOCKSIZE_MAX) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {%d, ..., %d}\r\n" ), pDskReg->dwDrqDataBlockSize, REG_VAL_DSK_DRQDATABLOCKSIZE, REG_VAL_DSK_DRQDATABLOCKSIZE_MIN, REG_VAL_DSK_DRQDATABLOCKSIZE_MAX)); return FALSE; } if (0 != (pDskReg->dwDrqDataBlockSize % SECTOR_SIZE)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; must be multiple of %d\r\n" ), pDskReg->dwDrqDataBlockSize, REG_VAL_DSK_DRQDATABLOCKSIZE, SECTOR_SIZE)); return FALSE; } // fetch write cache boolean fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_WRITECACHE, &pDskReg->dwWriteCache); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_WRITECACHE)); return FALSE; } if (pDskReg->dwWriteCache >= 2) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {0, 1}\r\n" ), pDskReg->dwWriteCache, REG_VAL_DSK_WRITECACHE)); return FALSE; } // fetch look-ahead boolean fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_LOOKAHEAD, &pDskReg->dwLookAhead); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_LOOKAHEAD)); return FALSE; } if (pDskReg->dwLookAhead >= 2) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Bad value(%d) for %s in DSK instance key; valid: {0, 1}\r\n" ), pDskReg->dwLookAhead, REG_VAL_DSK_LOOKAHEAD)); return FALSE; } // fetch transfer mode fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_TRANSFERMODE, &pDskReg->dwTransferMode); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_TRANSFERMODE)); return FALSE; } fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_ENABLE_PDMA, &pDskReg->dwEnablePDMA); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_ENABLE_PDMA)); pDskReg->dwEnablePDMA= 0; } fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_ENABLE_UDMA, &pDskReg->dwEnableUDMA); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_ENABLE_UDMA)); pDskReg->dwEnableUDMA= 0; } fRet = AtaGetRegistryValue(hDSKInstanceKey, REG_VAL_DSK_INDIRECT_MODE, &pDskReg->dwIndirectMode); if (!fRet) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!GetDSKRegistryValueSet> Failed to read %s from DSK instance key\r\n" ), REG_VAL_DSK_ENABLE_UDMA)); pDskReg->dwIndirectMode= 0; } return TRUE; } // This function reads the I/O window data from the IDE instance key and builds // the I/O ports for the primary and secondary IDE controller channels BOOL GetIoPort( HKEY hDevKey, PTSTR szDevKey, CIDEBUS *pBus ) { BOOL fRet = FALSE; BOOL isIOMapped = FALSE; DEBUGCHK(pBus); DEBUGCHK(pBus->m_pPort[ATA_PRIMARY]); DEBUGCHK(pBus->m_pPort[ATA_SECONDARY]); // TODO: What if the IDE/ATA controller only supports a single device on // TODO: (con't) a single channel and bus mastering? // fetch the IDE/ATA channel's I/O window; a channel can contain a single device // or a master and a slave device; each device requires a device control I/O // window and an alternate status I/O window; if the IDE/ATA controller supports // bus mastering, then a bus master I/O window will be present if ( (!AtaGetRegistryResources(hDevKey, &pBus->m_dwi)) || (pBus->m_dwi.dwNumIoWindows < 2) ) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!BuildPortSet> Resource configuration missing or invalid in device key(%s)\r\n" ), szDevKey)); goto exit; } // save the base virtual addresss of the device control (RegBase) // and alternate status (RegAlt) I/O windows pBus->m_pPort[ATA_PRIMARY]->m_dwRegBase = DoIoTranslation(&pBus->m_dwi, 0,&isIOMapped); pBus->m_bisIOMapped = isIOMapped; pBus->m_pPort[ATA_PRIMARY]->m_dwRegAlt = DoIoTranslation(&pBus->m_dwi, 1,&isIOMapped); DEBUGCHK(pBus->m_bisIOMapped == isIOMapped); // If one register is IO/memory mapped so are all others pBus->m_pPort[ATA_PRIMARY]->m_fInitialized = TRUE; if (pBus->m_dwi.dwNumIoWindows >= 4) { // this channel supports a primary and secondary IDE/ATA channels; save // the base virtual addresses of the secondary channel's devoce control // and alternate status I/O windows pBus->m_pPort[ATA_SECONDARY]->m_dwRegBase = DoIoTranslation(&pBus->m_dwi, 2,&isIOMapped); DEBUGCHK(pBus->m_bisIOMapped == isIOMapped); // If one register is IO/memory mapped so are all others pBus->m_pPort[ATA_SECONDARY]->m_dwRegAlt = DoIoTranslation(&pBus->m_dwi, 3,&isIOMapped); DEBUGCHK(pBus->m_bisIOMapped == isIOMapped); // If one register is IO/memory mapped so are all others pBus->m_pPort[ATA_SECONDARY]->m_fInitialized = TRUE; } if (pBus->m_dwi.dwNumIoWindows >= 5) { // the IDE/ATA controller supports bus mastering; save the base virtual // address of each channel's bus master I/O window DEBUGCHK(pBus->m_dwi.ioWindows[4].dwLen >= 16); pBus->m_pPort[ATA_PRIMARY]->m_dwBMR = DoIoTranslation(&pBus->m_dwi, 4,&isIOMapped); DEBUGCHK(pBus->m_bisIOMapped == isIOMapped); // If one register is IO/memory mapped so are all others pBus->m_pPort[ATA_PRIMARY]->m_dwBMRStatic= DoStaticTranslation(&pBus->m_dwi, 4); pBus->m_pPort[ATA_SECONDARY]->m_dwBMR = pBus->m_pPort[ATA_PRIMARY]->m_dwBMR + 8; pBus->m_pPort[ATA_SECONDARY]->m_dwBMRStatic = pBus->m_pPort[ATA_PRIMARY]->m_dwBMRStatic + 8; } fRet = TRUE; exit: return fRet; } // IDE/ATA and ATA/ATAPI device stream interface /*++ DSK_Init This function is called as a result of IDE_Init calling ActivateDevice on HKLM\Drivers\@BUS\@IDEAdapter\DeviceX, to initialize a master or slave device on a particular IDE/ATA channel of a particular IDE/ATA controller. That is, an "IDE" driver is a bus driver for devices to one its IDE/ATA controller's channels. This function is responsible for creating a CDisk instance to associate with a device. This function reads the "Object" value from its instance key to determine which CDisk (sub)type to instantiate and calls Init on the CDisk instance to initialize the device. If the device is not present, then Init will fail. The "Object" value maps to a function that creates an instance of the target CDisk (sub)type. Note that this driver model is convoluted. A CDisk (sub)type instance corresponds to both an IDE/ATA controller and an ATA/ATAPI device. Parameters: dwContext - pointer to string containing the registry path to the active key of the associated device; the active key contains a key to the device's instance key, which stores all of the device's configuration information Return: On success, return handle to device (to identify device); this handle is passed to all subsequent DSK_Xxx calls. Otherwise, return null. --*/ #define DSKINIT_UNDO_CLS_KEY_ACTIVE 0x1 #define DSKINIT_UNDO_CLS_KEY_DEVICE 0x2 EXTERN_C DWORD DSK_Init( DWORD dwContext ) { DWORD dwUndo = 0; // undo bitset PTSTR szActiveKey = (PTSTR)dwContext; // name of device's active key HKEY hActiveKey; // handle to device's active key PTSTR szDevKey = NULL; // name of device's instance key HKEY hDevKey; // handle to device's instance key POBJECTFUNCTION pObject = NULL; // pointer to spawn function CPort *pPort = NULL; // port DWORD dwDeviceId = 0; // device ID; 0 => master, 1 => slave CDisk *pDisk = NULL; // return // guard global data; i.e., g_pDiskRoot EnterCriticalSection(&g_csMain); // open device's active key if ((ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, szActiveKey, 0, 0, &hActiveKey))) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!DSK_Init> Failed to open device's active key(%s)\r\n" ), szActiveKey)); goto exit; } dwUndo |= DSKINIT_UNDO_CLS_KEY_ACTIVE; DUMPREGKEY(ZONE_PCI, szActiveKey, hActiveKey); // read name of and open device's instance key from device's active key if (!(hDevKey = AtaLoadRegKey(hActiveKey, &szDevKey))) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!DSK_Init> Failed to fetch/open device's instance key from device's active key(%s)\r\n" ), szActiveKey)); goto exit; } dwUndo |= DSKINIT_UNDO_CLS_KEY_DEVICE; DUMPREGKEY(ZONE_PCI, szDevKey, hDevKey); // fetch heap address of port instance from device's instance key if (!AtaGetRegistryValue(hDevKey, REG_VALUE_PORT, (PDWORD)&pPort)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!DSK_Init> Failed to read address of port instance from device's instance key(%s)\r\n" ), szDevKey)); goto exit; } // fetch device ID from device's instance key; this informs the CDisk // instance as to which device (i.e., master/slave) it is if (!AtaGetRegistryValue(hDevKey, REG_VAL_DSK_DEVICEID, &dwDeviceId)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!DSK_Init> Failed to read device ID device's instance key(%s)\r\n" ), szDevKey)); goto exit; } // resolve address of spawn function pObject = (POBJECTFUNCTION)GetProcAddress(g_hInstance, pPort->m_pController->m_pIdeReg->pszSpawnFunction); if (!pObject) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!DSK_Init> Failed to resolve address of device's spawn function(%s)\r\n" ), pPort->m_pController->m_pIdeReg->pszSpawnFunction)); goto exit; } // instantiate CDisk object pDisk = pObject(hDevKey); // if successful, write the name of the device's active and instance keys to // its CDisk instance, and add the CDisk instance to the IDE/ATA bus driver's // list of active disk devices if (pDisk) { // allocate the sterile, maximal SG_REQ for safe I/O pDisk->m_pSterileIoRequest = (PSG_REQ)LocalAlloc( LPTR, (sizeof(SG_REQ) + ((MAX_SG_BUF) - 1) * sizeof(SG_BUF)) ); if (NULL == pDisk->m_pSterileIoRequest) { delete pDisk; pDisk = NULL; goto exit; } // this information is used for ATA/ATAPI power management pDisk->SetActiveKey(szActiveKey); pDisk->SetDeviceKey(szDevKey); // inform the CDisk instance as to which device it is pDisk->m_pPort = pPort; pDisk->m_dwDeviceId = dwDeviceId; pDisk->m_dwDevice = dwDeviceId; // configure register block pDisk->ConfigureRegisterBlock(pPort->m_pController->m_pIdeReg->dwRegisterStride); // initialize device if (!pDisk->Init(hActiveKey)) { delete pDisk; pDisk = NULL; goto exit; } pDisk->GetDeviceInfo(&pDisk->m_storagedeviceinfo); // add CDisk instance to IDE/ATA controller's list of active devices pDisk->m_pNextDisk = g_pDiskRoot; g_pDiskRoot = pDisk; DEBUGMSG(ZONE_INIT, (_T( "Atapi!DSK_Init> Initialized %s %s on %s\r\n" ), ((pPort == pPort->m_pController->m_pPort[ATA_PRIMARY]) ? (_T("PRIMARY")) : (_T("SECONDARY"))), ((dwDeviceId == 0) ? (_T("MASTER")) : (_T("SLAVE"))), szDevKey )); } exit:; // clean up if (dwUndo & DSKINIT_UNDO_CLS_KEY_ACTIVE) { RegCloseKey(hActiveKey); } if (NULL == pDisk) { if (dwUndo & DSKINIT_UNDO_CLS_KEY_DEVICE) { RegCloseKey(hDevKey); } // pPort is deleted in IDE_Deinit } if (szDevKey) { LocalFree(szDevKey); } LeaveCriticalSection(&g_csMain); return (DWORD)pDisk; } /*++ DSK_Deinit This function deallocates the associated CDisk instance. Parameters: dwHandle - pointer to associated CDisk instance (initially returned by DSK_Init) Return: This function always succeeds. --*/ EXTERN_C BOOL DSK_Deinit( DWORD dwHandle ) { CDisk *pDiskPrev = NULL; CDisk *pDiskCur = g_pDiskRoot; EnterCriticalSection(&g_csMain); // find the CDisk instance in global CDisk list while (pDiskCur) { if (pDiskCur == (CDisk *)dwHandle) { break; } pDiskPrev = pDiskCur; pDiskCur = pDiskCur->m_pNextDisk; } // remove CDisk instance from global CDisk list if (pDiskCur) { if (pDiskPrev) { pDiskPrev = pDiskCur->m_pNextDisk; } else { g_pDiskRoot = pDiskCur->m_pNextDisk; } delete pDiskCur; } LeaveCriticalSection(&g_csMain); return TRUE; } /*++ DSK_Open This function opens a CDisk instance for use. Parameters: dwHandle - pointer to associated CDisk instance (initially returned by DSK_Init) dwAccess - specifes how the caller would like too use the device (read and/or write) [this argument is ignored] dwShareMode - specifies how the caller would like this device to be shared [this argument is ignored] Return: On success, return handle to "open" CDisk instance; this handle is the same as dwHandle. Otherwise, return null. --*/ EXTERN_C DWORD DSK_Open( HANDLE dwHandle, DWORD dwAccess, DWORD dwShareMode ) { CDisk *pDisk = (CDisk *)dwHandle; EnterCriticalSection(&g_csMain); // validate the CDisk instance if (!AtaIsValidDisk(pDisk)) { pDisk = NULL; } LeaveCriticalSection(&g_csMain); // if the CDisk instance is valid, then open; open just increments the // instance's open count if (pDisk) { pDisk->Open(); } return (DWORD)pDisk; } /*++ DSK_Close This function closes a CDisk instance. Parameters: dwHandle - pointer to associated CDisk instance (initially returned by DSK_Init) Return: On success, return true. Otherwise, return false. --*/ EXTERN_C BOOL DSK_Close( DWORD dwHandle ) { CDisk *pDisk = (CDisk *)dwHandle; EnterCriticalSection(&g_csMain); // validate the CDisk instance if (!AtaIsValidDisk(pDisk)) { pDisk = NULL; } LeaveCriticalSection(&g_csMain); // if CDisk instance is valid, then close; close just decrements the // instance's open count if (pDisk) { pDisk->Close(); } return (pDisk != NULL); } /*++ DSK_IOControl This function processes an IOCTL_DISK_Xxx/DISK_IOCTL_Xxx I/O control. Parameters: dwHandle - pointer to associated CDisk instance (initially returned by DSK_Init) dwIOControlCode - I/O control to perform pInBuf - pointer to buffer containing the input data of the I/O control nInBufSize - size of pInBuf (bytes) pOutBuf - pointer to buffer that is to receive the output data of the I/O control nOutBufSize - size of pOutBuf (bytes) pBytesReturned - pointer to DWORD that is to receive the size (bytes) of the output data of the I/O control pOverlapped - ignored Return: On success, return true. Otherwise, return false. --*/ EXTERN_C BOOL DSK_IOControl( DWORD dwHandle, DWORD dwIoControlCode, PBYTE pInBuf, DWORD nInBufSize, PBYTE pOutBuf, DWORD nOutBufSize, PDWORD pBytesReturned, PDWORD pOverlapped) { CDisk *pDisk = (CDisk *)dwHandle; DWORD SafeBytesReturned = 0; BOOL fRet = FALSE; PVOID pMarshalledInBuf = NULL; PVOID pMarshalledOutBuf = NULL; //if caller is not kernel mode, do not allow setting power state if (GetDirectCallerProcessId() != GetCurrentProcessId()){ return ERROR_ACCESS_DENIED; } EnterCriticalSection(&g_csMain); // validate CDisk instance if (!AtaIsValidDisk(pDisk)) { pDisk = NULL; } LeaveCriticalSection(&g_csMain); if (!pDisk) { return FALSE; } if(FAILED(CeOpenCallerBuffer(&pMarshalledInBuf, pInBuf, nInBufSize, ARG_I_PTR, TRUE))) { RETAILMSG(1, (TEXT("DSK_IOControl: CeOpenCallerBuffer failed in ATAPI for IN buf.\r\n"))); return FALSE; } if(FAILED(CeOpenCallerBuffer(&pMarshalledOutBuf, pOutBuf, nOutBufSize, ARG_O_PTR, TRUE))) { RETAILMSG(1, (TEXT("DSK_IOControl: CeOpenCallerBuffer failed in ATAPI for OUT buf.\r\n"))); return FALSE; } // DISK_IOCTL_INITIALIZED is a deprecated IOCTL; what does PostInit do? if (dwIoControlCode == DISK_IOCTL_INITIALIZED) { fRet = pDisk->PostInit((PPOST_INIT_BUF)pMarshalledInBuf); } else { IOREQ IOReq; // build I/O request structure memset(&IOReq, 0, sizeof(IOReq)); IOReq.dwCode = dwIoControlCode; IOReq.pInBuf = pMarshalledInBuf; IOReq.dwInBufSize = nInBufSize; IOReq.pOutBuf = pMarshalledOutBuf; IOReq.dwOutBufSize = nOutBufSize; IOReq.pBytesReturned = &SafeBytesReturned; IOReq.hProcess = GetCallerProcess(); // perform I/O control __try { fRet = pDisk->PerformIoctl(&IOReq); // if the caller supplied pBytesReturned, then write the value // from our safe copy if (pBytesReturned) { *pBytesReturned = SafeBytesReturned; } } __except(EXCEPTION_EXECUTE_HANDLER) { fRet = FALSE; SetLastError(ERROR_GEN_FAILURE); } } if(FAILED(CeCloseCallerBuffer(pMarshalledInBuf, pInBuf, nInBufSize, ARG_I_PTR))) { RETAILMSG(1, (TEXT("DSK_IOControl: CeCloseCallerBuffer failed in ATAPI for IN buf.\r\n"))); return FALSE; } if(FAILED(CeCloseCallerBuffer(pMarshalledOutBuf, pOutBuf, nOutBufSize, ARG_O_PTR))) { RETAILMSG(1, (TEXT("DSK_IOControl: CeCloseCallerBuffer failed in ATAPI for OUT buf.\r\n"))); return FALSE; } return fRet; } /*++ DSK_PowerUp This function resumes the device. Parameters: None Return: On success, return true. Otherwise, return false. --*/ EXTERN_C VOID DSK_PowerUp( VOID ) { EnterCriticalSection(&g_csMain); CDisk *pDisk = g_pDiskRoot; // iterate through the global CDisk list and direct each CDisk instance to // power up its associated device while (pDisk) { pDisk->PowerUp(); pDisk = pDisk->m_pNextDisk; } LeaveCriticalSection(&g_csMain); } /*++ DSK_PowerDown This function suspends a device. Parameters: None Return: On success, return true. Otherwise, return false. --*/ EXTERN_C VOID DSK_PowerDown( VOID ) { EnterCriticalSection(&g_csMain); CDisk *pDisk = g_pDiskRoot; // iterate through the global CDisk list and direct each CDist instance to // power down its associated device while (pDisk) { pDisk->PowerDown(); pDisk = pDisk->m_pNextDisk; } LeaveCriticalSection(&g_csMain); } /*++ IDE_Init This function is called as a result of a bus driver enumerating an IDE/ATA controller. Each IDE/ATA controller is a "bus". An IDE/ATA controller contains at most two channels, and each channel can contain a master and a slave device. An IDE/ATA controller's instance key will typically contain the following subkeys: Device0, Device1, Device2, and Device3. Device0 is the master device on the primary channel. Device1 is the slave device on the primary channel. Device2 is the master device on the secondary channel. Device3 is the slave device on the secondary. This function is responsible for searching the driver's instance key for DeviceX subkeys and calling ActivateDevice on each DeviceX subkey found. The call to ActivateDevice will eventually enter DSK_Init. DSK_Init is responsible for creating a CDisk instance to associate with a device. If a device is present and intialization succeeds, then DSK_Init will succeed. Parameters: dwContext - pointer to string containing the registry path to the active key of the IDE/ATA controller; the active key contains a key to the IDE/ATA controller's instance key, which stores all of the IDE/ATA controller's configuration information Return: On success, return handle to IDE/ATA controller (for identification); this handle is passed to all subsequent IDE_Xxx calls. Otherwise, return null. --*/ #define IDEINIT_UNDO_CLS_KEY_ACTIVE 0x01 #define IDEINIT_UNDO_CLS_KEY_DEVICE 0x02 #define IDEINIT_UNDO_DEL_BUS 0x04 #define IDEINIT_UNDO_DEL_PORT_PRI 0x08 #define IDEINIT_UNDO_DEL_PORT_SEC 0x10 #define IDEINIT_UNDO_DEL_REG_IDE 0x20 #define IDEINIT_UNDO_DEL_REG_DSK 0x40 EXTERN_C DWORD IDE_Init( DWORD dwContext ) { DWORD dwUndo = 0; // undo bitset PTSTR szActiveKey = (PTSTR)dwContext; // name of IDE/ATA controller's active key HKEY hActiveKey; // handle to IDE/ATA controller's active key PTSTR szDevKey = NULL; // name of IDE/ATA controller's instance key HKEY hDevKey; // handle to IDE/ATA controller's instance key PDSKREG pDskReg = NULL; // ATA/ATAPI device's registry value set CIDEBUS *pBus = NULL; // return // open the IDE/ATA controllers's active key if ((ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, szActiveKey, 0, 0, &hActiveKey)) || (!hActiveKey)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to open IDE/ATA controller's active key(%s)\r\n" ), szActiveKey)); goto exit; } dwUndo |= IDEINIT_UNDO_CLS_KEY_ACTIVE; DUMPREGKEY(ZONE_PCI, szActiveKey, hActiveKey); // fetch the name of the IDE/ATA controller's instance key and open it if (!(hDevKey = AtaLoadRegKey(hActiveKey, &szDevKey)) || !szDevKey) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to fetch/open IDE/ATA controller's instance key from active key(%s)\r\n" ), szActiveKey)); goto exit; } dwUndo |= IDEINIT_UNDO_CLS_KEY_DEVICE; DUMPREGKEY(ZONE_PCI, szDevKey, hDevKey); // instantiate an IDE/ATA controller ("bus") object if (!(pBus = new CIDEBUS)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to instantiate IDE/ATA controller bus object; device key(%s)\r\n" ), szDevKey)); goto exit; } dwUndo |= IDEINIT_UNDO_DEL_BUS; // instantiate primary channel port object pBus->m_pPort[ATA_PRIMARY] = new CPort(pBus); if (!pBus->m_pPort[ATA_PRIMARY]) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to allocate port for primary channel; device key(%s)\r\n" ), szDevKey)); goto exit; } dwUndo |= IDEINIT_UNDO_DEL_PORT_PRI; // instantiate secondary channel port object pBus->m_pPort[ATA_SECONDARY] = new CPort(pBus); if (!pBus->m_pPort[ATA_SECONDARY]) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to allocate port for secondary channel; device key(%s)\r\n" ), szDevKey)); goto exit; } dwUndo |= IDEINIT_UNDO_DEL_PORT_SEC; // configure port instances based on I/O window information in registry if (!GetIoPort(hDevKey, szDevKey, pBus)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Bad I/O window information; device key(%s)\r\n" ), szDevKey)); goto exit; } // fetch IDE/ATA controller registry value set (i.e., registry configuration) pBus->m_pIdeReg = (PIDEREG)LocalAlloc(LPTR, sizeof(IDEREG)); if (!pBus->m_pIdeReg) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to allocate IDE_ registry value set; device key(%s)\r\n" ), szDevKey)); goto exit; } dwUndo |= IDEINIT_UNDO_DEL_REG_IDE; if (!GetIDERegistryValueSet(hDevKey, pBus->m_pIdeReg)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to read IDE_ registry value set from registry; device key(%s)\r\n" ), szDevKey)); goto exit; } // assign IRQs pBus->m_pPort[ATA_PRIMARY]->m_dwIrq = pBus->m_pIdeReg->dwIrq; pBus->m_pPort[ATA_SECONDARY]->m_dwIrq = pBus->m_pIdeReg->dwIrq; // if IDE/ATA controller is legacy ISA/PCI, then IRQ of secondary channel is // (IRQ of primary channel + 1); otherwise, the primary and secondary // channels must share an interrupt and employ an ISR if (pBus->m_pIdeReg->dwLegacy) { pBus->m_pPort[ATA_SECONDARY]->m_dwIrq =pBus->m_pPort[ATA_PRIMARY]->m_dwIrq + 1; } // no SysIntr provided; we have to map IRQ to SysIntr ourselves; note that, // even if the primary and secondary channels share an IRQ, each channel is // required to have its own IRQ-SysIntr mapping if (!pBus->m_pIdeReg->dwSysIntr) { DWORD dwReturned = 0; UINT32 primaryIrqAndFlags[3]; primaryIrqAndFlags[0] = -1; primaryIrqAndFlags[1] = 0x00000008; // translate statically mapped sysintr instead of requesting a new one primaryIrqAndFlags[2] = pBus->m_pPort[ATA_PRIMARY]->m_dwIrq; if (!KernelIoControl( IOCTL_HAL_REQUEST_SYSINTR, (LPVOID)primaryIrqAndFlags, sizeof(primaryIrqAndFlags), (LPVOID)&pBus->m_pPort[ATA_PRIMARY]->m_dwSysIntr, sizeof(DWORD), &dwReturned )) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to map IRQ(%d) to SysIntr for primary channel of device(%s)\r\n" ), pBus->m_pPort[ATA_PRIMARY]->m_dwIrq, szDevKey)); goto exit; } // even if primary and secondary channels use the same IRQ, we need two // separate SysIntr mappings if (pBus->m_pPort[ATA_SECONDARY]->m_fInitialized) { UINT32 secondaryIrqAndFlags[3]; secondaryIrqAndFlags[0] = -1; secondaryIrqAndFlags[1] = 0x00000008; // translate statically mapped sysintr instead of requesting a new one secondaryIrqAndFlags[2] = pBus->m_pPort[ATA_SECONDARY]->m_dwIrq; if (!KernelIoControl( IOCTL_HAL_REQUEST_SYSINTR, (LPVOID)secondaryIrqAndFlags, sizeof(secondaryIrqAndFlags), (LPVOID)&pBus->m_pPort[ATA_SECONDARY]->m_dwSysIntr, sizeof(DWORD), &dwReturned )) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to map IRQ(%d) to SysIntr for secondary channel on device(%s)\r\n" ), pBus->m_pPort[ATA_SECONDARY]->m_dwIrq, szDevKey)); goto exit; } } } else { DWORD dwReturned = 0; // the SysIntr corresponds to the primary channel; we need to request // a separate SysIntr for the secondary channel pBus->m_pPort[ATA_PRIMARY]->m_dwSysIntr = pBus->m_pIdeReg->dwSysIntr; if (pBus->m_pPort[ATA_SECONDARY]->m_fInitialized) { UINT32 secondaryIrqAndFlags[3]; secondaryIrqAndFlags[0] = -1; secondaryIrqAndFlags[1] = 0x00000008; // translate statically mapped sysintr instead of requesting a new one secondaryIrqAndFlags[2] = pBus->m_pPort[ATA_SECONDARY]->m_dwIrq; if (!KernelIoControl( IOCTL_HAL_REQUEST_SYSINTR, (LPVOID)secondaryIrqAndFlags, sizeof(secondaryIrqAndFlags), (LPVOID)&pBus->m_pPort[ATA_SECONDARY]->m_dwSysIntr, sizeof(DWORD), &dwReturned )) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to map IRQ(%d) to SysIntr for secondary channel on device(%s)\r\n" ), pBus->m_pPort[ATA_SECONDARY]->m_dwIrq, szDevKey)); goto exit; } } } // if this IDE/ATA controller only has a single channel, e.g., PC Card, // then destroy the secondary channel's port DEBUGCHK(pBus->m_pPort[ATA_PRIMARY]->m_fInitialized); if (!pBus->m_pPort[ATA_SECONDARY]->m_fInitialized) { delete pBus->m_pPort[ATA_SECONDARY]; pBus->m_pPort[ATA_SECONDARY] = NULL; dwUndo &= ~IDEINIT_UNDO_DEL_PORT_SEC; } // IDE/ATA "bus" enumeration; scan the current IDE/ATA controller's instance // key for DeviceX subkeys DEBUGMSG(ZONE_INIT, (_T( "Atapi!IDE_Init> Start of IDE/ATA device enumeration\r\n" ))); DWORD dwIndex = 0; // index of next DeviceX subkey to fetch/enumerate HKEY hKey; // handle to DeviceX subkey TCHAR szNewKey[MAX_PATH]; // name of DeviceX subkey DWORD dwNewKeySize; // size of name of DeviceX subkey DWORD dwDeviceId; // "DeviceId" read from DeviceX subkey and resolved to 0, 1 dwNewKeySize = (sizeof(szNewKey) / sizeof(TCHAR)); while ( ERROR_SUCCESS == RegEnumKeyEx( hDevKey, // IDE/ATA controller's instance key dwIndex, // index of the subkey to fetch szNewKey, // name of subkey (e.g., "Device0") &dwNewKeySize, // size of name of subkey NULL, // lpReserved; set to NULL NULL, // lpClass; not required NULL, // lpcbClass; lpClass is NULL; hence, NULL NULL // lpftLastWriteTime; set to NULL )) { dwIndex += 1; dwNewKeySize = (sizeof(szNewKey) / sizeof(TCHAR)); pDskReg = NULL; // open the DeviceX subkey; copy configuration information from the // IDE/ATA controller's instance key to the device's DeviceX key if (ERROR_SUCCESS != RegOpenKeyEx(hDevKey, szNewKey, 0, 0, &hKey)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to open DeviceX subkey; device key(%s)\r\n" ), szDevKey)); goto exit; } if ( (NULL == pBus->m_pPort[ATA_SECONDARY]) && ((0 == wcscmp(szNewKey, REG_KEY_SECONDARY_MASTER)) || (0 == wcscmp(szNewKey, REG_KEY_SECONDARY_SLAVE))) ) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Secondary channel does not exist, but Device2 and Device3 subkeys exist in %s; ignoring\r\n" ), szDevKey)); dwIndex -= 1; continue; } if ( (0 != wcscmp(szNewKey, REG_KEY_PRIMARY_MASTER)) && (0 != wcscmp(szNewKey, REG_KEY_PRIMARY_SLAVE)) && (0 != wcscmp(szNewKey, REG_KEY_SECONDARY_MASTER)) && (0 != wcscmp(szNewKey, REG_KEY_SECONDARY_SLAVE)) ) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Found bad DeviceX subkey(%s) in device's(%s) key; ignoring\r\n" ), szNewKey, szDevKey)); dwIndex -= 1; continue; } // fetch the device's registry value set pDskReg = (PDSKREG)LocalAlloc(LPTR, sizeof(DSKREG)); if (!pDskReg) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to allocate DSK_ registry value set; device key(%s)\r\n" ), szNewKey)); goto exit; } dwUndo |= IDEINIT_UNDO_DEL_REG_DSK; if (!GetDSKRegistryValueSet(hKey, pDskReg)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to read DSK_ registry value set from registry; device key(%s)\r\n" ), szNewKey)); goto exit; } // resolve DeviceX subkey's "DeviceId" to (0, 1), so a CDisk instance can // reference the correct m_pBus->m_p(Primary, Secondary)Port->(m_pDisk, m_pDskReg) // array element dwDeviceId = pDskReg->dwDeviceId; // store the original value pDskReg->dwDeviceId &= 0x01; // write the new device ID value back to the device's instance key if (!AtaSetRegistryValue(hKey, REG_VAL_DSK_DEVICEID, pDskReg->dwDeviceId)) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to write %s(%d) DSK_ registry value to device's instance key(%s)\r\n" ), REG_VAL_DSK_DEVICEID, dwDeviceId, szNewKey)); goto exit; } // the master and slave CDisk instances of a particular channel have to // share the port instance associated with the channel; write the heap // address of the port instance to the device's instance key if ((0 == wcscmp(szNewKey, REG_KEY_PRIMARY_MASTER)) || (0 == wcscmp(szNewKey, REG_KEY_PRIMARY_SLAVE))) { // store the DSK_ register value set of the master/slave device in // the appropriate slot of the port instance pBus->m_pPort[ATA_PRIMARY]->m_pDskReg[pDskReg->dwDeviceId] = pDskReg; if (!AtaSetRegistryValue(hKey, REG_VALUE_PORT, (DWORD)pBus->m_pPort[ATA_PRIMARY])) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to write address of primary port instance to device's(%s) DeviceX subkey(%s)\r\n" ), szDevKey, szNewKey)); goto exit; } } else if ((0 == wcscmp(szNewKey, REG_KEY_SECONDARY_MASTER)) || (0 == wcscmp(szNewKey, REG_KEY_SECONDARY_SLAVE))) { // store the DSK_ register value set of the master/slave device in // the appropriate slot of the port instance pBus->m_pPort[ATA_SECONDARY]->m_pDskReg[pDskReg->dwDeviceId] = pDskReg; if (!AtaSetRegistryValue(hKey, REG_VALUE_PORT, (DWORD)pBus->m_pPort[ATA_SECONDARY])) { DEBUGMSG(ZONE_INIT|ZONE_ERROR, (_T( "Atapi!IDE_Init> Failed to write address of secondary port instance to device's(%s) DeviceX subkey(%s)\r\n" ), szDevKey, szNewKey)); goto exit; } } if (!pBus->m_szDevice[dwDeviceId]) { // save name of device's full registry key path; when we've finished // enumerating the "bus", we'll call ActivateDevice against all of // these paths pBus->m_szDevice[dwDeviceId] = new TCHAR[wcslen(szDevKey) + wcslen(szNewKey) + 10]; wcscpy(pBus->m_szDevice[dwDeviceId], szDevKey); wcscat(pBus->m_szDevice[dwDeviceId], L"\\"); wcscat(pBus->m_szDevice[dwDeviceId], szNewKey); DEBUGMSG(ZONE_INIT, (_T( "Atapi!IDE_Init> Enumerated IDE/ATA device %s\r\n" ), pBus->m_szDevice[dwDeviceId])); } } // while DEBUGMSG(ZONE_INIT, (_T( "Atapi!IDE_Init> End of IDE/ATA device enumeration\r\n" ))); // initialize enumerated devices; it's imperative that we activate the // channel master before the channel slave for (dwDeviceId = 0; dwDeviceId < 4; dwDeviceId += 1) { if (pBus->m_szDevice[dwDeviceId]) { DEBUGMSG(ZONE_INIT, (_T( "Atapi!IDE_Init> Activating IDE/ATA device %s\r\n" ), pBus->m_szDevice[dwDeviceId])); pBus->m_hDevice[dwDeviceId] = ActivateDeviceEx(pBus->m_szDevice[dwDeviceId], NULL, 0, NULL); } } dwUndo &= ~IDEINIT_UNDO_DEL_BUS; dwUndo &= ~IDEINIT_UNDO_DEL_PORT_PRI; dwUndo &= ~IDEINIT_UNDO_DEL_PORT_SEC; exit: if (dwUndo & IDEINIT_UNDO_CLS_KEY_ACTIVE) { RegCloseKey(hActiveKey); } if (dwUndo & IDEINIT_UNDO_CLS_KEY_DEVICE) { RegCloseKey(hDevKey); } if (szDevKey) { LocalFree(szDevKey); } if (pDskReg) { LocalFree(pDskReg); } if ((NULL != pBus) && (dwUndo & IDEINIT_UNDO_DEL_BUS)) { delete pBus; pBus = NULL; } return (DWORD)pBus; } /*++ IDE_Deinit This function deallocates the associated IDE/ATA controller ("bus") instance. Parameters: dwHandle - pointer to associated bus instance (initially returned by IDE_Init) Return: This function always succeeds. --*/ EXTERN_C BOOL IDE_Deinit( DWORD dwHandle ) { CIDEBUS *pBus = (CIDEBUS *)dwHandle; DEBUGCHK(pBus != NULL); delete pBus; return TRUE; } /*++ DllMain This function is the main ATAPI.DLL entry point. Parameters: hInstance - a handle to the dll; this value is the base address of the DLL dwReason - the reason for the DLL is being entered lpReserved - not used Return: On success, return true. Otherwise, return false. --*/ BOOL WINAPI DllMain( HANDLE hInstance, DWORD dwReason, LPVOID lpReserved ) { switch (dwReason) { case DLL_PROCESS_ATTACH: // initialize global data g_hInstance = (HINSTANCE)hInstance; InitializeCriticalSection(&g_csMain); // register debug zones RegisterDbgZones((HMODULE)hInstance, &dpCurSettings); DisableThreadLibraryCalls((HMODULE)hInstance); DEBUGMSG(ZONE_INIT, (_T("ATAPI DLL_PROCESS_ATTACH\r\n"))); break; case DLL_PROCESS_DETACH: // deinitialize global data DeleteCriticalSection(&g_csMain); DEBUGMSG(ZONE_INIT, (TEXT("ATAPI DLL_PROCESS_DETACH\r\n"))); break; } return TRUE; }
[ "jhlee74@a3c55b0e-9d05-11de-8bf8-05dd22f30006" ]
[ [ [ 1, 1771 ] ] ]
577d03a43fd288a2e48d3244611abef1336d0ff8
b22c254d7670522ec2caa61c998f8741b1da9388
/dependencies/OpenSceneGraph/include/osg/PrimitiveSet
0e8880b2bfbe7a66f0772a2bafb477062324f53a
[]
no_license
ldaehler/lbanet
341ddc4b62ef2df0a167caff46c2075fdfc85f5c
ecb54fc6fd691f1be3bae03681e355a225f92418
refs/heads/master
2021-01-23T13:17:19.963262
2011-03-22T21:49:52
2011-03-22T21:49:52
39,529,945
0
1
null
null
null
null
UTF-8
C++
false
false
24,687
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * This library 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 * OpenSceneGraph Public License for more details. */ #ifndef OSG_PRIMITIVESET #define OSG_PRIMITIVESET 1 #include <osg/GL> #include <osg/Object> #include <osg/buffered_value> #include <osg/Vec2> #include <osg/Vec3> #include <osg/Vec4> #include <osg/Vec2d> #include <osg/Vec3d> #include <osg/Vec4d> #include <osg/MixinVector> #include <osg/GL2Extensions> #include <osg/BufferObject> #include <vector> namespace osg { typedef MixinVector<GLsizei> VectorGLsizei; typedef MixinVector<GLubyte> VectorGLubyte; typedef MixinVector<GLushort> VectorGLushort; typedef MixinVector<GLuint> VectorGLuint; class State; /** A \c PrimitiveFunctor is used (in conjunction with * <tt>osg::Drawable::accept (PrimitiveFunctor&)</tt>) to get access to the * primitives that compose the things drawn by OSG. * <p>If \c osg::Drawable::accept() is called with a \c PrimitiveFunctor * parameter, the \c Drawable will "pretend" it is drawing itself, but instead * of calling real OpenGL functions, it will call <tt>PrimitiveFunctor</tt>'s * member functions that "mimic" the OpenGL calls. * <p>Concrete subclasses of \c PrimitiveFunctor must implement these methods * so that they performs whatever they want. */ class PrimitiveFunctor { public: virtual ~PrimitiveFunctor() {} /** Sets the array of vertices used to describe the primitives. Somehow * mimics the OpenGL \c glVertexPointer() function. */ virtual void setVertexArray(unsigned int count,const Vec2* vertices) = 0; /** Sets the array of vertices used to describe the primitives. Somehow * mimics the OpenGL \c glVertexPointer() function. */ virtual void setVertexArray(unsigned int count,const Vec3* vertices) = 0; /** Sets the array of vertices used to describe the primitives. Somehow * mimics the OpenGL \c glVertexPointer() function. */ virtual void setVertexArray(unsigned int count,const Vec4* vertices) = 0; /** Sets the array of vertices used to describe the primitives. Somehow * mimics the OpenGL \c glVertexPointer() function. */ virtual void setVertexArray(unsigned int count,const Vec2d* vertices) = 0; /** Sets the array of vertices used to describe the primitives. Somehow * mimics the OpenGL \c glVertexPointer() function. */ virtual void setVertexArray(unsigned int count,const Vec3d* vertices) = 0; /** Sets the array of vertices used to describe the primitives. Somehow * mimics the OpenGL \c glVertexPointer() function. */ virtual void setVertexArray(unsigned int count,const Vec4d* vertices) = 0; /// Mimics the OpenGL \c glDrawArrays() function. virtual void drawArrays(GLenum mode,GLint first,GLsizei count) = 0; /// Mimics the OpenGL \c glDrawElements() function. virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) = 0; /// Mimics the OpenGL \c glDrawElements() function. virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) = 0; /// Mimics the OpenGL \c glDrawElements() function. virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) = 0; /// Mimics the OpenGL \c glBegin() function. virtual void begin(GLenum mode) = 0; /// Mimics the OpenGL \c glVertex() "family of functions". virtual void vertex(const Vec2& vert) = 0; /// Mimics the OpenGL \c glVertex() "family of functions". virtual void vertex(const Vec3& vert) = 0; /// Mimics the OpenGL \c glVertex() "family of functions". virtual void vertex(const Vec4& vert) = 0; /// Mimics the OpenGL \c glVertex() "family of functions". virtual void vertex(float x,float y) = 0; /// Mimics the OpenGL \c glVertex() "family of functions". virtual void vertex(float x,float y,float z) = 0; /// Mimics the OpenGL \c glVertex() "family of functions". virtual void vertex(float x,float y,float z,float w) = 0; /// Mimics the OpenGL \c glEnd() function. virtual void end() = 0; }; class PrimitiveIndexFunctor { public: virtual ~PrimitiveIndexFunctor() {} virtual void setVertexArray(unsigned int count,const Vec2* vertices) = 0; virtual void setVertexArray(unsigned int count,const Vec3* vertices) = 0; virtual void setVertexArray(unsigned int count,const Vec4* vertices) = 0; virtual void setVertexArray(unsigned int count,const Vec2d* vertices) = 0; virtual void setVertexArray(unsigned int count,const Vec3d* vertices) = 0; virtual void setVertexArray(unsigned int count,const Vec4d* vertices) = 0; virtual void drawArrays(GLenum mode,GLint first,GLsizei count) = 0; virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices) = 0; virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices) = 0; virtual void drawElements(GLenum mode,GLsizei count,const GLuint* indices) = 0; virtual void begin(GLenum mode) = 0; virtual void vertex(unsigned int pos) = 0; virtual void end() = 0; }; class DrawElements; class OSG_EXPORT PrimitiveSet : public BufferData { public: enum Type { PrimitiveType, DrawArraysPrimitiveType, DrawArrayLengthsPrimitiveType, DrawElementsUBytePrimitiveType, DrawElementsUShortPrimitiveType, DrawElementsUIntPrimitiveType }; enum Mode { POINTS = GL_POINTS, LINES = GL_LINES, LINE_STRIP = GL_LINE_STRIP, LINE_LOOP = GL_LINE_LOOP, TRIANGLES = GL_TRIANGLES, TRIANGLE_STRIP = GL_TRIANGLE_STRIP, TRIANGLE_FAN = GL_TRIANGLE_FAN, QUADS = GL_QUADS, QUAD_STRIP = GL_QUAD_STRIP, POLYGON = GL_POLYGON, LINES_ADJACENCY = GL_LINES_ADJACENCY_EXT, LINE_STRIP_ADJACENCY = GL_LINE_STRIP_ADJACENCY_EXT, TRIANGLES_ADJACENCY = GL_TRIANGLES_ADJACENCY_EXT, TRIANGLE_STRIP_ADJECENCY = GL_TRIANGLE_STRIP_ADJACENCY_EXT }; PrimitiveSet(Type primType=PrimitiveType,GLenum mode=0, int numInstances=0): _primitiveType(primType), _numInstances(numInstances), _mode(mode), _rangeModifiedCount(0) {} PrimitiveSet(const PrimitiveSet& prim,const CopyOp& copyop=CopyOp::SHALLOW_COPY): BufferData(prim,copyop), _primitiveType(prim._primitiveType), _numInstances(prim._numInstances), _mode(prim._mode), _rangeModifiedCount(0) {} virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const PrimitiveSet*>(obj)!=NULL; } virtual const char* libraryName() const { return "osg"; } virtual const char* className() const { return "PrimitiveSet"; } Type getType() const { return _primitiveType; } virtual const GLvoid* getDataPointer() const { return 0; } virtual unsigned int getTotalDataSize() const { return 0; } virtual bool supportsBufferObject() const { return false; } virtual DrawElements* getDrawElements() { return 0; } virtual const DrawElements* getDrawElements() const { return 0; } void setNumInstances(int n) { _numInstances = n; } int getNumInstances() const { return _numInstances; } void setMode(GLenum mode) { _mode = mode; } GLenum getMode() const { return _mode; } virtual void draw(State& state, bool useVertexBufferObjects) const = 0; virtual void accept(PrimitiveFunctor& functor) const = 0; virtual void accept(PrimitiveIndexFunctor& functor) const = 0; virtual unsigned int index(unsigned int pos) const = 0; virtual unsigned int getNumIndices() const = 0; virtual void offsetIndices(int offset) = 0; virtual unsigned int getNumPrimitives() const; virtual void computeRange() const {} protected: virtual ~PrimitiveSet() {} Type _primitiveType; int _numInstances; GLenum _mode; mutable unsigned int _rangeModifiedCount; }; class OSG_EXPORT DrawArrays : public PrimitiveSet { public: DrawArrays(GLenum mode=0): PrimitiveSet(DrawArraysPrimitiveType,mode), _first(0), _count(0) {} DrawArrays(GLenum mode, GLint first, GLsizei count, int numInstances=0): PrimitiveSet(DrawArraysPrimitiveType, mode, numInstances), _first(first), _count(count) {} DrawArrays(const DrawArrays& da,const CopyOp& copyop=CopyOp::SHALLOW_COPY): PrimitiveSet(da,copyop), _first(da._first), _count(da._count) {} virtual Object* cloneType() const { return new DrawArrays(); } virtual Object* clone(const CopyOp& copyop) const { return new DrawArrays(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const DrawArrays*>(obj)!=NULL; } virtual const char* libraryName() const { return "osg"; } virtual const char* className() const { return "DrawArrays"; } void set(GLenum mode,GLint first, GLsizei count) { _mode = mode; _first = first; _count = count; } void setFirst(GLint first) { _first = first; } GLint getFirst() const { return _first; } void setCount(GLsizei count) { _count = count; } GLsizei getCount() const { return _count; } virtual void draw(State& state, bool useVertexBufferObjects) const; virtual void accept(PrimitiveFunctor& functor) const; virtual void accept(PrimitiveIndexFunctor& functor) const; virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(_count); } virtual unsigned int index(unsigned int pos) const { return static_cast<unsigned int>(_first)+pos; } virtual void offsetIndices(int offset) { _first += offset; } protected: virtual ~DrawArrays() {} GLint _first; GLsizei _count; }; class OSG_EXPORT DrawArrayLengths : public PrimitiveSet, public VectorGLsizei { public: typedef VectorGLsizei vector_type; DrawArrayLengths(GLenum mode=0): PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), _first(0) {} DrawArrayLengths(const DrawArrayLengths& dal,const CopyOp& copyop=CopyOp::SHALLOW_COPY): PrimitiveSet(dal,copyop), vector_type(dal), _first(dal._first) {} DrawArrayLengths(GLenum mode, GLint first, unsigned int no, GLsizei* ptr) : PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), vector_type(ptr,ptr+no), _first(first) {} DrawArrayLengths(GLenum mode,GLint first, unsigned int no) : PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), vector_type(no), _first(first) {} DrawArrayLengths(GLenum mode,GLint first) : PrimitiveSet(DrawArrayLengthsPrimitiveType,mode), vector_type(), _first(first) {} virtual Object* cloneType() const { return new DrawArrayLengths(); } virtual Object* clone(const CopyOp& copyop) const { return new DrawArrayLengths(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const DrawArrayLengths*>(obj)!=NULL; } virtual const char* libraryName() const { return "osg"; } virtual const char* className() const { return "DrawArrayLengths"; } void setFirst(GLint first) { _first = first; } GLint getFirst() const { return _first; } virtual void draw(State& state, bool useVertexBufferObjects) const; virtual void accept(PrimitiveFunctor& functor) const; virtual void accept(PrimitiveIndexFunctor& functor) const; virtual unsigned int getNumIndices() const; virtual unsigned int index(unsigned int pos) const { return _first+pos; } virtual void offsetIndices(int offset) { _first += offset; } virtual unsigned int getNumPrimitives() const; protected: virtual ~DrawArrayLengths() {} GLint _first; }; class DrawElements : public PrimitiveSet { public: DrawElements(Type primType=PrimitiveType, GLenum mode=0, int numInstances=0): PrimitiveSet(primType,mode, numInstances) {} DrawElements(const DrawElements& copy,const CopyOp& copyop=CopyOp::SHALLOW_COPY): PrimitiveSet(copy,copyop) {} virtual DrawElements* getDrawElements() { return this; } virtual const DrawElements* getDrawElements() const { return this; } /** Set the ElementBufferObject.*/ inline void setElementBufferObject(osg::ElementBufferObject* ebo) { setBufferObject(ebo); } /** Get the ElementBufferObject. If no EBO is assigned returns NULL*/ inline osg::ElementBufferObject* getElementBufferObject() { return dynamic_cast<osg::ElementBufferObject*>(_bufferObject.get()); } /** Get the const ElementBufferObject. If no EBO is assigned returns NULL*/ inline const osg::ElementBufferObject* getElementBufferObject() const { return dynamic_cast<const osg::ElementBufferObject*>(_bufferObject.get()); } virtual void reserveElements(unsigned int numIndices) = 0; virtual void setElement(unsigned int, unsigned int) = 0; virtual unsigned int getElement(unsigned int) = 0; virtual void addElement(unsigned int) = 0; protected: virtual ~DrawElements() {} }; class OSG_EXPORT DrawElementsUByte : public DrawElements, public VectorGLubyte { public: typedef VectorGLubyte vector_type; DrawElementsUByte(GLenum mode=0): DrawElements(DrawElementsUBytePrimitiveType,mode) {} DrawElementsUByte(const DrawElementsUByte& array, const CopyOp& copyop=CopyOp::SHALLOW_COPY): DrawElements(array,copyop), vector_type(array) {} DrawElementsUByte(GLenum mode, unsigned int no, const GLubyte* ptr, int numInstances=0) : DrawElements(DrawElementsUBytePrimitiveType,mode,numInstances), vector_type(ptr,ptr+no) {} DrawElementsUByte(GLenum mode, unsigned int no) : DrawElements(DrawElementsUBytePrimitiveType,mode), vector_type(no) {} virtual Object* cloneType() const { return new DrawElementsUByte(); } virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUByte(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const DrawElementsUByte*>(obj)!=NULL; } virtual const char* libraryName() const { return "osg"; } virtual const char* className() const { return "DrawElementsUByte"; } virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(size()); } virtual bool supportsBufferObject() const { return false; } virtual void draw(State& state, bool useVertexBufferObjects) const ; virtual void accept(PrimitiveFunctor& functor) const; virtual void accept(PrimitiveIndexFunctor& functor) const; virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } virtual void offsetIndices(int offset); virtual void computeRange() const { if (empty()) { _minIndex = 0; _maxIndex = 0; _rangeModifiedCount = _modifiedCount; return; } _minIndex = front(); _maxIndex = _minIndex; for(vector_type::const_iterator itr=begin(); itr!=end(); ++itr) { if (*itr<_minIndex) _minIndex = *itr; if (*itr>_maxIndex) _maxIndex = *itr; } _rangeModifiedCount = _modifiedCount; } virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); } virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; } virtual unsigned int getElement(unsigned int i) { return (*this)[i]; } virtual void addElement(unsigned int v) { push_back(GLubyte(v)); } protected: virtual ~DrawElementsUByte(); mutable unsigned int _minIndex; mutable unsigned int _maxIndex; }; class OSG_EXPORT DrawElementsUShort : public DrawElements, public VectorGLushort { public: typedef VectorGLushort vector_type; DrawElementsUShort(GLenum mode=0): DrawElements(DrawElementsUShortPrimitiveType,mode) {} DrawElementsUShort(const DrawElementsUShort& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY): DrawElements(array,copyop), vector_type(array) {} DrawElementsUShort(GLenum mode, unsigned int no, const GLushort* ptr, int numInstances=0) : DrawElements(DrawElementsUShortPrimitiveType,mode,numInstances), vector_type(ptr,ptr+no) {} DrawElementsUShort(GLenum mode, unsigned int no) : DrawElements(DrawElementsUShortPrimitiveType,mode), vector_type(no) {} template <class InputIterator> DrawElementsUShort(GLenum mode, InputIterator first,InputIterator last) : DrawElements(DrawElementsUShortPrimitiveType,mode), vector_type(first,last) {} virtual Object* cloneType() const { return new DrawElementsUShort(); } virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUShort(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const DrawElementsUShort*>(obj)!=NULL; } virtual const char* libraryName() const { return "osg"; } virtual const char* className() const { return "DrawElementsUShort"; } virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } virtual unsigned int getTotalDataSize() const { return 2u*static_cast<unsigned int>(size()); } virtual bool supportsBufferObject() const { return false; } virtual void draw(State& state, bool useVertexBufferObjects) const; virtual void accept(PrimitiveFunctor& functor) const; virtual void accept(PrimitiveIndexFunctor& functor) const; virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } virtual void offsetIndices(int offset); virtual void computeRange() const { if (empty()) { _minIndex = 0; _maxIndex = 0; _rangeModifiedCount = _modifiedCount; return; } _minIndex = front(); _maxIndex = _minIndex; for(vector_type::const_iterator itr=begin(); itr!=end(); ++itr) { if (*itr<_minIndex) _minIndex = *itr; if (*itr>_maxIndex) _maxIndex = *itr; } _rangeModifiedCount = _modifiedCount; } virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); } virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; } virtual unsigned int getElement(unsigned int i) { return (*this)[i]; } virtual void addElement(unsigned int v) { push_back(GLushort(v)); } protected: virtual ~DrawElementsUShort(); mutable unsigned int _minIndex; mutable unsigned int _maxIndex; }; class OSG_EXPORT DrawElementsUInt : public DrawElements, public VectorGLuint { public: typedef VectorGLuint vector_type; DrawElementsUInt(GLenum mode=0): DrawElements(DrawElementsUIntPrimitiveType,mode) {} DrawElementsUInt(const DrawElementsUInt& array,const CopyOp& copyop=CopyOp::SHALLOW_COPY): DrawElements(array,copyop), vector_type(array) {} DrawElementsUInt(GLenum mode, unsigned int no, const GLuint* ptr, int numInstances=0) : DrawElements(DrawElementsUIntPrimitiveType,mode,numInstances), vector_type(ptr,ptr+no) {} DrawElementsUInt(GLenum mode, unsigned int no) : DrawElements(DrawElementsUIntPrimitiveType,mode), vector_type(no) {} template <class InputIterator> DrawElementsUInt(GLenum mode, InputIterator first,InputIterator last) : DrawElements(DrawElementsUIntPrimitiveType,mode), vector_type(first,last) {} virtual Object* cloneType() const { return new DrawElementsUInt(); } virtual Object* clone(const CopyOp& copyop) const { return new DrawElementsUInt(*this,copyop); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const DrawElementsUInt*>(obj)!=NULL; } virtual const char* libraryName() const { return "osg"; } virtual const char* className() const { return "DrawElementsUInt"; } virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } virtual unsigned int getTotalDataSize() const { return 4u*static_cast<unsigned int>(size()); } virtual bool supportsBufferObject() const { return false; } virtual void draw(State& state, bool useVertexBufferObjects) const; virtual void accept(PrimitiveFunctor& functor) const; virtual void accept(PrimitiveIndexFunctor& functor) const; virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } virtual void offsetIndices(int offset); virtual void computeRange() const { if (empty()) { _minIndex = 0; _maxIndex = 0; _rangeModifiedCount = _modifiedCount; return; } _minIndex = front(); _maxIndex = _minIndex; for(vector_type::const_iterator itr=begin(); itr!=end(); ++itr) { if (*itr<_minIndex) _minIndex = *itr; if (*itr>_maxIndex) _maxIndex = *itr; } _rangeModifiedCount = _modifiedCount; } virtual void reserveElements(unsigned int numIndices) { reserve(numIndices); } virtual void setElement(unsigned int i, unsigned int v) { (*this)[i] = v; } virtual unsigned int getElement(unsigned int i) { return (*this)[i]; } virtual void addElement(unsigned int v) { push_back(GLuint(v)); } protected: virtual ~DrawElementsUInt(); mutable unsigned int _minIndex; mutable unsigned int _maxIndex; }; } #endif
[ "vdelage@3806491c-8dad-11de-9a8c-6d5b7d1e4d13" ]
[ [ [ 1, 621 ] ] ]
0d858fca8771a9f3f9cf9bc5b386042c1e85e32f
b7d37da29e47dd109fdc48bb9e4b75e63a009850
/sftemplateswizard/com.nokia.s60tools.templates.tests/data/templates/inline_template.inl
782509901fe649e999bb151ac56e19f620c75b1d
[]
no_license
SymbianSource/oss.FCL.sftools.dev.ide.carbidecppplugins
cd2b0224e5bf2b5b13bd679dd2fd21c557eac7ff
33efb036462d311bcbfc051818300ebbf6b959ff
refs/heads/master
2020-12-24T11:24:52.748036
2010-09-21T10:50:51
2010-09-21T10:50:51
73,033,731
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,930
inl
/* * ============================================================================ * Name : ?filename.inl * Part of : ?Subsystem_name / ?Module_name *** Info from the SWAD * Description : ?Description * Version : %version: % << Don't touch! Updated by Synergy at check-out. * * Copyright © ?year-?year Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "?License" * which accompanies this distribution, and is available * at the URL "?LicenseUrl". * * Initial Contributors: * ?Company_name - initial contribution. * * Contributors: * * ============================================================================ * Template version: 4.0 */ *** INSTRUCTIONS TO THE TEMPLATE USER: *** This template follows the S60 coding conventions *** (S60_Coding_Conventions.doc). Remove all unneeded declarations *** and definitions before checking the file in! Also remove the *** template's usage instructions, that is, everything that begins *** with "***". *** The copyright years should be < the year of the file's creation > *** - < the year of the file's latest update >. *** Words that begin with "?" are for you to replace with your own *** identifiers, filenames, or comments. *** To support building on Linux, use only forward slashes in include *** directives. Also, all filenames and pathnames must be completely *** in lowercase. *** Indent four spaces per step, using spaces, not tabs, to display *** the code consistently across different editors. // ----------------------------------------------------------------------------- // ?implementation_description // ----------------------------------------------------------------------------- // inline ?type ?classname::?member_function() { ?code }
[ "none@none" ]
[ [ [ 1, 53 ] ] ]
c216c7462f767bc671362ef7b0a21aae3dfde4cf
91b964984762870246a2a71cb32187eb9e85d74e
/SRC/OFFI SRC!/boost_1_34_1/boost_1_34_1/libs/mpl/preprocessed/src/list_c.cpp
e9c260debe07d401758dc117f3d70e16eb8e7834
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
willrebuild/flyffsf
e5911fb412221e00a20a6867fd00c55afca593c7
d38cc11790480d617b38bb5fc50729d676aef80d
refs/heads/master
2021-01-19T20:27:35.200154
2011-02-10T12:34:43
2011-02-10T12:34:43
32,710,780
3
0
null
null
null
null
UTF-8
C++
false
false
506
cpp
// Copyright Aleksey Gurtovoy 2002-2004 // // 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) // // See http://www.boost.org/libs/mpl for documentation. // $Source: /cvsroot/boost/boost/libs/mpl/preprocessed/src/list_c.cpp,v $ // $Date: 2006/06/12 05:11:54 $ // $Revision: 1.4.8.1 $ #define BOOST_MPL_PREPROCESSING_MODE #include <boost/config.hpp> #include <boost/mpl/list_c.hpp>
[ "[email protected]@e2c90bd7-ee55-cca0-76d2-bbf4e3699278" ]
[ [ [ 1, 16 ] ] ]
a33405200b3af944e9db1cb8fa660a68b3cbcf08
c95a83e1a741b8c0eb810dd018d91060e5872dd8
/Game/ClientShellDLL/ClientShellShared/WeaponFX.h
9325397535ad32aff6f37272fb4565da8bc651bd
[]
no_license
rickyharis39/nolf2
ba0b56e2abb076e60d97fc7a2a8ee7be4394266c
0da0603dc961e73ac734ff365bfbfb8abb9b9b04
refs/heads/master
2021-01-01T17:21:00.678517
2011-07-23T12:11:19
2011-07-23T12:11:19
38,495,312
1
0
null
null
null
null
UTF-8
C++
false
false
5,790
h
// ----------------------------------------------------------------------- // // // MODULE : WeaponFX.h // // PURPOSE : Weapon special fx class - Definition // // CREATED : 2/22/98 // // (c) 1997-2002 Monolith Productions, Inc. All Rights Reserved // // ----------------------------------------------------------------------- // #ifndef __WEAPON_FX_H__ #define __WEAPON_FX_H__ #include "SpecialFX.h" #include "SurfaceMgr.h" #include "WeaponMgr.h" #include "TracerFX.h" #include "SmokeFX.h" #include "ContainerCodes.h" #include "GameSettings.h" #include "ImpactType.h" struct CScaleFX; struct WCREATESTRUCT : public SFXCREATESTRUCT { WCREATESTRUCT(); HOBJECT hFiredFrom; HOBJECT hObjectHit; uint8 nWeaponId; uint8 nAmmoId; uint8 nSurfaceType; uint16 wIgnoreFX; LTVector vFirePos; LTVector vPos; LTVector vSurfaceNormal; uint8 nShooterId; LTBOOL bLocal; IMPACT_TYPE eImpactType; }; inline WCREATESTRUCT::WCREATESTRUCT() { vFirePos.Init(); vPos.Init(); vSurfaceNormal.Init(); hFiredFrom = LTNULL; hObjectHit = LTNULL; nWeaponId = 0; nAmmoId = 0; nSurfaceType = 0; wIgnoreFX = 0; bLocal = LTFALSE; nShooterId = -1; } class CWeaponFX : public CSpecialFX { public : CWeaponFX() : CSpecialFX() { m_hFiredFrom = LTNULL; m_nWeaponId = WMGR_INVALID_ID; m_nAmmoId = WMGR_INVALID_ID; m_eSurfaceType = ST_UNKNOWN; m_eExitSurface = ST_UNKNOWN; m_wImpactFX = 0; m_wFireFX = 0; m_wIgnoreFX = 0; m_fInstDamage = 0; m_fAreaDamage = 0; m_nShooterId = -1; m_nLocalId = -1; m_bLocal = LTFALSE; m_vFirePos.Init(); m_vPos.Init(); m_vDir.Init(); m_vSurfaceNormal.Init(); m_vExitPos.Init(); m_vExitNormal.Init(); m_rSurfaceRot.Init(); m_rDirRot.Init(); m_eExitCode = CC_NO_CONTAINER; m_eCode = CC_NO_CONTAINER; m_eFirePosCode = CC_NO_CONTAINER; m_fFireDistance = 100.0f; m_nDetailLevel = RS_HIGH; m_pWeapon = LTNULL; m_pAmmo = LTNULL; } virtual LTBOOL Init(HLOCALOBJ hServObj, ILTMessage_Read *pMsg); virtual LTBOOL Init(SFXCREATESTRUCT* psfxCreateStruct); virtual LTBOOL CreateObject(ILTClient* pClientDE); virtual LTBOOL Update() { return LTFALSE; } virtual uint32 GetSFXID() { return SFX_WEAPON_ID; } protected : HOBJECT m_hFiredFrom; // Who fired the weapon HOBJECT m_hObjectHit; // The object we hit if any int m_nWeaponId; // Id of weapon fired int m_nAmmoId; // Type of ammo used SurfaceType m_eSurfaceType; // Surface hit by bullet SurfaceType m_eExitSurface; // Surface bullet is exiting uint16 m_wFireFX; // Fire FX to create uint16 m_wImpactFX; // Impact FX to create uint16 m_wIgnoreFX; // Fire FX to ignore LTFLOAT m_fInstDamage; // Instantaneous damage (vector) LTFLOAT m_fAreaDamage; // Area damage (explosion) LTVector m_vFirePos; // Position bullet was fired from LTVector m_vPos; // Impact pos LTVector m_vExitPos; // Bullet exit pos LTVector m_vExitNormal; // Exit surface normal uint8 m_nDetailLevel; // Current detail level setting ContainerCode m_eCode; // Container effect is in ContainerCode m_eFirePosCode; // Container fire pos is in ContainerCode m_eExitCode; // Container exit pos is in LTFLOAT m_fFireDistance; // Distance from fire pos to pos LTVector m_vDir; // Direction from fire pos to pos LTVector m_vSurfaceNormal; // Normal of surface of impact LTRotation m_rSurfaceRot; // Normal of surface (as rotation) LTRotation m_rDirRot; // Rotation based on m_vDir uint8 m_nShooterId; // Client id of the shooter uint8 m_nLocalId; // Local client id LTBOOL m_bLocal; // Is this a local fx (only done on this client?) LTVector m_vLightColor; // Impact light color WEAPON const *m_pWeapon; // Weapon data AMMO const *m_pAmmo; // Ammo data IMPACT_TYPE m_eImpactType; // type of impact FX to play // NOTE: this can be overridden // by other effects, such as // "underwater" void SetupExitInfo(); void CreateExitMark(); void CreateExitDebris(); void CreateMark(const LTVector &vPos, const LTVector &vNorm, const LTRotation &rRot, SurfaceType eType); void CreateTracer(); void CreateBulletTrail(const LTVector &vStartPos); void CreateWeaponSpecificFX(); void CreateSurfaceSpecificFX(); void CreateLightBeamFX(SURFACE* pSurf); void CreateMuzzleFX(); void CreateShell(); void CreateMuzzleLight(); void PlayImpactSound(); void PlayFireSound(); void PlayBulletFlyBySound(); void PlayImpactDing(); void CreateLightFX(); void CreateBloodSplatFX(); void CreateLowVectorBloodFX(const LTVector & vVelMin, const LTVector & vVelMax, LTFLOAT fRange); void CreateMedVectorBloodFX(const LTVector & vVelMin, const LTVector & vVelMax, LTFLOAT fRange); LTBOOL IsBulletTrailWeapon(); LTVector CalcFirePos(const LTVector &vFirePos); LTVector CalcBreachPos(const LTVector &vBreachPos); }; #endif // __WEAPON_FX_H__
[ [ [ 1, 182 ] ] ]
e1d8203c5a034d60c5a14434c2e0015a02ee8efd
c8f467a4cee0b4067b93936574c884c9de0b36cf
/source/Irrlicht/CAnimatedMeshMD3.cpp
e4ce07a0f97999f893a4871bf879a60c41ec50fe
[ "LicenseRef-scancode-unknown-license-reference", "Zlib", "LicenseRef-scancode-other-permissive" ]
permissive
flaithbheartaigh/mirrlicht
1ff418d29017e55e5f4a27a70dcfd5a88cb244b5
ccc16e8f5465fb72e81ae986e56ef2e4c3e7654b
refs/heads/master
2021-01-10T11:29:49.569701
2009-01-12T21:08:31
2009-01-12T21:08:31
49,994,212
0
0
null
null
null
null
UTF-8
C++
false
false
10,782
cpp
// Copyright (C) 2002-2007 Nikolaus Gebhardt / Fabio Concas / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #include "CAnimatedMeshMD3.h" #include "os.h" namespace irr { namespace scene { #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) # pragma pack( push, packing ) # pragma pack( 1 ) # define PACK_STRUCT #elif defined( __GNUC__ ) # define PACK_STRUCT __attribute__((packed)) #elif defined(__SYMBIAN32__) # if defined(__WINS__) # define PACK_STRUCT # pragma pack(1) # else # define PACK_STRUCT __attribute__((packed,aligned(1))) # endif #else # error compiler not supported #endif struct SMD3Bone { f32 Mins[3]; // bounding box per frame f32 Maxs[3]; f32 Position[3]; // position of bounding box f32 scale; c8 creator[16]; }; struct SMD3Tag { c8 Name[64]; //name of 'tag' as it's usually called in the md3 files try to see it as a sub-mesh/seperate mesh-part. f32 position[3]; //relative position of tag f32 rotationMatrix[9]; //3x3 rotation direction of tag }; struct SMD3Skin { c8 name[68]; // name of skin }; // Default alignment #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) # pragma pack( pop, packing ) #endif #undef PACK_STRUCT //! Constructor CAnimatedMeshMD3::CAnimatedMeshMD3 () : Mesh ( 0 ) { #ifdef _DEBUG setDebugName("CAnimatedMeshMD3"); #endif Mesh = new SMD3Mesh (); memset ( &Mesh->MD3Header, 0, sizeof ( Mesh->MD3Header ) ); setInterpolationShift ( 0, 0 ); } //! Destructor CAnimatedMeshMD3::~CAnimatedMeshMD3() { if ( Mesh ) Mesh->drop (); } //! Returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. s32 CAnimatedMeshMD3::getFrameCount() { return Mesh->MD3Header.numFrames << IPolShift; } //! Rendering Hint void CAnimatedMeshMD3::setInterpolationShift ( u32 shift, u32 loopMode ) { IPolShift = shift; } //! Returns the animated tag list based on a detail level. 0 is the lowest, 255 the highest detail. SMD3QuaterionTagList *CAnimatedMeshMD3::getTagList(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) { if ( 0 == Mesh ) return 0; getMesh ( frame, detailLevel, startFrameLoop, endFrameLoop ); return &TagListIPol; } //! Returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail. IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop) { if ( 0 == Mesh ) return 0; u32 i; //! check if we have the mesh in our private cache SCacheInfo candidate ( frame, startFrameLoop, endFrameLoop ); if ( candidate == Current ) return &MeshIPol; startFrameLoop = core::s32_max ( 0, startFrameLoop >> IPolShift ); endFrameLoop = core::if_c_a_else_b ( endFrameLoop < 0, Mesh->MD3Header.numFrames - 1, endFrameLoop >> IPolShift ); const u32 mask = 1 << IPolShift; s32 frameA; s32 frameB; f32 iPol; if ( LoopMode ) { // correct frame to "pixel center" frame -= mask >> 1; // interpolation iPol = f32(frame & ( mask - 1 )) * core::reciprocal ( f32(mask) ); // wrap anim frame >>= IPolShift; frameA = core::if_c_a_else_b ( frame < startFrameLoop, endFrameLoop, frame ); frameB = core::if_c_a_else_b ( frameA + 1 > endFrameLoop, startFrameLoop, frameA + 1 ); } else { // correct frame to "pixel center" frame -= mask >> 1; iPol = f32(frame & ( mask - 1 )) * core::reciprocal ( f32(mask) ); // clamp anim frame >>= IPolShift; frameA = core::s32_clamp ( frame, startFrameLoop, endFrameLoop ); frameB = core::s32_min ( frameA + 1, endFrameLoop ); } // build curren vertex for ( i = 0; i!= Mesh->Buffer.size (); ++i ) { buildVertexArray ( frameA, frameB, iPol, Mesh->Buffer[i], (SMeshBuffer*) MeshIPol.getMeshBuffer ( i ) ); } MeshIPol.recalculateBoundingBox (); // build current tags buildTagArray ( frameA, frameB, iPol ); Current = candidate; return &MeshIPol; } //! create a Irrlicht MeshBuffer for a MD3 MeshBuffer IMeshBuffer * CAnimatedMeshMD3::createMeshBuffer ( const SMD3MeshBuffer * source ) { SMeshBuffer * dest = new SMeshBuffer (); dest->Vertices.set_used ( source->MeshHeader.numVertices ); dest->Indices.set_used ( source->Indices.size () ); u32 i; // fill in static face info for ( i = 0; i < source->Indices.size (); i += 3 ) { dest->Indices[i + 0 ] = (u16) source->Indices[i + 0]; dest->Indices[i + 1 ] = (u16) source->Indices[i + 1]; dest->Indices[i + 2 ] = (u16) source->Indices[i + 2]; } // fill in static vertex info for ( i = 0; i!= (u32)source->MeshHeader.numVertices; ++i ) { video::S3DVertex &v = dest->Vertices [ i ]; v.Color = 0xFFFFFFFF; v.TCoords.X = source->Tex[i].u; v.TCoords.Y = source->Tex[i].v; } return dest; } //! build final mesh's vertices from frames frameA and frameB with linear interpolation. void CAnimatedMeshMD3::buildVertexArray ( u32 frameA, u32 frameB, f32 interpolate, const SMD3MeshBuffer * source, SMeshBuffer * dest ) { u32 i; u32 frameOffsetA = frameA * source->MeshHeader.numVertices; u32 frameOffsetB = frameB * source->MeshHeader.numVertices; f32 scale = ( 1.f/ 64.f ); core::vector3df nA; core::vector3df nB; for ( i = 0; i!= (u32)source->MeshHeader.numVertices; ++i ) { video::S3DVertex &v = dest->Vertices [ i ]; const SMD3Vertex &vA = source->Vertices [ frameOffsetA + i ]; const SMD3Vertex &vB = source->Vertices [ frameOffsetB + i ]; // position v.Pos.X = scale * ( vA.position[0] + interpolate * ( vB.position[0] - vA.position[0] ) ); v.Pos.Y = scale * ( vA.position[2] + interpolate * ( vB.position[2] - vA.position[2] ) ); v.Pos.Z = scale * ( vA.position[1] + interpolate * ( vB.position[1] - vA.position[1] ) ); // normal getNormal ( nA, vA.normal[0], vA.normal[1] ); getNormal ( nB, vB.normal[0], vB.normal[1] ); v.Normal.X = nA.X + interpolate * ( nB.X - nA.X ); v.Normal.Y = nA.Z + interpolate * ( nB.Z - nA.Z ); v.Normal.Z = nA.Y + interpolate * ( nB.Y - nA.Y ); } dest->recalculateBoundingBox (); } //! build final mesh's tag from frames frameA and frameB with linear interpolation. void CAnimatedMeshMD3::buildTagArray ( u32 frameA, u32 frameB, f32 interpolate ) { u32 i; u32 frameOffsetA = frameA * Mesh->MD3Header.numTags; u32 frameOffsetB = frameB * Mesh->MD3Header.numTags; for ( i = 0; i!= (u32)Mesh->MD3Header.numTags; ++i ) { SMD3QuaterionTag &d = TagListIPol [ i ]; const SMD3QuaterionTag &qA = Mesh->TagList.Container[ frameOffsetA + i]; const SMD3QuaterionTag &qB = Mesh->TagList.Container[ frameOffsetB + i]; // rotation d.rotation.slerp( qA.rotation, qB.rotation, interpolate ); // position d.position.X = qA.position.X + interpolate * ( qB.position.X - qA.position.X ); d.position.Y = qA.position.Y + interpolate * ( qB.position.Y - qA.position.Y ); d.position.Z = qA.position.Z + interpolate * ( qB.position.Z - qA.position.Z ); } } /*! loads a model */ bool CAnimatedMeshMD3::loadModelFile( u32 modelIndex, io::IReadFile* file) { if (!file) return false; u32 i,g; file->seek(0); //! Check MD3Header { file->read( &Mesh->MD3Header, sizeof(SMD3Header) ); if ( strncmp("IDP3", Mesh->MD3Header.headerID, 4) ) { os::Printer::log("MD3 Loader: invalid header"); return false; } } //! store model name Mesh->Name = file->getFileName(); //! Bone Frames Data ( ignore ) //! Tag Data const u32 totalTags = Mesh->MD3Header.numTags * Mesh->MD3Header.numFrames; SMD3Tag import; SMD3QuaterionTag exp; file->seek( Mesh->MD3Header.tagStart ); for (i = 0; i != totalTags; ++i ) { file->read(&import, sizeof(import) ); //! tag name exp.Name = import.Name; //! position exp.position.X = import.position[0]; exp.position.Y = import.position[2]; exp.position.Z = import.position[1]; //! construct quaternion from a RH 3x3 Matrix exp.rotation.set (import.rotationMatrix[7], 0.f, -import.rotationMatrix[6], 1 + import.rotationMatrix[8]); exp.rotation.normalize (); Mesh->TagList.Container.push_back ( exp ); } //! Meshes u32 offset = Mesh->MD3Header.tagEnd; SMD3Skin skin; for (i = 0; i != (u32)Mesh->MD3Header.numMeshes; ++i ) { //! construct a new mesh buffer SMD3MeshBuffer * buf = new SMD3MeshBuffer (); // !read mesh header info SMD3MeshHeader &meshHeader = buf->MeshHeader; //! read mesh info file->seek( offset ); file->read( &meshHeader, sizeof(SMD3MeshHeader) ); //! prepare memory buf->Vertices.set_used ( meshHeader.numVertices * Mesh->MD3Header.numFrames ); buf->Indices.set_used ( meshHeader.numTriangles * 3 ); buf->Tex.set_used ( meshHeader.numVertices ); //! read skins (shaders) file->seek( offset + buf->MeshHeader.offset_shaders ); for ( g = 0; g != (u32)buf->MeshHeader.numShader; ++g ) { file->read( &skin, sizeof(skin) ); buf->Shader.push_back ( skin.name ); } //! read texture coordinates file->seek( offset + buf->MeshHeader.offset_st); file->read( buf->Tex.pointer(), buf->MeshHeader.numVertices * sizeof(SMD3TexCoord) ); //! read vertices file->seek(offset + meshHeader.vertexStart); file->read( buf->Vertices.pointer(), Mesh->MD3Header.numFrames * meshHeader.numVertices * sizeof(SMD3Vertex) ); //! read indices file->seek( offset + meshHeader.offset_triangles ); file->read( buf->Indices.pointer(), meshHeader.numTriangles * sizeof(SMD3Face) ); //! store meshBuffer Mesh->Buffer.push_back ( buf ); offset += meshHeader.offset_end; } // Init Mesh Interpolation for ( i = 0; i != Mesh->Buffer.size (); ++i ) { IMeshBuffer * buffer = createMeshBuffer ( Mesh->Buffer[i] ); MeshIPol.addMeshBuffer ( buffer ); buffer->drop (); } // Init Tag Interpolation for (i = 0; i != (u32)Mesh->MD3Header.numTags; ++i ) { TagListIPol.Container.push_back ( Mesh->TagList.Container[i] ); } return true; } SMD3Mesh * CAnimatedMeshMD3::getOriginalMesh () { return Mesh; } //! Returns an axis aligned bounding box const core::aabbox3d<f32>& CAnimatedMeshMD3::getBoundingBox() const { return MeshIPol.BoundingBox; } //! Returns the type of the animated mesh. E_ANIMATED_MESH_TYPE CAnimatedMeshMD3::getMeshType() const { return EAMT_MD3; } } // end namespace scene } // end namespace irr
[ "limingchina@c8d24273-d621-0410-9a95-1b5ff033c8bf" ]
[ [ [ 1, 420 ] ] ]
5f7358b6c61cd729b5e6e9090310533ba64a337c
709cd826da3ae55945fd7036ecf872ee7cdbd82a
/Term/WildMagic2/Source/Graphics/WmlKeyframeController.cpp
734a268d4f1b4cefdfe65af968c5abbfc56a250a
[]
no_license
argapratama/kucgbowling
20dbaefe1596358156691e81ccceb9151b15efb0
65e40b6f33c5511bddf0fa350c1eefc647ace48a
refs/heads/master
2018-01-08T15:27:44.784437
2011-06-19T15:23:39
2011-06-19T15:23:39
36,738,655
0
0
null
null
null
null
UTF-8
C++
false
false
16,760
cpp
// Magic Software, Inc. // http://www.magic-software.com // http://www.wild-magic.com // Copyright (c) 2003. All Rights Reserved // // The Wild Magic Library (WML) source code is supplied under the terms of // the license agreement http://www.magic-software.com/License/WildMagic.pdf // and may not be copied or disclosed except in accordance with the terms of // that agreement. #include "WmlKeyframeController.h" #include "WmlSpatial.h" using namespace Wml; WmlImplementRTTI(KeyframeController,Controller); WmlImplementStream(KeyframeController); //---------------------------------------------------------------------------- KeyframeController::KeyframeController () { m_iTQuantity = 0; m_afTTime = NULL; m_akTData = NULL; m_iTLastIndex = 0; m_iRQuantity = 0; m_afRTime = NULL; m_akRData = NULL; m_iRLastIndex = 0; m_iSQuantity = 0; m_afSTime = NULL; m_afSData = NULL; m_iSLastIndex = 0; m_iSharedQuantity = 0; m_afSharedTime = NULL; m_iSharedLastIndex = 0; } //---------------------------------------------------------------------------- KeyframeController::~KeyframeController () { delete[] m_akTData; delete[] m_akRData; delete[] m_afSData; if ( m_iSharedQuantity > 0 ) { delete[] m_afSharedTime; } else { delete[] m_afTTime; delete[] m_afRTime; delete[] m_afSTime; } } //---------------------------------------------------------------------------- void KeyframeController::SetSharedQuantity (int iQuantity) { m_iSharedQuantity = iQuantity; m_iTQuantity = iQuantity; m_iRQuantity = iQuantity; m_iSQuantity = iQuantity; } //---------------------------------------------------------------------------- void KeyframeController::SetSharedTimes (float* afTime) { m_afSharedTime = afTime; m_afTTime = afTime; m_afRTime = afTime; m_afSTime = afTime; } //---------------------------------------------------------------------------- void KeyframeController::GetKeyInfo (float fCtrlTime, int iQuantity, float* afTime, int& riLastIndex, float& rfTime, int& ri0, int& ri1) { if ( fCtrlTime <= afTime[0] ) { rfTime = 0.0f; riLastIndex = 0; ri0 = 0; ri1 = 0; return; } if ( fCtrlTime >= afTime[iQuantity-1] ) { rfTime = 0.0f; riLastIndex = iQuantity - 1; ri0 = riLastIndex; ri1 = riLastIndex; return; } int iNextIndex; if ( fCtrlTime > afTime[riLastIndex] ) { iNextIndex = riLastIndex + 1; while ( fCtrlTime >= afTime[iNextIndex] ) { riLastIndex = iNextIndex; iNextIndex++; } ri0 = riLastIndex; ri1 = iNextIndex; rfTime = (fCtrlTime - afTime[ri0])/(afTime[ri1] - afTime[ri0]); } else if ( fCtrlTime < afTime[riLastIndex] ) { iNextIndex = riLastIndex - 1; while ( fCtrlTime <= afTime[iNextIndex] ) { riLastIndex = iNextIndex; iNextIndex--; } ri0 = iNextIndex; ri1 = riLastIndex; rfTime = (fCtrlTime - afTime[ri0])/(afTime[ri1] - afTime[ri0]); } else { rfTime = 0.0f; ri0 = riLastIndex; ri1 = riLastIndex; } } //---------------------------------------------------------------------------- Vector3f KeyframeController::GetTranslation (float fNormTime, int i0, int i1) { return m_akTData[i0] + fNormTime*(m_akTData[i1] - m_akTData[i0]); } //---------------------------------------------------------------------------- Matrix3f KeyframeController::GetRotation (float fNormTime, int i0, int i1) { Quaternionf kQ = Quaternionf::Slerp(fNormTime,m_akRData[i0], m_akRData[i1]); Matrix3f kRot; kQ.ToRotationMatrix(kRot); return kRot; } //---------------------------------------------------------------------------- float KeyframeController::GetScale (float fNormTime, int i0, int i1) { return m_afSData[i0] + fNormTime*(m_afSData[i1] - m_afSData[i0]); } //---------------------------------------------------------------------------- bool KeyframeController::Update (float fAppTime) { if ( !Active() ) { // controller does not compute world transform return false; } Spatial* pkSpatial = (Spatial*) m_pkObject; float fCtrlTime = GetControlTime(fAppTime); float fNormTime; int i0, i1; if ( m_iSharedQuantity > 0 ) { GetKeyInfo(fCtrlTime,m_iSharedQuantity,m_afSharedTime, m_iSharedLastIndex,fNormTime,i0,i1); if ( m_iTQuantity > 0 ) pkSpatial->Translate() = GetTranslation(fNormTime,i0,i1); if ( m_iRQuantity > 0 ) pkSpatial->Rotate() = GetRotation(fNormTime,i0,i1); if ( m_iSQuantity > 0 ) pkSpatial->Scale() = GetScale(fNormTime,i0,i1); } else { if ( m_iTQuantity > 0 ) { GetKeyInfo(fCtrlTime,m_iTQuantity,m_afTTime,m_iTLastIndex, fNormTime,i0,i1); pkSpatial->Translate() = GetTranslation(fNormTime,i0,i1); } if ( m_iRQuantity > 0 ) { GetKeyInfo(fCtrlTime,m_iRQuantity,m_afRTime,m_iRLastIndex, fNormTime,i0,i1); pkSpatial->Rotate() = GetRotation(fNormTime,i0,i1); } if ( m_iSQuantity > 0 ) { GetKeyInfo(fCtrlTime,m_iSQuantity,m_afSTime,m_iSLastIndex, fNormTime,i0,i1); pkSpatial->Scale() = GetScale(fNormTime,i0,i1); } } // controller does not compute world transform return false; } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // streaming //---------------------------------------------------------------------------- Object* KeyframeController::Factory (Stream& rkStream) { KeyframeController* pkObject = new KeyframeController; Stream::Link* pkLink = new Stream::Link(pkObject); pkObject->Load(rkStream,pkLink); return pkObject; } //---------------------------------------------------------------------------- void KeyframeController::Load (Stream& rkStream, Stream::Link* pkLink) { Controller::Load(rkStream,pkLink); bool bShared; StreamReadBool(rkStream,bShared); if ( bShared ) { StreamRead(rkStream,m_iSharedQuantity); if ( m_iSharedQuantity > 0 ) { m_afSharedTime = new float[m_iSharedQuantity]; m_akTData = new Vector3f[m_iSharedQuantity]; m_akRData = new Quaternionf[m_iSharedQuantity]; m_afSData = new float[m_iSharedQuantity]; StreamRead(rkStream,m_afSharedTime,m_iSharedQuantity); StreamRead(rkStream,m_akTData,m_iSharedQuantity); StreamRead(rkStream,m_akRData,m_iSharedQuantity); StreamRead(rkStream,m_afSData,m_iSharedQuantity); SetSharedQuantity(m_iSharedQuantity); } } else { StreamRead(rkStream,m_iTQuantity); if ( m_iTQuantity > 0 ) { m_afTTime = new float[m_iTQuantity]; m_akTData = new Vector3f[m_iTQuantity]; StreamRead(rkStream,m_afTTime,m_iTQuantity); StreamRead(rkStream,m_akTData,m_iTQuantity); } StreamRead(rkStream,m_iRQuantity); if ( m_iRQuantity > 0 ) { m_afRTime = new float[m_iRQuantity]; m_akRData = new Quaternionf[m_iRQuantity]; StreamRead(rkStream,m_afRTime,m_iRQuantity); StreamRead(rkStream,m_akRData,m_iRQuantity); } StreamRead(rkStream,m_iSQuantity); if ( m_iSQuantity > 0 ) { m_afSTime = new float[m_iSQuantity]; m_afSData = new float[m_iSQuantity]; StreamRead(rkStream,m_afSTime,m_iSQuantity); StreamRead(rkStream,m_afSData,m_iSQuantity); } } } //---------------------------------------------------------------------------- void KeyframeController::Link (Stream& rkStream, Stream::Link* pkLink) { Controller::Link(rkStream,pkLink); } //---------------------------------------------------------------------------- bool KeyframeController::Register (Stream& rkStream) { return Controller::Register(rkStream); } //---------------------------------------------------------------------------- void KeyframeController::Save (Stream& rkStream) { Controller::Save(rkStream); bool bShared = m_iSharedQuantity > 0; StreamWriteBool(rkStream,bShared); if ( bShared ) { StreamWrite(rkStream,m_iSharedQuantity); StreamWrite(rkStream,m_afSharedTime,m_iSharedQuantity); StreamWrite(rkStream,m_akTData,m_iSharedQuantity); StreamWrite(rkStream,m_akRData,m_iSharedQuantity); StreamWrite(rkStream,m_afSData,m_iSharedQuantity); } else { StreamWrite(rkStream,m_iTQuantity); if ( m_iTQuantity > 0 ) { StreamWrite(rkStream,m_afTTime,m_iTQuantity); StreamWrite(rkStream,m_akTData,m_iTQuantity); } StreamWrite(rkStream,m_iRQuantity); if ( m_iRQuantity > 0 ) { StreamWrite(rkStream,m_afRTime,m_iRQuantity); StreamWrite(rkStream,m_akRData,m_iRQuantity); } StreamWrite(rkStream,m_iSQuantity); if ( m_iSQuantity > 0 ) { StreamWrite(rkStream,m_afSTime,m_iSQuantity); StreamWrite(rkStream,m_afSData,m_iSQuantity); } } } //---------------------------------------------------------------------------- StringTree* KeyframeController::SaveStrings () { int iSQuantity, iCQuantity; if ( m_iSharedQuantity > 0 ) { iSQuantity = 2; iCQuantity = 5; } else { iSQuantity = 4; iCQuantity = 7; } StringTree* pkTree = new StringTree(iSQuantity,0,iCQuantity,0); // strings pkTree->SetString(0,MakeString(&ms_kRTTI,GetName())); if ( m_iSharedQuantity > 0 ) { pkTree->SetString(1,MakeString("quantity =",m_iSharedQuantity)); } else { pkTree->SetString(1,MakeString("translate quantity =",m_iTQuantity)); pkTree->SetString(2,MakeString("rotate quantity =",m_iRQuantity)); pkTree->SetString(3,MakeString("scale quantity =",m_iSQuantity)); } // children pkTree->SetChild(0,Controller::SaveStrings()); StringTree* pkAttrTree; char acDummy[16]; int i; if ( m_iSharedQuantity > 0 ) { pkAttrTree = new StringTree(m_iSharedQuantity+1,0,0,0); pkTree->SetChild(1,pkAttrTree); pkAttrTree->SetString(0,MakeString("times")); for (i = 0; i < m_iSharedQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_afSharedTime[i])); } pkAttrTree = new StringTree(m_iSharedQuantity+1,0,0,0); pkTree->SetChild(2,pkAttrTree); pkAttrTree->SetString(0,MakeString("translate keys")); for (i = 0; i < m_iSharedQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_akTData[i])); } pkAttrTree = new StringTree(m_iSharedQuantity+1,0,0,0); pkTree->SetChild(3,pkAttrTree); pkAttrTree->SetString(0,MakeString("rotate keys")); for (i = 0; i < m_iSharedQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_akRData[i])); } pkAttrTree = new StringTree(m_iSharedQuantity+1,0,0,0); pkTree->SetChild(4,pkAttrTree); pkAttrTree->SetString(0,MakeString("scale keys")); for (i = 0; i < m_iSharedQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_afSData[i])); } } else { pkAttrTree = new StringTree(m_iTQuantity+1,0,0,0); pkTree->SetChild(1,pkAttrTree); pkAttrTree->SetString(0,MakeString("translate times")); for (i = 0; i < m_iTQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_afTTime[i])); } pkAttrTree = new StringTree(m_iTQuantity+1,0,0,0); pkTree->SetChild(2,pkAttrTree); pkAttrTree->SetString(0,MakeString("translate keys")); for (i = 0; i < m_iTQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_akTData[i])); } pkAttrTree = new StringTree(m_iRQuantity+1,0,0,0); pkTree->SetChild(3,pkAttrTree); pkAttrTree->SetString(0,MakeString("rotate times")); for (i = 0; i < m_iRQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_afRTime[i])); } pkAttrTree = new StringTree(m_iRQuantity+1,0,0,0); pkTree->SetChild(4,pkAttrTree); pkAttrTree->SetString(0,MakeString("rotate keys")); for (i = 0; i < m_iRQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_akRData[i])); } pkAttrTree = new StringTree(m_iSQuantity+1,0,0,0); pkTree->SetChild(5,pkAttrTree); pkAttrTree->SetString(0,MakeString("scale times")); for (i = 0; i < m_iSQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy,m_afSTime[i])); } pkAttrTree = new StringTree(m_iSQuantity+1,0,0,0); pkTree->SetChild(6,pkAttrTree); pkAttrTree->SetString(0,MakeString("scale keys")); for (i = 0; i < m_iSQuantity; i++) { sprintf(acDummy,"%d:",i); pkAttrTree->SetString(i+1,MakeString(acDummy, m_afSData[i])); } } return pkTree; } //---------------------------------------------------------------------------- int KeyframeController::GetMemoryUsed () const { int iBaseSize = sizeof(KeyframeController) - sizeof(Controller); int iDynaSize = 0; if ( m_iSharedQuantity > 0 ) { iDynaSize += m_iSharedQuantity*sizeof(m_afSharedTime[0]); iDynaSize += m_iSharedQuantity*sizeof(m_akTData[0]); iDynaSize += m_iSharedQuantity*sizeof(m_akRData[0]); iDynaSize += m_iSharedQuantity*sizeof(m_afSData[0]); } else { iDynaSize += m_iTQuantity*(sizeof(m_afTTime[0])+sizeof(m_akTData[0])); iDynaSize += m_iRQuantity*(sizeof(m_afRTime[0])+sizeof(m_akRData[0])); iDynaSize += m_iSQuantity*(sizeof(m_afSTime[0])+sizeof(m_afSData[0])); } int iTotalSize = iBaseSize + iDynaSize + Controller::GetMemoryUsed(); return iTotalSize; } //---------------------------------------------------------------------------- int KeyframeController::GetDiskUsed () const { int iSize = Controller::GetDiskUsed(); bool bShared = m_iSharedQuantity > 0; iSize += StreamBytesBool(bShared); if ( bShared ) { iSize += sizeof(m_iSharedQuantity); iSize += m_iSharedQuantity*sizeof(m_afSharedTime[0]); iSize += m_iSharedQuantity*sizeof(m_akTData[0]); iSize += m_iSharedQuantity*sizeof(m_akRData[0]); iSize += m_iSharedQuantity*sizeof(m_afSData[0]); } else { iSize += sizeof(m_iTQuantity); if ( m_iTQuantity > 0 ) { iSize += m_iTQuantity*sizeof(m_afTTime[0]); iSize += m_iTQuantity*sizeof(m_akTData[0]); } iSize += sizeof(m_iRQuantity); if ( m_iRQuantity > 0 ) { iSize += m_iRQuantity*sizeof(m_afRTime[0]); iSize += m_iRQuantity*sizeof(m_akRData[0]); } iSize += sizeof(m_iSQuantity); if ( m_iSQuantity > 0 ) { iSize += m_iSQuantity*sizeof(m_afSTime[0]); iSize += m_iSQuantity*sizeof(m_afSData[0]); } } return iSize; } //----------------------------------------------------------------------------
[ [ [ 1, 522 ] ] ]
f238ea1cf85588683600544023010e443642041a
5b3221bdc6edd8123287b2ace0a971eb979d8e2d
/Fiew/ToolFilter.cpp
22ed2855922edf1164f0a1b9d1b53b44ab0a2011
[]
no_license
jackiejohn/fedit-image-editor
0a4b67b46b88362d45db6a2ba7fa94045ad301e2
fd6a87ed042e8adf4bf88ddbd13f2e3b475d985a
refs/heads/master
2021-05-29T23:32:39.749370
2009-02-25T21:01:11
2009-02-25T21:01:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
17,086
cpp
#include "stdafx.h" #include "Core.h" ToolFilter::ToolFilter() : Tool(new FwCHAR(TOOL_FILTER),NULL,FILTER) { this->lastFilterId = ID_FILTER_BLUR; this->lastFilterValue = 1; this->lastActivate = false; this->isLastActivate = false; this->lastBw = false; this->lastAlpha = true; int size = 5; this->lastCustomMatrix.matrix = ToolFilter::allocMatrix(size,size); this->lastCustomMatrix.bias = 0; this->lastCustomMatrix.division = 1; this->lastCustomMatrix.mxw = size; this->lastCustomMatrix.mxh = size; } ToolFilter::~ToolFilter() { } void ToolFilter::activate() { ChildCore *child = this->core->getActiveChild(); if( child != NULL ){ if( this->lastActivate == true && this->isLastActivate == false ){ this->lastActivate = false; return; } ToolFilter::Info fi; Bitmap *source = NULL; if( child->getWorkspace()->getSelection() != NULL ){ source = child->getWorkspace()->getSelectedProjection(NULL,COPCOP); } else { source = child->getWorkspace()->getSelectedLayer()->getRender(); source = source->Clone(Rect(0,0,source->GetWidth(),source->GetHeight()),source->GetPixelFormat()); } fi.bmpSource = source; fi.bmpEffect = NULL; fi.bw = this->lastBw; fi.bwalpha = (this->lastAlpha && this->lastFilterId != ID_FILTER_OLDSTONE && this->lastFilterId != ID_FILTER_EDGETRACE ); fi.smooth = true; fi.edgeTrace = (this->lastFilterId == ID_FILTER_EDGETRACE); fi.filterId = this->lastFilterId; fi.filterValue = this->lastFilterValue; fi.filterByValue = (this->lastFilterId != ID_FILTER_CUSTOM); fi.minVal = 0; switch(fi.filterId){ case ID_FILTER_SHARPEN: fi.maxVal = SHARPENMAX; break; default: fi.maxVal = FILTERMAX; break; } if( fi.filterByValue == true ) fi.matrix = ToolFilter::allocateMatrix(fi.filterId,fi.filterValue); else fi.matrix = this->lastCustomMatrix; int result = NO; if( this->lastActivate == false ){ result = this->core->getDialogs()->showDialog( (LPCTSTR)IDD_FIL, (DLGPROC)Dialogs::processDlg_Fil, (LPARAM)&fi ); } else { this->lastActivate = false; result = YES; } if( result == YES ){ Point shift(0,0); Rect *bounds = NULL; if( child->getWorkspace()->getSelection() != NULL ){ bounds = new Rect(0,0,0,0); child->getWorkspace()->getSelection()->GetBounds(bounds); fi.bmpSource = child->getWorkspace()->getSelectedLayer()->getRender(); } else { int exw = (int)( floor(fi.matrix.mxw / 2.0) + 1 ); int exh = (int)( floor(fi.matrix.mxh / 2.0) + 1 ); shift.X = -exw; shift.Y = -exh; Bitmap *newsource = new Bitmap( source->GetWidth() + 2 * exw, source->GetHeight() + 2 * exh, source->GetPixelFormat()); Graphics *g = Graphics::FromImage(newsource); g->DrawImage(source,exw,exh,source->GetWidth(),source->GetHeight()); delete g; delete source; source = newsource; fi.bmpSource = newsource; } if( fi.filterByValue == true ) this->lastFilterValue = fi.filterValue; else this->lastCustomMatrix = fi.matrix; this->lastBw = fi.bw; this->lastAlpha = fi.bwalpha; Rect newbounds = ToolFilter::applyFilter(&fi,bounds); if( child->getWorkspace()->getSelection() == NULL ){ bounds = &newbounds; bounds->X += shift.X; bounds->Y += shift.Y; } child->getWorkspace()->getSelectedLayer()->applyEffect( fi.bmpEffect, bounds, this, fi.filterId); delete fi.bmpEffect; this->isLastActivate = true; child->getWorkspace()->updateToolws(); child->getWorkspace()->update(); } if( source != NULL ) delete source; } } void ToolFilter::activateAgain() { this->lastActivate = true; this->activate(); } bool ToolFilter::canActivateAgain() { return this->isLastActivate; } void ToolFilter::setFilterId(int id) { this->lastFilterId = id; } int ToolFilter::getFilterId() { return this->lastFilterId; } double ToolFilter::calcMatrixWeight(ToolFilter::Matrix *matrix) { double weight = 0; /* int w = floor(matrix->mxw / 2.0); int h = floor(matrix->mxh / 2.0); for(int x = max(w - 2,0); x < min(w + 2,matrix->mxw); x++) for(int y = max(h - 2,0); y < min(h + 2,matrix->mxh); y++) weight += matrix->matrix[x][y]; */ for(int x = 0; x < matrix->mxw; x++) for(int y = 0; y < matrix->mxh; y++) weight += matrix->matrix[x][y]; return weight; } Rect ToolFilter::applyFilter(ToolFilter::Info *fi, Rect *clip, bool once) { Core::self->getGui()->setCursor(CURSOR_WAIT); int w = (int)( floor(fi->matrix.mxw / 2.0) ); int h = (int)( floor(fi->matrix.mxh / 2.0) ); int exw = fi->matrix.mxw + 1; int exh = fi->matrix.mxh + 1; UINT *src0, *bmp0; BitmapData srcData, bmpData; Bitmap *src = fi->bmpSource; Rect srcRect(0,0,src->GetWidth(),src->GetHeight()); if( clip == NULL ){ clip = &srcRect; } else { int maxx = max(clip->X - exw,0); int maxy = max(clip->Y - exh,0); int ext = 2; srcRect = Rect( maxx, maxy, min(clip->Width + ext * exw,(int)src->GetWidth() - maxx), min(clip->Height + ext * exh,(int)src->GetHeight() - maxy) ); } int bmpWidth = clip->Width; int bmpHeight = clip->Height; if( fi->smooth == true ){ bmpWidth += 4 * exw; bmpHeight += 4 * exh; } Bitmap *bmp = new Bitmap( bmpWidth, bmpHeight, src->GetPixelFormat() ); Rect bmpRect(0,0,bmp->GetWidth(),bmp->GetHeight()); src->LockBits( &srcRect, ImageLockModeRead, src->GetPixelFormat(), &srcData ); bmp->LockBits( &bmpRect, ImageLockModeWrite, bmp->GetPixelFormat(), &bmpData ); src0 = (UINT *)srcData.Scan0; bmp0 = (UINT *)bmpData.Scan0; int srcWidth = srcData.Width; int srcHeight = srcData.Height; for( int x = 0; x < bmpWidth; x++ ){ for( int y = 0; y < bmpHeight; y++ ){ bmp0[y * bmpData.Stride / 4 + x] = ToolFilter::filterPixel(fi,&srcData,x,y,w,h); } } if( fi->edgeTrace == true && fi->filterValue > 0 ){ ToolFilter::Matrix oldMatrix = fi->matrix; fi->matrix = ToolFilter::allocMatrixEdgetrace(fi->filterValue,1); for( int x = 0; x < bmpWidth; x++ ){ for( int y = 0; y < bmpHeight; y++ ){ bmp0[y * bmpData.Stride / 4 + x] += ToolFilter::filterPixel(fi,&srcData,x,y,w,h); } } fi->matrix = ToolFilter::allocMatrixEdgetrace(fi->filterValue,2); for( int x = 0; x < bmpWidth; x++ ){ for( int y = 0; y < bmpHeight; y++ ){ bmp0[y * bmpData.Stride / 4 + x] += ToolFilter::filterPixel(fi,&srcData,x,y,w,h); } } fi->matrix = oldMatrix; } src->UnlockBits(&srcData); bmp->UnlockBits(&bmpData); fi->bmpEffect = bmp; int refils = 0; switch(fi->filterId){ case ID_FILTER_SHARPEN: if( fi->filterValue > SHARPENMAX/2 ) refils = fi->filterValue - SHARPENMAX/2; break; case ID_FILTER_GAUSSIANBLUR: if( fi->filterValue > GAUSSMAX ) refils = fi->filterValue - GAUSSMAX; break; } Bitmap *source = fi->bmpSource; if( refils > 0 && once == false ){ for(int i = 0; i < refils; i++ ){ fi->bmpSource = fi->bmpEffect; fi->bmpEffect = NULL; ToolFilter::applyFilter(fi,NULL,true); delete fi->bmpSource; } } fi->bmpSource = source; Rect gridClip(clip->X,clip->Y,clip->Width,clip->Height); clip->X -= exw; clip->Y -= exh; Core::self->getGui()->setCursor(); return gridClip; } INT ToolFilter::scalePixel(RGBCOLOR color, bool alpha) { return (int)( (color.R + color.G + color.B + ((alpha == true) ? color.A : 0)) / ((alpha == true) ? 4.0 : 3.0) ); } UINT ToolFilter::getPixel(BitmapData *bmp, int x, int y) { if( x >= 0 && y >= 0 && x < (int)bmp->Width && y < (int)bmp->Height ){ UINT *src0 = (UINT *)bmp->Scan0; return src0[y * bmp->Stride / 4 + x]; } return NULL; } UINT ToolFilter::filterPixel(ToolFilter::Info *fi, BitmapData *bmp, int x, int y, int w, int h) { ToolFilter::Matrix *matrix = &fi->matrix; bool edgeTrace = fi->edgeTrace; bool bw = fi->bw; bool bwa = fi->bwalpha; double division = matrix->division; double bias = matrix->bias; int val = 0; int R,G,B,A; R = G = B = A = 0; for( int i = -w; i <= w; i++ ) { int bval = 0; int lastval = 0; int lR, lG, lB, lA, bR, bG, bB, bA; lR = lG = lB = lA = 0; bR = bG = bB = bA = 0; for( int j = -h; j <= h; j++ ) { int xx = x + i; int yy = y + j; if( (xx < 0 || yy < 0 || xx >= (int)bmp->Width || yy >= (int)bmp->Height) && fi->smooth == false ) { if( bw == false ) { R += bR; G += bG; B += bB; A += bA; } else val += bval; continue; } RGBCOLOR pick = Core::UINTtoRGBCOLOR( ToolFilter::getPixel(bmp,xx,yy) ); int factor = matrix->matrix[w+i][h+j]; if( bw == false ) { bR = pick.R; bG = pick.G; bB = pick.B; bA = pick.A; lR = pick.R * factor; lG = pick.G * factor; lB = pick.B * factor; lA = pick.A * factor; R += lR; G += lG; B += lB; A += lA; } else { bval = ToolFilter::scalePixel(pick); lastval = (bval * factor); val += lastval; } } } double div = ToolFilter::calcMatrixWeight(matrix); if( div == 0 ) div = 1; if( bw == false ) { double tR = R / div; double tG = G / div; double tB = B / div; double tA = A / div; R = (int)((tR / division) + bias); G = (int)((tG / division) + bias); B = (int)((tB / division) + bias); A = (int)((tA / division) + bias); if( R < 0 ) R = 0; if( R > 255 ) R = 255; if( G < 0 ) G = 0; if( G > 255 ) G = 255; if( B < 0 ) B = 0; if( B > 255 ) B = 255; } else { double temp = val / div; val = (int)((temp / division) + bias); min( max(val,255),0 ); } if( edgeTrace == true ) { if( bw == false ) { R = 255 - R; G = 255 - G; B = 255 - B; } else val = 255 - val; } if( bw == true ) return Core::RGBtoUINT(val,val,val,((bwa == true) ? val : 255)); return Core::RGBtoUINT(R,G,B,((bwa == true) ? A : 255)); } int **ToolFilter::allocMatrix(int mxw, int mxh, int set) { int **matrix = (int **)malloc(mxw * sizeof(int *)); for( int i = 0; i < mxw; i++ ) matrix[i] = (int *)malloc(mxh * sizeof(int)); for( int i = 0; i < mxw; i++ ) for( int j = 0; j < mxh; j++ ) matrix[i][j] = set; int i = (int)floor(mxw / 2.0); int j = (int)floor(mxh / 2.0); matrix[i][j] = 1; return matrix; } ToolFilter::Matrix ToolFilter::allocMatrixGeneric() { int size = 3; int **matrix = ToolFilter::allocMatrix(size,size); for( int x = 0; x < size; x++ ) for( int y = 0; y < size; y++ ) matrix[x][y] = 0; matrix[1][1] = 1; ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixBlur(int value) { int size = 2 * value + 1; int factor = max(2 * value - 1 - value, 1); int **matrix = ToolFilter::allocMatrix(size,size); for( int x = 0; x < size; x++ ) for( int y = 0; y < size; y++ ) matrix[x][y] = factor; ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixBlurGauss(int value) { value = min(value,GAUSSMAX); int size = 2 * value + 1; int factor = max(2 * value - 1 - value, 1); int **matrix = ToolFilter::allocMatrix(size,size); matrix[0][0] = 0; if( value > 0 ){ for( int x = 1; x <= value; x++ ) matrix[x][0] = max(2 * matrix[x - 1][0] , 2); for( int x = value + 1; x < size; x++ ) matrix[x][0] = (int)floor(matrix[x - 1][0] / 2.0); for( int x = 0; x < size; x++ ){ for( int y = 1; y <= value; y++ ) matrix[x][y] = max(2 * matrix[x][y - 1], 2); for( int y = value + 1; y < size; y++ ) matrix[x][y] = (int)floor(matrix[x][y - 1] / 2.0); } } ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixSharpen(int value) { int size = 2 * value + 1; int maxval = 2 * SHARPENMAX + 1; int **matrix = ToolFilter::allocMatrix(3,3,-1); matrix[1][1] = max(maxval - size,10); ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = 3;//size; fmx.mxh = 3;//size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixEdgetrace(int value, int mode) { if( value == 0 ) return ToolFilter::allocMatrixGeneric(); int size = 2 * value + 1; int **matrix = ToolFilter::allocMatrix(size,size); switch(mode){ case 1: for( int x = size - 1; x > value; x-- ) matrix[x][value] = -value; break; case 2: for( int y = 0; y < value; y++ ) matrix[value][y] = -value; break; default: for( int x = 0; x < value; x++ ) matrix[x][value] = -value; break; } ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixEmboss(int value, int mode) { int size = 2 * value + 1; int **matrix = ToolFilter::allocMatrix(size,size); switch(mode){ case ID_EMBOSS_EAST: for( int y = 0; y < size; y++ ) for( int x = y; x < size - y; x++ ) matrix[x][y] = -1; for( int y = size - 1; y >= 0; y-- ) for( int x = size - y - 1; x < y + 1; x++ ) matrix[x][y] = 1; break; case ID_EMBOSS_SOUTH: for( int x = 0; x < size; x++ ) for( int y = x; y < size - x; y++ ) matrix[x][y] = -1; for( int x = size - 1; x >= 0; x-- ) for( int y = size - x - 1; y < x + 1; y++ ) matrix[x][y] = 1; break; } ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixHighlight(int value) { int size = 2 * value + 1; int **matrix = ToolFilter::allocMatrix(size,size); matrix[0][0] = -1; matrix[size - 1][size - 1] = 3; matrix[value][value] = 0; ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixDefocus(int value) { int size = 2 * value + 1; int **matrix = ToolFilter::allocMatrix(size,size,1); matrix[value][value] = -size; ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 0; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocMatrixOldstone(int value) { int size = 2 * value + 1; int **matrix = ToolFilter::allocMatrix(size,size); for( int x = 0; x < size; x++ ) for( int y = 0; y < size - x - 2; y++ ) matrix[x][y] = -1; for( int x = 0; x < size; x++ ) for( int y = size - x + 1; y < size; y++ ) matrix[x][y] = 1; matrix[value][value] = 0; ToolFilter::Matrix fmx; fmx.matrix = matrix; fmx.mxw = size; fmx.mxh = size; fmx.bias = 90; fmx.division = 1; return fmx; } ToolFilter::Matrix ToolFilter::allocateMatrix(int filterId, int value) { if( value == 0 ) return ToolFilter::allocMatrixGeneric(); switch(filterId){ case ID_FILTER_BLUR: return ToolFilter::allocMatrixBlur(value); case ID_FILTER_GAUSSIANBLUR: return ToolFilter::allocMatrixBlurGauss(value); case ID_FILTER_SHARPEN: return ToolFilter::allocMatrixSharpen(value); case ID_FILTER_EDGETRACE: return ToolFilter::allocMatrixEdgetrace(value); case ID_EMBOSS_EAST: case ID_EMBOSS_SOUTH: case ID_EMBOSS_SOUTHEAST: return ToolFilter::allocMatrixEmboss(value,filterId); case ID_FILTER_HIGHLIGHT: return ToolFilter::allocMatrixHighlight(value); case ID_FILTER_DEFOCUS: return ToolFilter::allocMatrixDefocus(value); case ID_FILTER_OLDSTONE: return ToolFilter::allocMatrixOldstone(value); } return ToolFilter::allocMatrixGeneric(); } WCHAR *ToolFilter::getFilterName(int filterId) { switch(filterId) { case ID_FILTER_BLUR: return FIL_BLUR; case ID_FILTER_GAUSSIANBLUR: return FIL_BLURGAUSS; case ID_FILTER_SHARPEN: return FIL_SHARPEN; case ID_FILTER_EDGETRACE: return FIL_EDGETRACE; case ID_EMBOSS_EAST: return FIL_EMBOSS_E; case ID_EMBOSS_SOUTH: return FIL_EMBOSS_S; case ID_EMBOSS_SOUTHEAST: return FIL_EMBOSS_SE; case ID_FILTER_HIGHLIGHT: return FIL_HIGHLIGHT; case ID_FILTER_DEFOCUS: return FIL_DEFOCUS; case ID_FILTER_OLDSTONE: return FIL_OLDSTONE; case ID_FILTER_CUSTOM: return FIL_CUSTOM; } return FIL_GENERIC; }
[ [ [ 1, 754 ] ] ]
4085bbdc8774ec8d8ddd34d6313aa79a3fb2c9d8
94d9e8ec108a2f79068da09cb6ac903c16b77730
/sociarium/thread.h
2da4e37855383787ce036027964bf0360382701b
[]
no_license
kiyoya/sociarium
d375c0e5abcce11ae4b087930677483d74864d09
b26c2c9cbd23c2f8ef219d0059e42370294865d1
refs/heads/master
2021-01-25T07:28:25.862346
2009-10-22T05:57:42
2009-10-22T05:57:42
318,115
1
0
null
null
null
null
UTF-8
C++
false
false
3,721
h
// s.o.c.i.a.r.i.u.m: thread.h // HASHIMOTO, Yasuhiro (E-mail: hy @ sys.t.u-tokyo.ac.jp) /* Copyright (c) 2005-2009, HASHIMOTO, Yasuhiro, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - Neither the name of the University of Tokyo nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef INCLUDE_GUARD_SOCIARIUM_PROJECT_THREAD_H #define INCLUDE_GUARD_SOCIARIUM_PROJECT_THREAD_H #include <memory> #include <deque> #include <string> #include <boost/thread.hpp> namespace hashimoto_ut { class Thread; namespace sociarium_project_thread { enum { //////////////////////////////////////////////////////////////////////////////// // List of threads invoked by the application. GRAPH_CREATION = 0, GRAPH_RETOUCH, LAYOUT, COMMUNITY_DETECTION, NODE_SIZE_UPDATE, EDGE_WIDTH_UPDATE, FORCE_DIRECTION, NUMBER_OF_THREAD_CATEGORIES }; //////////////////////////////////////////////////////////////////////////////// // This should be called when the world is created. void initialize(void); //////////////////////////////////////////////////////////////////////////////// // This should be called when the world is destructed. void finalize(void); //////////////////////////////////////////////////////////////////////////////// void invoke(int thread_id, std::tr1::shared_ptr<Thread> th); //////////////////////////////////////////////////////////////////////////////// void join(int thread_id); //////////////////////////////////////////////////////////////////////////////// bool joinable(int thread_id); //////////////////////////////////////////////////////////////////////////////// void detach(int thread_id); //////////////////////////////////////////////////////////////////////////////// std::tr1::shared_ptr<Thread> get_thread_function(int thread_id); //////////////////////////////////////////////////////////////////////////////// // Return the message list that informs the progress of thread calculation. std::deque<std::wstring>& get_status(int thread_id); } } // The end of the namespace "hashimoto_ut" #endif // INCLUDE_GUARD_SOCIARIUM_PROJECT_THREAD_H
[ [ [ 1, 89 ] ] ]
f196d24b5137c100e91a7d7cb1356327f2d2ca4a
fac8de123987842827a68da1b580f1361926ab67
/inc/physics/Physics/ConstraintSolver/Solve/hkpSolve.h
477e8e63c2381617a982d6078b4fd58ce8a5ce9a
[]
no_license
blockspacer/transporter-game
23496e1651b3c19f6727712a5652f8e49c45c076
083ae2ee48fcab2c7d8a68670a71be4d09954428
refs/heads/master
2021-05-31T04:06:07.101459
2009-02-19T20:59:59
2009-02-19T20:59:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,958
h
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent.This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2008 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement. * */ #ifndef HK_CONSTRAINTSOLVER2_SOLVE_H #define HK_CONSTRAINTSOLVER2_SOLVE_H #include <Common/Base/hkBase.h> #include <Physics/ConstraintSolver/Solve/hkpSolverInfo.h> //#define HK_COMPRESS_SCHEMAS #if defined HK_COMPRESS_SCHEMAS # define HK_COMPRESS_SCHEMAS_FLOAT16 #endif class hkpJacobianSchema; class hkpVelocityAccumulator; class hkSpuDmaAccessor; class hkSpuDmaReader; class hkpConstraintInstance; class hkpSolverResults; struct hkpSolverElemTemp { HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_CONSTRAINT_SOLVER, hkpSolverElemTemp ); union { hkReal m_impulseApplied; hkReal m_usedImpulseFactor; hkReal m_deltaRhs; }; }; struct hkpImpulseLimitBreachedElem { HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_CONSTRAINT_SOLVER, hkpImpulseLimitBreachedElem ); HK_ALIGN16(hkUint32 m_type); // set to 0 hkpConstraintInstance* m_constraintInstance; // this is the value set in hkpConstraintQueryIn.m_constraintInstance hkpSolverResults* m_solverResult; // a pointer to the solver results }; // this class is followed by an array of hkpImpulseLimitBreachedElem struct hkpImpulseLimitBreachedHeader { HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_CONSTRAINT_SOLVER, hkpImpulseLimitBreachedHeader ); HK_ALIGN16( int m_numBreached ); // for multi threading this points to the next array hkpImpulseLimitBreachedHeader* m_next; inline hkpImpulseLimitBreachedElem& getElem(int index){ return *(hkpImpulseLimitBreachedElem*)hkAddByteOffset(this,index*sizeof(hkpImpulseLimitBreachedElem) + sizeof(hkpImpulseLimitBreachedHeader) ); } }; class hkpConstraintInstance; extern "C" { // info pretty much read only, but cannot be shared between threads hkBool32 HK_CALL hkSolveConstraints( const hkpSolverInfo& info, hkpJacobianSchema *schemas, hkpVelocityAccumulator * accumulators, hkpSolverElemTemp* temp ); void HK_CALL hkSolveApplyGravityByTheSteps( const hkpSolverInfo& info, hkpVelocityAccumulator* accumulators, hkpVelocityAccumulator* accumulatorsEnd ); #if ! defined (HK_PLATFORM_HAS_SPU) hkBool32 HK_CALL hkSolveConstraintsByTheSteps( const hkpSolverInfo& info, int currentSolverStep, int currentSolverMicroStep, const hkpJacobianSchema *schemas, hkpVelocityAccumulator * accumulators, hkpSolverElemTemp* temp ); #else hkBool32 HK_CALL hkSolveConstraintsByTheSteps( const hkpSolverInfo& info, int currentSolverStep, int currentSolverMicroStep, const hkpJacobianSchema *schemas, hkpVelocityAccumulator * accumulators, hkpSolverElemTemp* temp, hkUint16* accumulatorInterIndicesArray, hkSpuDmaReader* schemaReader, hkSpuDmaAccessor* elemTempAccessor ); #endif int HK_CALL hkSolveIntegrateVelocitiesByTheSteps( const hkpSolverInfo& info, int currentSolverStep, hkpVelocityAccumulator* accumulators, hkpVelocityAccumulator* accumulatorsEnd, hkBool& outSolveFinished ); void HK_CALL hkSolveUpload(); void HK_CALL hkSolveStepJacobians ( const hkpSolverInfo& i, const hkpJacobianSchema *schemas, hkpVelocityAccumulator* accumulators, hkpSolverElemTemp* tmp ); // this function exports the result from the solver into the solver results. // it also exports the impulse breached constraints within the schemas memory; #if ! defined (HK_PLATFORM_HAS_SPU) void HK_CALL hkExportImpulsesAndRhs( const hkpSolverInfo& i, const hkpSolverElemTemp* temp, const hkpJacobianSchema *schemas, const hkpVelocityAccumulator* accums ); #elif defined (HK_PLATFORM_SPU) void HK_CALL hkExportImpulsesAndRhs( const hkpSolverInfo& i, const hkpSolverElemTemp* temp, const hkpJacobianSchema *schemas, const hkpJacobianSchema *schemasPpu, const hkpVelocityAccumulator* accums, hkSpuDmaReader* schemaReader , hkSpuDmaReader* elemTempReader, hkPadSpu<int>& numImpulseLimitsBreachedOut ); #else void HK_CALL hkExportImpulsesAndRhs( const hkpSolverInfo& i, const hkpSolverElemTemp* temp, const hkpJacobianSchema *schemas, const hkpVelocityAccumulator* accums, hkUint16* accumulatorInterIndicesArray ); #endif /// Get the violating velocities for some constraints. /// Contact constraint - returns min( 0.0f, seperatingVelocity ). /// Bilateral constraint - returns the violating velocity. /// All the rest return 0.0f. /// /// Continues until: /// - the constraint is finished by finding the end mark or a new header schema. /// - we reach the friction part a contact constraint. /// - we reach maxNumVelocities. /// /// Returns the number of velocities calculated. int HK_CALL hkSolveGetToiViolatingConstraintVelocity( hkpSolverInfo& i, const hkpJacobianSchema *schemas, const hkpVelocityAccumulator* accums, int maxNumVelocities, hkReal* velocitiesOut ); } #if defined HK_COMPRESS_SCHEMAS #define HK_SIZE_OF_JACOBIAN_END_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_HEADER_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_GOTO_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_SHIFT_SOLVER_RESULTS_SCHEMA 16 #if defined HK_COMPRESS_SCHEMAS_FLOAT16 # define HK_SIZE_OF_JACOBIAN_1D_BILATERAL_SCHEMA 32 # define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_SINGLE_CONTACT_SCHEMA 32 #define HK_SIZE_OF_JACOBIAN_PAIR_CONTACT_SCHEMA 80 // and can get rid of one more - 64 #else # define HK_SIZE_OF_JACOBIAN_1D_BILATERAL_SCHEMA 48 # define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_SCHEMA 32 # define HK_SIZE_OF_JACOBIAN_SINGLE_CONTACT_SCHEMA 48 # define HK_SIZE_OF_JACOBIAN_PAIR_CONTACT_SCHEMA 96 //112 #endif #define HK_SIZE_OF_JACOBIAN_1D_BILATERAL_USER_TAU_SCHEMA 48 //-16 #define HK_SIZE_OF_JACOBIAN_1D_LINEAR_LIMIT_SCHEMA 48 //-16 #define HK_SIZE_OF_JACOBIAN_1D_FRICTION_SCHEMA 48 // -16 #define HK_SIZE_OF_JACOBIAN_1D_LINEAR_MOTOR_SCHEMA 80 #define HK_SIZE_OF_JACOBIAN_1D_PULLEY_SCHEMA 64 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_LIMITS_SCHEMA 48 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_FRICTION_SCHEMA 48 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_MOTOR_SCHEMA 64 #if HK_POINTER_SIZE == 4 #define HK_SIZE_OF_JACOBIAN_2D_FRICTION_SCHEMA 112 #else #define HK_SIZE_OF_JACOBIAN_2D_FRICTION_SCHEMA 128 #endif #define HK_SIZE_OF_JACOBIAN_3D_FRICTION_SCHEMA 160 #define HK_SIZE_OF_JACOBIAN_SET_MASS_SCHEMA 32 #define HK_SIZE_OF_JACOBIAN_ADD_VELOCITY_SCHEMA 32 #else // #define HK_SIZE_OF_JACOBIAN_END_SCHEMA 16 #if HK_POINTER_SIZE == 4 #define HK_SIZE_OF_JACOBIAN_HEADER_SCHEMA 16 #else # define HK_SIZE_OF_JACOBIAN_HEADER_SCHEMA 32 #endif # define HK_SIZE_OF_JACOBIAN_GOTO_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_SHIFT_SOLVER_RESULTS_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_1D_BILATERAL_SCHEMA 48 #define HK_SIZE_OF_JACOBIAN_1D_BILATERAL_USER_TAU_SCHEMA 64 #define HK_SIZE_OF_JACOBIAN_1D_LINEAR_LIMIT_SCHEMA 64 #define HK_SIZE_OF_JACOBIAN_1D_FRICTION_SCHEMA 64 #define HK_SIZE_OF_JACOBIAN_1D_LINEAR_MOTOR_SCHEMA 80 #define HK_SIZE_OF_JACOBIAN_1D_PULLEY_SCHEMA 64 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_SCHEMA 32 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_LIMITS_SCHEMA 48 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_FRICTION_SCHEMA 48 #define HK_SIZE_OF_JACOBIAN_1D_ANGULAR_MOTOR_SCHEMA 64 #define HK_SIZE_OF_JACOBIAN_SINGLE_CONTACT_SCHEMA 48 #define HK_SIZE_OF_JACOBIAN_PAIR_CONTACT_SCHEMA 112 #define HK_SIZE_OF_JACOBIAN_2D_FRICTION_SCHEMA 112 #if HK_POINTER_SIZE == 4 #define HK_SIZE_OF_JACOBIAN_3D_FRICTION_SCHEMA 144 #else #define HK_SIZE_OF_JACOBIAN_3D_FRICTION_SCHEMA 160 #endif #define HK_SIZE_OF_JACOBIAN_SET_MASS_SCHEMA 32 #define HK_SIZE_OF_JACOBIAN_ADD_VELOCITY_SCHEMA 32 #endif #define HK_SIZE_OF_JACOBIAN_STIFF_SPRING_CHAIN_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_BALL_SOCKET_CHAIN_SCHEMA 16 #define HK_SIZE_OF_JACOBIAN_POWERED_CHAIN_SCHEMA 32 #endif // HK_CONSTRAINTSOLVER2_SOLVE_H /* * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20080529) * * Confidential Information of Havok. (C) Copyright 1999-2008 * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok * Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership * rights, and intellectual property rights in the Havok software remain in * Havok and/or its suppliers. * * Use of this software for evaluation purposes is subject to and indicates * acceptance of the End User licence Agreement for this product. A copy of * the license is included with this software and is also available at * www.havok.com/tryhavok * */
[ "uraymeiviar@bb790a93-564d-0410-8b31-212e73dc95e4" ]
[ [ [ 1, 208 ] ] ]
62b1ed863b669b663178018ad0a1e7717272237b
c0bd82eb640d8594f2d2b76262566288676b8395
/src/game/MovementHandler.cpp
478bad7117c36609c14f2b7355aee376c3ac8a29
[ "FSFUL" ]
permissive
vata/solution
4c6551b9253d8f23ad5e72f4a96fc80e55e583c9
774fca057d12a906128f9231831ae2e10a947da6
refs/heads/master
2021-01-10T02:08:50.032837
2007-11-13T22:01:17
2007-11-13T22:01:17
45,352,930
0
1
null
null
null
null
UTF-8
C++
false
false
25,473
cpp
// Copyright (C) 2004 WoW Daemon // // 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. // // 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, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "StdAfx.h" #define SWIMMING_TOLERANCE_LEVEL -0.08f class MovementInfo { uint32 unk8, unk9, unk10, unk11, unk12; uint32 unklast; public: uint32 time; float unk6; float x, y, z, orientation; uint32 flags; uint32 FallTime; uint64 transGuid; float transX, transY, transZ, transO, transUnk; MovementInfo(WorldPacket &data) { transGuid = 0; data >> flags >> time; data >> x >> y >> z >> orientation; if (flags & 0x200) // Transport { data >> transGuid >> transX >> transY >> transZ >> transO >> transUnk; } if (flags & 0x200000) // Swimming { data >> unk6; } if (flags & 0x2000) // Falling { data >> FallTime >> unk8 >> unk9 >> unk10; } if (flags & 0x4000000) { data >> unk12; } data >> unklast; if(data.rpos() != data.wpos()) { sLog.outDebug("Extra bits of movement packet left"); } } MovementInfo &operator >>(WorldPacket &data) { data << flags << getMSTime(); data << x << y << z << orientation; if (flags & 0x200) // Transport { data << transGuid << transX << transY << transZ << transO << transUnk; } if (flags & 0x200000) // Swimming { data << unk6; } if (flags & 0x2000) // Falling { data << FallTime << unk8 << unk9 << unk10; } if (flags & 0x4000000) { data << unk12; } data << unklast; return *this; } }; void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & recv_data ) { MapInfo *pMapinfo; WorldPacket data; if(_player->IsInWorld()) { // get outta here return; } sLog.outDebug( "WORLD: got MSG_MOVE_WORLDPORT_ACK." ); pMapinfo = sWorld.GetMapInformation(GetPlayer()->GetMapId()); GetPlayer()->SendInitialLogonPackets(); GetPlayer()->clearAttackers(true); //only rezz if player is porting to a instance portal if(GetPlayer()->isDead()) { if(pMapinfo) { if(pMapinfo->type != INSTANCE_NULL) GetPlayer()->ResurrectPlayer(); } } GetPlayer()->AddToWorld(); GetPlayer()->SetPlayerStatus(NONE); if(GetPlayer()->isDead()) { if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAG_DEATH_WORLD_ENABLE)) { SpellCastTargets tgt; tgt.m_unitTarget=GetPlayer()->GetGUID(); if(GetPlayer()->getRace()==RACE_NIGHTELF) { SpellEntry *inf=sSpellStore.LookupEntry(20584); Spell*sp=new Spell(GetPlayer(),inf,true,NULL); sp->prepare(&tgt); inf=sSpellStore.LookupEntry(9036); sp=new Spell(GetPlayer(),inf,true,NULL); sp->prepare(&tgt); } else { SpellEntry *inf=sSpellStore.LookupEntry(8326); Spell*sp=new Spell(GetPlayer(),inf,true,NULL); sp->prepare(&tgt); } } } if(pMapinfo) { if(pMapinfo->HasFlag(WMI_INSTANCE_WELCOME)) { std::string welcome_msg; welcome_msg = "Welcome to "; welcome_msg += pMapinfo->name; welcome_msg += "."; sChatHandler.SystemMessage(this, welcome_msg.c_str()); } if(pMapinfo->type == INSTANCE_NONRAID) { data.Initialize(SMSG_INSTANCE_RESET_ACTIVATE); data << uint32(0x00); _player->GetSession()->SendPacket(&data); sInstanceSavingManager.SavePlayerToInstance(_player, pMapinfo->mapid); } if(pMapinfo->type == INSTANCE_NULL) { data.Initialize(SMSG_INSTANCE_RESET_ACTIVATE); data << uint32(0x01); _player->GetSession()->SendPacket(&data); } } _player->ResetHeartbeatCoords(); } void WorldSession::HandleMoveTeleportAckOpcode( WorldPacket & recv_data ) { sLog.outDebug( "WORLD: got MSG_MOVE_TELEPORT_ACK." ); GetPlayer()->SetPlayerStatus(NONE); GetPlayer()->clearAttackers(true); GetPlayer()->SetMovement(MOVE_UNROOT,5); _player->ResetHeartbeatCoords(); if(GetPlayer()->GetSummon() != NULL) // move pet too GetPlayer()->GetSummon()->SetPosition((GetPlayer()->GetPositionX() + 2), (GetPlayer()->GetPositionY() + 2), GetPlayer()->GetPositionZ(), M_PI); } void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data ) { if(_player == 0) return; if(GetPlayer()->GetPlayerStatus() == TRANSFER_PENDING) //dont update coords return; if(!_player->IsInWorld()) return; // spell cancel on movement, for now only fishing is added Object * t_go = GetPlayer()->m_SummonedObject; if (t_go) if (t_go->GetEntry() == GO_FISHING_BOBBER) ((GameObject*)t_go)->EndFishing(GetPlayer(),true); MovementInfo mi(recv_data); GetPlayer()->m_isMoving = true; // check for bad coords if( !((mi.y >= _minY) && (mi.y <= _maxY)) || !((mi.x >= _minX) && (mi.x <= _maxX)) ) { sLog.outError("%s might be cheating, bad coords specified in movement packet.", _player->GetName()); return; } if(GetPlayer()->cannibalize) { sEventMgr.RemoveEvents(GetPlayer(), EVENT_CANNIBALIZE); GetPlayer()->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); GetPlayer()->cannibalize = false; } //Send packet to other players WorldPacket data(90); // wont be bigger than 90 bytes data.SetOpcode( recv_data.GetOpcode() ); data << m_MoverWoWGuid; mi >> data; GetPlayer()->SendMessageToSet(&data, false); //Setup Transporter Positioning if(mi.transGuid != 0 && !_player->m_lockTransportVariables) { if(!_player->m_TransporterGUID) { GetPlayer()->m_TransporterGUID = mi.transGuid; _player->m_CurrentTransporter = sObjHolder.GetObject<Transporter>(mi.transGuid); if(_player->m_CurrentTransporter) { _player->m_CurrentTransporter->AddPlayer(_player); } } GetPlayer()->m_TransporterX = mi.transX; GetPlayer()->m_TransporterY = mi.transY; GetPlayer()->m_TransporterZ = mi.transZ; GetPlayer()->m_TransporterO = mi.transO; GetPlayer()->m_TransporterUnk = mi.transUnk; float x = mi.x - mi.transX; float y = mi.y - mi.transY; float z = mi.z - mi.transZ; /*Transporter* trans = _player->m_CurrentTransporter; if(trans) sChatHandler.SystemMessageToPlr(_player, "Client t pos: %f %f\nServer t pos: %f %f Diff: %f %f", x,y, trans->GetPositionX(), trans->GetPositionY(), trans->CalcDistance(x,y,z), trans->CalcDistance(mi.x, mi.y, mi.z));*/ } else { if(_player->m_TransporterGUID && !_player->m_lockTransportVariables) { // remove us from the porter GetPlayer()->m_TransporterGUID = 0; GetPlayer()->m_TransporterX = 0.0f; GetPlayer()->m_TransporterY = 0.0f; GetPlayer()->m_TransporterZ = 0.0f; GetPlayer()->m_TransporterO = 0.0f; if(_player->m_CurrentTransporter) _player->m_CurrentTransporter->RemovePlayer(_player); GetPlayer()->m_CurrentTransporter = NULL; } } _HandleBreathing(recv_data, mi); _player->RemoveAurasByInterruptFlag(AURA_INTERRUPT_ON_MOVEMENT); if( _player->m_CurrentCharm ) { _player->m_CurrentCharm->SetPosition(mi.x, mi.y, mi.z, mi.orientation); } else { if(!_player->m_CurrentTransporter) { if( !_player->SetPosition(mi.x, mi.y, mi.z, mi.orientation) ) { WorldPacket * movedata = GetPlayer( )->BuildTeleportAckMsg(LocationVector(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY(), GetPlayer()->GetPositionZ(), GetPlayer()->GetOrientation()) ); SendPacket(movedata); delete movedata; } } else { _player->SetPosition(_player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), mi.orientation + mi.transO, false); } } //Falling Handler if (mi.flags & 0x2000) // Falling { if( GetPlayer()->m_fallTime < mi.FallTime) GetPlayer()->m_fallTime = mi.FallTime; _player->ResetHeartbeatCoords(); } else //once we done falling lets do some damage { if(GetPlayer()->m_fallTime > 1000 && GetPlayer()->isAlive() && !_player->GodModeCheat) { //Check if we aren't falling in water if(!_player->bSafeFall) { if( !(mi.flags & 0x200000) && !_player->blinked) { uint8 type; uint32 damage; type = DAMAGE_FALL; //10% dmg per sec after first 3 seconds //it rL a*t*t double coeff=0.0000001*_player->m_fallTime*_player->m_fallTime; damage = (uint32)(_player->GetUInt32Value(UNIT_FIELD_MAXHEALTH)*coeff); // if(damage > GetPlayer()->GetUInt32Value(UNIT_FIELD_MAXHEALTH)) { damage = GetPlayer()->GetUInt32Value(UNIT_FIELD_MAXHEALTH); } WorldPacket data(13); data.SetOpcode(SMSG_ENVIRONMENTALDAMAGELOG); data << GetPlayer()->GetGUID(); data << type; data << damage; SendPacket(&data); _player->DealDamage(GetPlayer(), damage, 0, 0, 0); } GetPlayer()->m_fallTime = 0; _player->blinked = false; _player->ResetHeartbeatCoords(); } } else { //player is dead, no need to keep increasing falltime GetPlayer()->m_fallTime = 0; _player->ResetHeartbeatCoords(); _player->blinked = false; } } // speedhack protection if(sWorld.SpeedhackProtection && GetPermissionCount() == 0 && !_player->blinked && !(mi.flags & 0x2000)) _SpeedCheck(mi); } void WorldSession::HandleMoveStopOpcode( WorldPacket & recv_data ) { GetPlayer()->m_isMoving = false; HandleMovementOpcodes( recv_data ); } void WorldSession::HandleMoveTimeSkippedOpcode( WorldPacket & recv_data ) { //uint64 guid; //uint32 time_in_ms; //recv_data >> guid >> time_in_ms; } void WorldSession::HandleMoveNotActiveMoverOpcode( WorldPacket & recv_data ) { uint64 guid; recv_data >> guid; MovementInfo mi(recv_data); WorldPacket data; data.SetOpcode(MSG_MOVE_TELEPORT); // meh.. FastGUIDPack(data, guid); // faaast. mi >> data; _player->SendMessageToSet(&data, false); } void WorldSession::HandleSetActiveMoverOpcode( WorldPacket & recv_data ) { // set current movement object uint64 guid; recv_data >> guid; if(guid != m_MoverWoWGuid.GetOldGuid()) { // generate wowguid if(guid != 0) m_MoverWoWGuid.Init(guid); else m_MoverWoWGuid.Init(_player->GetGUID()); } } void WorldSession::HandleMoveSplineCompleteOpcode(WorldPacket &recvPacket) { } void WorldSession::HandleBasicMovementOpcodes( WorldPacket & recv_data ) { if(GetPlayer()->GetPlayerStatus() == TRANSFER_PENDING) //don't update coords return; if(!_player->IsInWorld()) return; MovementInfo mi(recv_data); // check for bad coords if( !((mi.y >= _minY) && (mi.y <= _maxY)) || !((mi.x >= _minX) && (mi.x <= _maxX)) ) { sLog.outError("%s might be cheating, bad coords specified in movement packet.", _player->GetName()); return; } GetPlayer()->m_isMoving = true; //Send packet to other players WorldPacket data(90); data.SetOpcode( recv_data.GetOpcode() ); data << m_MoverWoWGuid; mi >> data; GetPlayer()->SendMessageToSet(&data, false); //Setup Transporter Positioning if(mi.transGuid != 0 && !_player->m_lockTransportVariables) { if(!_player->m_TransporterGUID) { GetPlayer()->m_TransporterGUID = mi.transGuid; _player->m_CurrentTransporter = sObjHolder.GetObject<Transporter>(mi.transGuid); if(_player->m_CurrentTransporter) { _player->m_CurrentTransporter->AddPlayer(_player); } } GetPlayer()->m_TransporterX = mi.transX; GetPlayer()->m_TransporterY = mi.transY; GetPlayer()->m_TransporterZ = mi.transZ; GetPlayer()->m_TransporterO = mi.transO; GetPlayer()->m_TransporterUnk = mi.transUnk; float x = mi.x - mi.transX; float y = mi.y - mi.transY; float z = mi.z - mi.transZ; /*Transporter* trans = _player->m_CurrentTransporter; if(trans) sChatHandler.SystemMessageToPlr(_player, "Client t pos: %f %f\nServer t pos: %f %f Diff: %f %f", x,y, trans->GetPositionX(), trans->GetPositionY(), trans->CalcDistance(x,y,z), trans->CalcDistance(mi.x, mi.y, mi.z));*/ } else { if(_player->m_TransporterGUID && !_player->m_lockTransportVariables) { // remove us from the porter GetPlayer()->m_TransporterGUID = 0; GetPlayer()->m_TransporterX = 0.0f; GetPlayer()->m_TransporterY = 0.0f; GetPlayer()->m_TransporterZ = 0.0f; GetPlayer()->m_TransporterO = 0.0f; if(_player->m_CurrentTransporter) _player->m_CurrentTransporter->RemovePlayer(_player); GetPlayer()->m_CurrentTransporter = NULL; } } _HandleBreathing(recv_data, mi); if( _player->m_CurrentCharm ) { _player->m_CurrentCharm->SetPosition(mi.x, mi.y, mi.z, mi.orientation); } else { if( !_player->m_CurrentTransporter) { if(!GetPlayer( )->SetPosition(mi.x, mi.y, mi.z, mi.orientation) ) { WorldPacket * movedata = GetPlayer( )->BuildTeleportAckMsg(LocationVector(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY(), GetPlayer()->GetPositionZ(), GetPlayer()->GetOrientation()) ); SendPacket(movedata); delete movedata; } } else { _player->SetPosition(_player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), mi.orientation + mi.transO, false); } } // speedhack protection if(sWorld.SpeedhackProtection && GetPermissionCount() == 0 && !_player->blinked) _SpeedCheck(mi); } void WorldSession::_HandleBreathing(WorldPacket &recv_data, MovementInfo &mi) { if(!sWorld.BreathingEnabled || _player->FlyCheat || _player->m_bUnlimitedBreath || _player->GodModeCheat) return; uint8 wtype = _player->m_mapMgr->GetWaterType(mi.x, mi.y); float wlevel = _player->m_mapMgr->GetWaterHeight(mi.x, mi.y); if(mi.flags & 0x200000) { if(!(_player->m_UnderwaterState & UNDERWATERSTATE_SWIMMING)) _player->m_UnderwaterState |= UNDERWATERSTATE_SWIMMING; } else { if(_player->m_UnderwaterState & UNDERWATERSTATE_SWIMMING) _player->m_UnderwaterState &= ~UNDERWATERSTATE_SWIMMING; if(_player->m_UnderwaterState & UNDERWATERSTATE_UNDERWATER) _player->m_UnderwaterState &= ~UNDERWATERSTATE_UNDERWATER; return; } //printf("Water flags: %X\n", wtype); if((mi.z - 2) < wlevel) { // underwater, w000t! if(_player->m_MountSpellId) _player->RemoveAura(_player->m_MountSpellId); if(!(_player->m_UnderwaterState & UNDERWATERSTATE_UNDERWATER)) { // we only just entered the water _player->m_UnderwaterState |= UNDERWATERSTATE_UNDERWATER; // send packet WorldPacket data(SMSG_START_MIRROR_TIMER, 20); data << uint32(1) << _player->m_UnderwaterTime << _player->m_UnderwaterMaxTime << int32(-1) << uint32(0); SendPacket(&data); } } else { // we're not underwater if(_player->m_UnderwaterState & UNDERWATERSTATE_UNDERWATER && recv_data.GetOpcode() != MSG_MOVE_JUMP) { WorldPacket data(SMSG_START_MIRROR_TIMER, 20); data << uint32(1) << _player->m_UnderwaterTime << _player->m_UnderwaterMaxTime << uint32(10) << uint32(0); SendPacket(&data); _player->m_UnderwaterState &= ~UNDERWATERSTATE_UNDERWATER; } } //printf("Water flags: %02X\n", GetPlayer()->GetMapMgr()->GetLiquidType(GetPlayer()->GetPositionX(),GetPlayer()->GetPositionY())); /*if(mi.flags & 0x200000 && GetPlayer()->isAlive()) { uint8 wtype = GetPlayer()->GetMapMgr()->GetLiquidType(GetPlayer()->GetPositionX(),GetPlayer()->GetPositionY()); if((GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_SWIMMING) == 0) // set swimming. GetPlayer()->m_UnderwaterState |= UNDERWATERSTATE_SWIMMING; // Dismount if mounted if(_player->m_MountSpellId) _player->RemoveAura(_player->m_MountSpellId); if(!wtype) wtype = 0x01; if(wtype & 0x2) { if( !(GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_LAVA) ) GetPlayer()->m_UnderwaterState |= UNDERWATERSTATE_LAVA; } else if(mi.unk6 < SWIMMING_TOLERANCE_LEVEL && !(GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_UNDERWATER) && !_player->m_bUnlimitedBreath) // that's it, we're underwater. { GetPlayer()->m_UnderwaterState |= UNDERWATERSTATE_UNDERWATER; if( !(GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_RECOVERING) ) // fix for "unlimited" bug GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_RECOVERING; // send start packet WorldPacket data(20); data.SetOpcode(SMSG_START_MIRROR_TIMER); data << uint32(1) << uint32(60000-GetPlayer()->m_UnderwaterTime) << uint32(60000) << uint32(-1) << uint32(0); SendPacket(&data); } else if(mi.unk6 == 0) { if((GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_UNDERWATER) != 0) { GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_UNDERWATER; if(GetPlayer()->m_UnderwaterTime && !(GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_RECOVERING) ) { GetPlayer()->m_UnderwaterState |= UNDERWATERSTATE_RECOVERING; WorldPacket data(20); data.SetOpcode(SMSG_START_MIRROR_TIMER); data << uint32(1) << uint32(60000 - GetPlayer()->m_UnderwaterTime) << uint32(60000) << uint32(10) << uint32(0); SendPacket(&data); } } if( GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_TAKINGDAMAGE ) { GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_TAKINGDAMAGE; } } } else if(recv_data.GetOpcode() != MSG_MOVE_JUMP) { // otherwise cheaters :P if(_player->m_ShapeShifted == 1066) _player->RemoveAura(1066); // remove aquatic form shapeshift if( GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_SWIMMING ) { GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_SWIMMING; GetPlayer()->m_SwimmingTime = 0; } if( GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_UNDERWATER ) { GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_UNDERWATER; if(GetPlayer()->m_UnderwaterTime && !(GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_RECOVERING) ) { GetPlayer()->m_UnderwaterState |= UNDERWATERSTATE_RECOVERING; WorldPacket data(20); data.SetOpcode(SMSG_START_MIRROR_TIMER); data << uint32(1) << uint32(60000 - GetPlayer()->m_UnderwaterTime) << uint32(60000) << uint32(10) << uint32(0); SendPacket(&data); } } if( GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_TAKINGDAMAGE ) { GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_TAKINGDAMAGE; } if( GetPlayer()->m_UnderwaterState & UNDERWATERSTATE_LAVA ) GetPlayer()->m_UnderwaterState &= ~UNDERWATERSTATE_LAVA; }*/ } void WorldSession::_SpeedCheck(MovementInfo &mi) { // beat! // calculate distance between last heartbeat and this if(_player->_lastHeartbeatTime && _player->_lastHeartbeatX && _player->_lastHeartbeatY && _player->_lastHeartbeatZ) { uint32 new_time = getMSTime(); float distance_travelled = _player->CalcDistance(_player->_lastHeartbeatX, _player->_lastHeartbeatY, _player->_lastHeartbeatZ, mi.x, mi.y, mi.z); // get our time difference uint32 time_difference = new_time - _player->_lastHeartbeatTime; // do our check calculation uint32 move_time = (uint32)((float)distance_travelled / (float)(_player->m_runSpeed*0.001f)); // check if we're in the correct bounds if(move_time > time_difference) { int32 difference = move_time - time_difference; if(difference > 350) // say this for now { if(_player->m_speedhackChances) { sChatHandler.SystemMessage(this, "Speedhack detected. This has been logged for later processing by the server admins. If you are caught again, you will be kicked from the server. You will be unrooted in 5 seconds."); _player->SetMovement(MOVE_ROOT, 1); sEventMgr.AddEvent(_player, &Player::SetMovement, uint8(MOVE_UNROOT), uint32(1), EVENT_DELETE_TIMER, 5000, 1); _player->ResetHeartbeatCoords(); _player->m_speedhackChances--; // TODO: replace with server plugin system later on sCheatLog.writefromsession(this, "Speedhack warning, time diff of %u", time_difference); } else if(_player->m_speedhackChances == 0) { sChatHandler.SystemMessage(this, "You will now be removed from the server for speed hacking. Your account has been flagged for further investigation by the admins."); // TODO: replace with server plugin system later on sCheatLog.writefromsession(this, "Kicked for speedhack, time diff of %u", difference); _player->m_KickDelay = 0; sEventMgr.AddEvent(_player, &Player::_Kick, EVENT_PLAYER_KICK, 10000, 1); // Root movement :p heheheh evil _player->SetMovement(MOVE_ROOT, 1); } } //printf("Move shit: %ums\n", abs(difference)); //sChatHandler.SystemMessage(this, "Move time : %u / %u, diff: %u", move_time, time_difference, difference); } } _player->_lastHeartbeatTime = getMSTime(); _player->_lastHeartbeatX = mi.x; _player->_lastHeartbeatY = mi.y; _player->_lastHeartbeatZ = mi.z; } void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket &recvdata) { WorldPacket data(SMSG_MOUNTSPECIAL_ANIM,8); data << _player->GetGUID(); _player->SendMessageToSet(&data, true); }
[ [ [ 1, 705 ] ] ]
db46174d83bd0e3f8ad6be17fbe255ae0a3bc9e3
5f8a666c193db30a1b5fd2a58790093d574a64e0
/ogre-network-sender/NetworkSenderApp.cpp
a6eaaf3a4f39a44ad254f9c63a1e19501883b775
[ "WTFPL" ]
permissive
sevas/ogre-path-interpolation
af754a7ddd2e6fdfe3e1bb248e75759ececd90c4
828efa8c0e4878ab1ed9b6c410c14b1e337c6cef
refs/heads/master
2020-06-14T16:49:53.993095
2010-07-19T20:41:44
2010-07-19T20:41:44
785,210
2
0
null
null
null
null
UTF-8
C++
false
false
13,239
cpp
#include "precompiled.h" #include "NetworkSenderApp.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <boost/format.hpp> Vector3 getDerive(const Vector3 &_p, const Vector3 &_q, const Real &_dt, const Real &_T) { return (_p - _q) * (_T/(3*_dt)); } NetworkSenderApp::NetworkSenderApp() :mAnimState(NULL) ,mAnimState2(NULL) ,mUdpSocket(0) ,mIpAddress("") ,mConnected(1) ,mTimeSinceLastUpdate(0) ,mCurrentSpeed(Vector3::ZERO) ,mIsMoving(false) ,mHasMoved(false) ,mSamplingInterval(1.0) ,mTimeSinceLastSpeedSample(0.0) ,mLastTimeDelta(0.0) { mTitle = "Sender"; } //------------------------------------------------------------------------------ NetworkSenderApp::~NetworkSenderApp(void) { } //------------------------------------------------------------------------------ bool NetworkSenderApp::frameStarted(const FrameEvent& evt) { if (mAnimState) mAnimState->addTime(evt.timeSinceLastFrame); if (mAnimState2) mAnimState2->addTime(evt.timeSinceLastFrame); mTimeSinceLastUpdate += evt.timeSinceLastFrame; mTimeSinceLastSpeedSample += evt.timeSinceLastFrame; Vector3 currentPos = mBallNode->getPosition(); if (! mIsMoving) { if(currentPos != mLastBallPosition) { mHasMoved = true; mIsMoving = true; //mCurrentSpeed = getDerive(currentPos, mLastBallPosition, evt.timeSinceLastFrame); mCurrentSpeed = 0.33 * (currentPos - mLastBallPosition); mLastTimeDelta = evt.timeSinceLastFrame; mLastBallPosition = currentPos; } } else { if(mTimeSinceLastUpdate > mSamplingInterval) { mCurrentSpeed = getDerive(currentPos, mLastBallPosition ,evt.timeSinceLastFrame ,mSamplingInterval); mLastBallPosition = currentPos; _sendPosition(); mTimeSinceLastUpdate = 0; } //else if (mTimeSinceLastSpeedSample > mSamplingInterval/10) //{ // mCurrentSpeed = getDerive(currentPos, mLastBallPosition, mSamplingInterval/10); // mCurrentSpeed *= (mSamplingInterval) / 3; // mLastTimeDelta = evt.timeSinceLastFrame; // mLastBallPosition = currentPos; // mTimeSinceLastSpeedSample = 0.0; // //} } mLastBallPosition = currentPos; return true; } //------------------------------------------------------------------------------ bool NetworkSenderApp::frameEnded_(const FrameEvent& evt) { //if(mLastBallPosition == mBallNode->getPosition()) //{ // if(mIsMoving) // { // mIsMoving = false; // mCurrentSpeed = Vector3::ZERO; // } //} //else //{ // if(!mIsMoving) // { // // } //} //mTimeSinceLastUpdate += evt.timeSinceLastFrame; //_sendPosition(); return true; } //------------------------------------------------------------------------------ void NetworkSenderApp::createScene() { const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities(); if (!caps->hasCapability(RSC_VERTEX_PROGRAM) || !(caps->hasCapability(RSC_FRAGMENT_PROGRAM))) { OGRE_EXCEPT(Exception::ERR_NOT_IMPLEMENTED, "Your card does not support vertex and fragment programs, so cannot " "run this demo. Sorry!", "createScene"); } Viewport *vp = mWindow->getViewport(0); vp->setBackgroundColour(ColourValue(0.7, 0.7, 0.7)); mRoot->addFrameListener(this); mSceneMgr->setNormaliseNormalsOnScale(true); _createAxes(5); _createGrid(5); mCamera->setPosition(Vector3(100, 100, 100)); mCamera->lookAt(Vector3::ZERO); _createLight(); mBallNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("Ball Node"); Entity *ent = mSceneMgr->createEntity("my ball", "sphere.mesh"); //ent->setMaterialName("Objects/Ball"); ent->getSubEntity(0)->setMaterialName("Examples/CelShading"); ent->getSubEntity(0)->setCustomParameter(0, Vector4(10.0f, 0.0f, 0.0f, 0.0f)); ent->getSubEntity(0)->setCustomParameter(1, Vector4(0.0f, 0.5f, 0.0f, 1.0f)); ent->getSubEntity(0)->setCustomParameter(2, Vector4(0.3f, 0.5f, 0.3f, 1.0f)); float w = ent->getBoundingBox().getSize().x; float ws = 10.0 / w; mBallNode->attachObject(ent); mBallNode->setScale(ws, ws, ws); float totalTime = 8; float halfTime = totalTime/2; Animation *anim = mSceneMgr->createAnimation("bouncing ball", totalTime); anim->setDefaultInterpolationMode(Animation::IM_SPLINE); NodeAnimationTrack *track = anim->createNodeTrack(0, mBallNode); TransformKeyFrame *key = track->createNodeKeyFrame(0); // start key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(0, 0, 0)); // first half key = track->createNodeKeyFrame(halfTime * 1./4); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(50, 0, -25)); key = track->createNodeKeyFrame(halfTime * 2./4); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(100, 0, 0)); key = track->createNodeKeyFrame(halfTime * 3./4); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(50, 0, 25)); key = track->createNodeKeyFrame(halfTime); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(0, 0, 0)); // second half key = track->createNodeKeyFrame(halfTime + halfTime * 1./4); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(-50, 0, -25)); key = track->createNodeKeyFrame(halfTime + halfTime * 2./4); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(-100, 0, 0)); key = track->createNodeKeyFrame(halfTime + halfTime * 3./4); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(-50, 0, 25)); key = track->createNodeKeyFrame(totalTime); key->setScale(Vector3(ws, ws, ws)); key->setTranslate(Vector3(0, 0, 0)); mAnimState = mSceneMgr->createAnimationState("bouncing ball"); mAnimState->setEnabled(1); _readConfigurationFromFile(); _initNetwork(); // start of track mLastBallPosition = Vector3(0, 0, 0); } //------------------------------------------------------------------------------ void NetworkSenderApp::_createAxes(int _nUnits) { mGridNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("WorldGrid Node"); ManualObject *line = mSceneMgr->createManualObject("X Axis"); int scale = 100; line->begin("WorldGrid/XAxis", RenderOperation::OT_LINE_LIST); line->position(-_nUnits, 0.0, 0.0); line->normal(Vector3::UNIT_Y); line->colour(0.1, 0.0, 0.0); line->position( _nUnits, 0.0, 0.0); line->normal(Vector3::UNIT_Y); line->colour(1.0, 0.0, 0.0); line->end(); mGridNode->attachObject(line); line = mSceneMgr->createManualObject("Y Axis"); line->begin("WorldGrid/YAxis", RenderOperation::OT_LINE_LIST); line->position(0.0, -_nUnits, 0.0); line->normal(Vector3::UNIT_Y); line->colour(0.0, 0.1, 0.0); line->position(0.0, _nUnits, 0.0); line->normal(Vector3::UNIT_Y); line->colour(0.0, 1.0, 0.0); line->end(); mGridNode->attachObject(line); line = mSceneMgr->createManualObject("Z Axis"); line->begin("WorldGrid/ZAxis", RenderOperation::OT_LINE_LIST); line->position( 0.0, 0.0, -_nUnits); line->normal(Vector3::UNIT_Y); line->colour(0.0, 0.0, 0.1); line->position( 0.0, 0.0, _nUnits); line->normal(Vector3::UNIT_Y); line->colour(0.0, 0.0, 1.0); line->end(); mGridNode->attachObject(line); mGridNode->scale(scale, scale, scale); } //------------------------------------------------------------------------------ void NetworkSenderApp::_createGrid(int _nUnits) { float step = 0.1; int nUnits = _nUnits; ManualObject *grid = mSceneMgr->createManualObject("Grid Lines"); grid->begin("WorldGrid/Lines", RenderOperation::OT_LINE_LIST); grid->colour(0.5, 0.5, 0.5); for(int i=1 ; i <= int(nUnits * (1.0/step)) ; i++) { float offset=i*step; // horizontal (parallel to X axis) grid->position( -nUnits, 0.0, offset); grid->normal(Vector3::UNIT_Y); grid->position( nUnits, 0.0, offset); grid->normal(Vector3::UNIT_Y); grid->position( -nUnits, 0.0, -offset); grid->normal(Vector3::UNIT_Y); grid->position( nUnits, 0.0, -offset); grid->normal(Vector3::UNIT_Y); // vertical (parallel to Z axis) grid->position( offset, 0.0, -nUnits); grid->normal(Vector3::UNIT_Y); grid->position( offset, 0.0, nUnits); grid->normal(Vector3::UNIT_Y); grid->position( -offset, 0.0, -nUnits); grid->normal(Vector3::UNIT_Y); grid->position( -offset, 0.0, nUnits); grid->normal(Vector3::UNIT_Y); } grid->end(); mGridNode->attachObject(grid); } //------------------------------------------------------------------------------ void NetworkSenderApp::_createLight() { Light *light = mSceneMgr->createLight("Main Light"); light->setType(Light::LT_POINT); light->setPosition(Vector3(0, 100, 0)); light->setSpecularColour(ColourValue::White); light->setDiffuseColour(ColourValue::White); mLightNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("light node"); mLightNode->attachObject(light); Animation *anim = mSceneMgr->createAnimation("light track", 4); anim->setDefaultInterpolationMode(Animation::IM_SPLINE); NodeAnimationTrack *track = anim->createNodeTrack(0, mLightNode); TransformKeyFrame *key = track->createNodeKeyFrame(0); key->setTranslate(Vector3(100, 100, 0)); key = track->createNodeKeyFrame(1); key->setTranslate(Vector3(100, 100, 100)); key = track->createNodeKeyFrame(2); key->setTranslate(Vector3(-100, 100, 0)); key = track->createNodeKeyFrame(3); key->setTranslate(Vector3(-100, 100, -100)); key = track->createNodeKeyFrame(4); key->setTranslate(Vector3(100, 100, 0)); mAnimState2 = mSceneMgr->createAnimationState("light track"); mAnimState2->setEnabled(1); } //------------------------------------------------------------------------------ void NetworkSenderApp::_readConfigurationFromFile() { ConfigFile cf; cf.load("sender.cfg"); mIpAddress = cf.getSetting("Peer Address", "Network"); mUdpPort = cf.getSetting("UDP Port", "Network"); mSamplingInterval = StringConverter::parseReal(cf.getSetting("Sampling Interval", "Network")); } //------------------------------------------------------------------------------ void NetworkSenderApp::_initNetwork() { mNetworkLog = LogManager::getSingleton().createLog("network.log"); mUdpResolver = new udp::resolver(mIOService); mUdpQuery = new udp::resolver::query(udp::v4(), mIpAddress, mUdpPort); mUdpReceiverEndpoint = *(mUdpResolver->resolve(*mUdpQuery)); mUdpSocket = new udp::socket(mIOService); mUdpSocket->open(udp::v4()); mConnected = true; } //------------------------------------------------------------------------------ void NetworkSenderApp::_sendPosition() { if(mConnected) { Vector3 pos = mBallNode->getPosition(); Vector3 speed = mCurrentSpeed; boost::format fmt("[new pdu] position (%.2f %.2f %.2f) speed (%.3f %.3f %.3f) dt %.6f"); fmt % pos.x % pos.y % pos.z % speed.x % speed.y % speed.z % mLastTimeDelta; mNetworkLog->logMessage(fmt.str()); _sendPdu(pos, speed); } } //------------------------------------------------------------------------------ void NetworkSenderApp::_sendPdu(const Vector3 &_pos, const Vector3 &_speed) { char arr[6*sizeof(Real)]; memcpy(arr, _pos.ptr(), 3*sizeof(Real)); memcpy(arr+3*sizeof(Real), _speed.ptr(), 3*sizeof(Real)); mUdpSocket->send_to(boost::asio::buffer(arr, 6*sizeof(Real)) ,mUdpReceiverEndpoint ,0 ,mSocketError); if (mSocketError) { boost::format fmt("socket error : %d"); fmt % mSocketError; mNetworkLog->logMessage(fmt.str()); } } //------------------------------------------------------------------------------ void NetworkSenderApp::_sendFloat(float _val) { char arr[4]; memcpy(arr, &_val, sizeof(_val)); //int n = boost::asio::write(*mSocket // ,boost::asio::buffer(arr, sizeof(_val)) // ,boost::asio::transfer_all() // ,mSocketError); mUdpSocket->send_to(boost::asio::buffer(arr, sizeof(_val)) ,mUdpReceiverEndpoint ,0 ,mSocketError); if (mSocketError) { boost::format fmt("socket error : %d"); fmt % mSocketError; mNetworkLog->logMessage(fmt.str()); } } //------------------------------------------------------------------------------ void NetworkSenderApp::_sleep(int _ms) { // sleep 20ms boost::xtime sleeptime; boost::xtime_get(&sleeptime, boost::TIME_UTC); sleeptime.nsec += 1000000 * _ms; boost::thread::sleep(sleeptime); } //------------------------------------------------------------------------------
[ "none@none" ]
[ [ [ 1, 427 ] ] ]
9022c823f31bfc346ce946804001be96b39133bd
336ec5b80085d8bdd65d5ad2384507e6db6536bd
/libraries/btrace_parser/inc/btrace_parser.h
1bb7d434889772bab484be0d528ce4a141516e43
[]
no_license
springxu0800/oss.FCL.sf.os.fshell
1c2051076cfd284553a0845cc86e617c1badc188
30d5fcf516eed5ae7a5379a6a469c75f93a1345b
refs/heads/master
2021-06-04T18:53:26.010490
2010-12-07T17:29:09
2010-12-07T17:29:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
38,601
h
// btrace_parser.h // // Copyright (c) 2008 - 2010 Accenture. All rights reserved. // This component and the accompanying materials are made available // under the terms of the "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/epl-v10.html". // // Initial Contributors: // Accenture - Initial contribution // Backwards Compatibility: // The interfaces defined in this file should be considered INTERNAL to the // fshell project as they may be subject to change. Expect to have to absorb // downstream compatibility breaks if you use these interfaces from outside // of the fshell project. #ifndef __BTRACE_PARSER_H__ #define __BTRACE_PARSER_H__ #include <e32base.h> #include <fshell/btrace_parser_defs.h> #include <fshell/extrabtrace.h> #include FSHELL_D32BTRACE_HEADER #include <f32file.h> #include <e32property.h> #include <fshell/common.mmh> #ifdef FSHELL_ATRACE_SUPPORT #include <fshell/atrace/atraceconfig.h> #endif class TBtraceHeader; struct TKeyEvent; struct TPointerEvent; class CMultipartFragment; class CFlusher; enum TBtraceParserPanic { EBtpPanicUndefinedCallBack = 0, EBtpPanicIncompatiblePubSubArgs = 1, EBtpPanicThreadIdNotFound = 2, EBtpPanicProcessNameNotFound = 3, EBtpPanicBtraceThreadIdOverflow = 4, EBtpPanicThreadNotFoundForId = 5, EBtpPanicFailedToInsertCpuUsageObject = 6, EBtpPanicBtraceProcessIdOverflow = 7, EBtpPanicUnused1 = 8, EBtpPanicUnused2 = 9, EBtpPanicNegativeTickInterval = 10, EBtpPanicUnused3 = 11, EBtpPanicInvalidReaderMode = 12, EBtpPanicUnexpectedReaderRun = 13, EBtpPanicUnknownCpuContext = 14, EBtpPanicFlusherObserverAlreadySet = 15, EBtpPanicReaderNotReplaying = 16, EBtpPanicNoReplayData = 17, EBtpPanicFailedToFindProcess = 18, EBtpPanicNegativeRefCount = 19, EBtpPanicNestedSynchronizeCalls = 20, EBtpPanicFrameObserverAlreadyExists = 21, EBtpPanicTriedToDisableReplayWhenBtraceNotRunning = 22, EBtpPanicAddObserverCalledWhileIterating = 23, EBtpPanicRemoveObserverCalledWhileIterating = 24, EBtpPanicTooManyDomainEventDataItems = 25, EBtpPanicBtraceWindowGroupIdOverflow = 26, EBtpPanicWindowGroupIdNotFound = 27, EBtpPanicWservWindowGroupIdNotFound = 28 }; void Panic(TBtraceParserPanic aReason); struct SBtraceParserTls; enum TBtraceNotificationPersistence { ENotificationOneShot, ENotificationPersistent, }; class TBtraceUtils { public: IMPORT_C static TUint32 MicroSecondsToNanoTicks(TTimeIntervalMicroSeconds32 aInterval); IMPORT_C static TUint64 MicroSecondsToFastTicks(TTimeIntervalMicroSeconds32 aInterval); IMPORT_C static TTimeIntervalMicroSeconds NanoTicksToMicroSeconds(TUint32 aNanoTicks); IMPORT_C static TTimeIntervalMicroSeconds FastTicksToMicroSeconds(const TUint64& aFastTicks); IMPORT_C static void DebugOverrideTimerSettings(TInt aNanoPeriod, TInt aFastCounterFreq, TBool aFastCountUp); public: static TInt NanoTickPeriod(); static TInt FastCounterFrequency(); static TBool FastCounterCountsUp(); private: static SBtraceParserTls* CreateTls(); static TInt CalculateNanoTickPeriod(); static TInt CalculateFastCounterFrequency(); static TInt CalculateFastCounterCountsUp(); }; class TBtraceTickCount { public: IMPORT_C TBtraceTickCount(); IMPORT_C void SetToNow(); IMPORT_C TUint32 IntervalInNanoTicks(const TBtraceTickCount& aTickCount) const; IMPORT_C TUint64 IntervalInFastTicks(const TBtraceTickCount& aTickCount) const; IMPORT_C TTimeIntervalMicroSeconds IntervalInMicroSeconds(const TBtraceTickCount& aTickCount) const; IMPORT_C TBool operator==(const TBtraceTickCount& aTickCount) const; IMPORT_C TBool operator!=(const TBtraceTickCount& aTickCount) const; IMPORT_C TBool operator>=(const TBtraceTickCount& aTickCount) const; IMPORT_C TBool operator<=(const TBtraceTickCount& aTickCount) const; IMPORT_C TBool operator>(const TBtraceTickCount& aTickCount) const; IMPORT_C TBool operator<(const TBtraceTickCount& aTickCount) const; public: TUint32 iNano; TUint32 iFast; }; class TBtraceFrame { public: TBtraceFrame(const TBtraceHeader& aHeader); public: TUint8 iSize; TUint8 iFlags; TUint8 iCategory; TUint8 iSubCategory; TBtraceTickCount iTickCount; TUint32 iThreadContext; TUint32 iProgramCounter; TPtrC8 iData; }; class MBtraceLog { public: virtual TBool LogEnabled() = 0; virtual void Log(const TDesC& aLog) = 0; }; class CBtraceReader; class MBtraceObserver { public: virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame) = 0; virtual void BtraceBufferHasBeenReset() {} // Empty default impl }; class MBtraceFrameObserver { public: virtual void HandleFrameDispatchStart() = 0; virtual void HandleFrameDispatchComplete() = 0; }; NONSHARABLE_CLASS(CBtraceReader) : public CActive { public: enum TMode { EAllowBtraceToOverflow, EFlushOnBtraceThreshold, ELeaveOnBtraceThreshold }; enum TObserverType { ENormal, EIncludeSynchronizationFrames }; public: IMPORT_C static CBtraceReader* NewL(TMode aMode, TInt aBufferSize, TInt aThreshold, MBtraceLog* aLog = NULL); IMPORT_C static CBtraceReader* NewL(const TDesC& aReplayFileName, MBtraceLog* aLog = NULL); IMPORT_C ~CBtraceReader(); IMPORT_C void Reset(); IMPORT_C void SynchronizeL(); IMPORT_C void Start(const TBtraceTickCount& aInitialTickCount); IMPORT_C void Start(const TBtraceTickCount& aInitialTickCount, TTimeIntervalMicroSeconds32 aAutoFlushPeriod); IMPORT_C void DisableBtrace(); IMPORT_C void EnableCategoryL(TUint aCategory); IMPORT_C void DisableCategoryL(TUint aCategory); IMPORT_C void AddObserverL(MBtraceObserver& aObserver); IMPORT_C void AddObserverL(MBtraceObserver& aObserver, TObserverType aType); IMPORT_C void AddObserverL(TUint aCategory, MBtraceObserver& aObserver); IMPORT_C void AddObserverL(TUint aCategory, MBtraceObserver& aObserver, TObserverType aType); IMPORT_C void RemoveObserver(MBtraceObserver& aObserver); IMPORT_C void RemoveObserver(TUint aCategory, MBtraceObserver& aObserver); IMPORT_C void AddFrameObseverL(MBtraceFrameObserver& aObserver); IMPORT_C void RemoveFrameObserver(MBtraceFrameObserver& aObserver); IMPORT_C void GetReplayStartTickCountL(TBtraceTickCount& aTickCount); IMPORT_C void SetBufferSizeL(TInt aBufferSize); IMPORT_C void SetReplayFileNameL(const TDesC& aReplayFileName); // Pass empty desc to disable (not allowed to disable if constructed with the overload that took a replay filename) IMPORT_C const TBtraceTickCount& CurrentTickCount() const; IMPORT_C void RecordBtraceDataToFileL(const TDesC& aRecordFileName); // Pass empty desc to disable IMPORT_C void LogBtraceStatus(); IMPORT_C void SetMultipartReassemblyL(TInt aMaxTrackedFragments); // zero to disable IMPORT_C void FlushL(); public: void Log(const TDesC& aDes) const; void Log(TRefByValue<const TDesC> aFmt, ...) const; private: // From CActive. virtual void RunL(); virtual void DoCancel(); private: CBtraceReader(TMode aMode, TInt aThreshold, MBtraceLog* aLog); void ConstructL(TInt aBufferSize); void ConstructL(const TDesC& aReplayFileName); void QueueRead(); void DoReadL(TBool& aFinished); TInt GetData(TUint8*& aData); void DispatchFrameL(const TBtraceFrame& aFrame); void NotifyObserversOfBufferReset(); void ResetAndReprimeL(); void NewMultipartFrameL(const TBtraceFrame& aFrame, TUint32 aExtra); void AdditionalMultipartFragmentL(const TBtraceFrame& aFrame, TUint32 aExtra, TBool aLast); private: class TObserver { public: TObserver(MBtraceObserver& aObserver, TObserverType aType, TUint aCategory); static TObserver ArrayKey(TUint aCategory); private: TObserver(TUint aCategory); // Only for use by ArrayKey public: MBtraceObserver* iObserver; TObserverType iType; TUint iCategory; }; private: static TBool ObserversEqual(const TObserver& aA, const TObserver& aB); static void DecIteratingObservers(TAny* aSelf); private: const TMode iMode; MBtraceLog* iLog; CFlusher* iFlusher; RBTrace iBtrace; #ifdef FSHELL_ATRACE_SUPPORT RATraceConfig iAtraceConfig; #endif TInt iThreshold; RArray<TObserver> iObservers; // Sorted by TObserver::iCategory TInt iNumBytesRead; TInt iNumFramesRead; TBtraceTickCount iCurrentTickCount; TBtraceTickCount iInitialTickCount; TPtrC8 iBtraceBuffer; HBufC8* iReplayData; RFs iFs; RFile iReplayFile; TBool iSynchronizing; MBtraceFrameObserver* iFrameObserver; RFile iRecordFile; TInt iIteratingObservers; TInt iNextSyncFrameId; TInt iSyncFrameIdToWaitFor; TInt iMaxTrackedMultipartFragments; RPointerArray<CMultipartFragment> iMultipartFragments; }; class CRefCountedObject : public CBase { public: IMPORT_C void IncRef(); IMPORT_C void DecRef(); IMPORT_C TInt RefCount() const; protected: CRefCountedObject(); private: TInt iRefCount; }; class TBtraceIdBase { public: IMPORT_C void Set(TUint aValue); IMPORT_C TUint Value() const; IMPORT_C TBool operator==(const TBtraceIdBase& aId) const; protected: TBtraceIdBase(); TBtraceIdBase(TUint aId); TBtraceIdBase(const TBtraceIdBase& aId); private: TUint iId; }; class TBtraceThreadId : public TBtraceIdBase { public: IMPORT_C TBtraceThreadId(); IMPORT_C explicit TBtraceThreadId(TUint aId); IMPORT_C TBtraceThreadId(const TBtraceThreadId& aId); }; class TBtraceProcessId : public TBtraceIdBase { public: IMPORT_C TBtraceProcessId(); IMPORT_C explicit TBtraceProcessId(TUint aId); IMPORT_C TBtraceProcessId(const TBtraceProcessId& aId); }; class TBtraceWindowGroupId : public TBtraceIdBase { public: IMPORT_C TBtraceWindowGroupId(); IMPORT_C explicit TBtraceWindowGroupId(TUint aId); IMPORT_C TBtraceWindowGroupId(const TBtraceWindowGroupId& aId); }; class MBtraceContextObserver { public: IMPORT_C virtual void HandleThreadSeenL(const TBtraceTickCount& aTickCount, const TBtraceThreadId& aId, TUint aUserId); IMPORT_C virtual void HandleThreadGoneL(const TBtraceTickCount& aTickCount, const TBtraceThreadId& aId, TUint aUserId); IMPORT_C virtual void HandleThreadExitL(const TBtraceTickCount& aTickCount, const TBtraceThreadId& aId, TExitType aExitType, TInt aReason, const TDesC& aCategory, TUint aUserId); IMPORT_C virtual void HandleWindowGroupSeenL(const TBtraceTickCount& aTickCount, const TBtraceWindowGroupId& aId, TUint aUserId); }; NONSHARABLE_CLASS(CBtraceContext) : public CRefCountedObject, public MBtraceObserver { public: enum TMode { ENormal }; enum TExitTypes { EKill = 0x00000001, ETerminate = 0x00000002, EPanic = 0x00000004 }; public: IMPORT_C static CBtraceContext* NewL(CBtraceReader& aReader, TMode aMode = ENormal); IMPORT_C ~CBtraceContext(); IMPORT_C const TDesC& ThreadName(const TBtraceThreadId& aId) const; IMPORT_C void GetFullThreadName(const TBtraceThreadId& aId, TDes& aFullName) const; IMPORT_C TThreadId ThreadId(const TBtraceThreadId& aId) const; IMPORT_C const TDesC& ProcessName(const TBtraceProcessId& aId) const; IMPORT_C TInt WindowGroupId(const TBtraceWindowGroupId& aId) const; IMPORT_C const TDesC& WindowGroupName(const TBtraceWindowGroupId& aId) const; IMPORT_C const TBtraceThreadId* FindThread(TUint32 aNThreadAddress) const; IMPORT_C const TBtraceThreadId* FindThread(const TThreadId& aId) const; IMPORT_C const TBtraceWindowGroupId* FindWindowGroup(TInt aWServWgId) const; IMPORT_C void FindThreadsL(const TDesC& aPattern, RArray<TBtraceThreadId>& aThreads) const; IMPORT_C void FindWindowGroupsL(const TDesC& aPattern, RArray<TBtraceWindowGroupId>& aWindowGroups) const; IMPORT_C void FindWindowGroupsByThreadName(const TDesC& aPattern, RArray<TBtraceWindowGroupId>& aWindowGroups) const; IMPORT_C void NotifyThreadSeenL(const TDesC& aPattern, MBtraceContextObserver& aObserver, TUint aId); IMPORT_C void NotifyThreadSeenL(const TDesC& aPattern, MBtraceContextObserver& aObserver, TUint aId, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyThreadSeen(MBtraceContextObserver& aObserver); IMPORT_C void NotifyThreadGoneL(const TDesC& aPattern, MBtraceContextObserver& aObserver, TUint aId); IMPORT_C void NotifyThreadGoneL(const TDesC& aPattern, MBtraceContextObserver& aObserver, TUint aId, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyThreadGone(MBtraceContextObserver& aObserver); IMPORT_C void NotifyThreadExitL(const TDesC& aPattern, TUint aExitTypes, TInt* aReason, const TDesC* aCategory, MBtraceContextObserver& aObserver, TUint aId, TBtraceNotificationPersistence aPersistence); // Note, the pointer parameters are optional. IMPORT_C void CancelNotifyThreadExit(MBtraceContextObserver& aObserver); IMPORT_C void NotifyWindowGroupSeenL(const TDesC& aPattern, MBtraceContextObserver& aObserver, TUint aId, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyWindowGroupSeenByThreadNameL(const TDesC& aPattern, MBtraceContextObserver& aObserver, TUint aId, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyWindowGroupSeen(MBtraceContextObserver& aObserver); private: CBtraceContext(CBtraceReader& aReader, TMode aMode); void ConstructL(); TUint GetNextThreadId(); TUint GetNextProcessId(); TUint GetNextWindowGroupId(); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); virtual void BtraceBufferHasBeenReset(); private: class TThread { public: TThread(TUint32 aNThreadAddress, TUint32 aOwningProcess, const TDesC8& aName); public: TUint32 iNThreadAddress; TBtraceThreadId iId; TUint32 iOwningProcess; TUint32 iKernelId; TName iName; }; class TProcess { public: TProcess(TUint32 aDProcessAddress); TProcess(TUint32 aDProcessAddress, const TDesC8& aName); public: TUint32 iDProcessAddress; TBtraceProcessId iId; TName iName; TInt iReferenceCount; }; class TWindowGroup { public: TWindowGroup(TInt aWindowGroupId); TWindowGroup(const TDesC& aName); TWindowGroup(TInt aWindowGroupId, TThreadId aThreadId, const TDesC& aName); public: TBtraceWindowGroupId iId; TInt iWindowGroupId; TThreadId iThreadId; TFullName iName; }; class TThreadSeenNotif { public: TThreadSeenNotif(TUint aId, const TDesC& aPattern, MBtraceContextObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TUint iId; TName iPattern; MBtraceContextObserver& iObserver; TBtraceNotificationPersistence iPersistence; }; class TThreadGoneNotif { public: TThreadGoneNotif(TUint aId, const TDesC& aPattern, MBtraceContextObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TUint iId; TName iPattern; MBtraceContextObserver& iObserver; TBtraceNotificationPersistence iPersistence; }; class TThreadExitNotif { public: TThreadExitNotif(TUint aId, const TDesC& aPattern, TUint aExitTypes, TInt* aReason, const TDesC* aCategory, MBtraceContextObserver& aObserver, TBtraceNotificationPersistence aPersistence); TBool Matches(const TDesC& aThreadName, TExitType aExitType, TInt aReason, const TDesC& aCategory) const; private: TBool MatchesType(TExitType aExitType) const; public: TUint iId; TName iPattern; TUint iExitTypes; TInt* iReason; const TDesC* iCategory; MBtraceContextObserver& iObserver; TBtraceNotificationPersistence iPersistence; }; class TWindowGroupSeenNotif { public: enum TPatternType { EWindowGroupName, EThreadName }; public: TWindowGroupSeenNotif(TUint aId, const TDesC& aPattern, TPatternType aPatternType, MBtraceContextObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TUint iId; TName iPattern; TPatternType iPatternType; MBtraceContextObserver& iObserver; TBtraceNotificationPersistence iPersistence; }; private: void SeenL(const TThread& aThread, const TBtraceTickCount& aTickCount); void GoneL(const TThread& aThread, const TBtraceTickCount& aTickCount); void ExitedL(const TThread& aThread, TExitType aExitType, TInt aReason, const TDesC& aCategory, const TBtraceTickCount& aTickCount); void AppendL(const TThread& aThread, const TBtraceTickCount& aTickCount); void AppendL(const TProcess& aProcess, const TBtraceTickCount& aTickCount); void RemoveThread(TInt aPosition); void SeenAllThreadsL(const TProcess& aProcess, const TBtraceTickCount& aTickCount); void SeenL(const TWindowGroup& aWindowGroup, const TBtraceTickCount& aTickCount); static TBool ThreadMatchesId(const TThread& aLeft, const TThread& aRight); static TBool ThreadMatchesKernelId(const TThread& aLeft, const TThread& aRight); static TBool ThreadMatchesNThreadAddress(const TThread& aLeft, const TThread& aRight); static TBool ProcessMatchesId(const TProcess& aLeft, const TProcess& aRight); static TBool ProcessMatchesDProcessAddress(const TProcess& aLeft, const TProcess& aRight); static TBool WindowGroupMatchesId(const TWindowGroup& aLeft, const TWindowGroup& aRight); static TBool WindowGroupMatchesThreadId(const TWindowGroup& aLeft, const TWindowGroup& aRight); static TBool WindowGroupMatchesWServId(const TWindowGroup& aLeft, const TWindowGroup& aRight); private: TMode iMode; CBtraceReader& iReader; TUint iNextBtraceThreadId; TUint iNextBtraceProcessId; TUint iNextBtraceWindowGroupId; RArray<TThread> iThreads; RArray<TProcess> iProcesses; RArray<TWindowGroup> iWindowGroups; RArray<TThreadSeenNotif> iThreadSeenNotifs; RArray<TThreadGoneNotif> iThreadGoneNotifs; RArray<TThreadExitNotif> iThreadExitNotifs; RArray<TWindowGroupSeenNotif> iWindowGroupSeenNotifs; }; class MBtraceCpuUsageObserver { public: enum TContextSwitchType { EToThisThread, EFromThisThread }; enum TIdleType { ENeverScheduled, EScheduledAtLeastOnce }; class TCpuUsage { public: TCpuUsage(const TBtraceThreadId& aId); TCpuUsage(const TBtraceThreadId& aId, const TBtraceTickCount& aTickCount); public: TBtraceThreadId iId; TUint64 iNumFastTicks; private: friend class CBtraceCpuUsage; TBtraceTickCount iSwitchedInAt; }; public: virtual void HandleCpuUsageL(const TBtraceTickCount& aTickCount, const TArray<TCpuUsage>& aCpuUsage) = 0; virtual void HandleContextSwitchL(const TBtraceTickCount& aTickCount, const TBtraceThreadId& aId, TContextSwitchType aType) = 0; virtual void HandleThreadIdleL(const TBtraceTickCount& aTickCount, const TBtraceThreadId& aId, TIdleType aIdleType) = 0; }; NONSHARABLE_CLASS(CBtraceCpuUsage) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceCpuUsage* NewL(CBtraceReader& aReader, CBtraceContext& aContext); IMPORT_C ~CBtraceCpuUsage(); IMPORT_C void NotifyCpuUsageL(TUint32 aNanoTickCount, TTimeIntervalMicroSeconds32 aPeriod, MBtraceCpuUsageObserver& aObserver); IMPORT_C void NotifyCpuUsageL(TUint32 aNanoTickCount, TTimeIntervalMicroSeconds32 aPeriod, MBtraceCpuUsageObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyContextSwitchL(const TBtraceThreadId& aId, MBtraceCpuUsageObserver& aObserver); IMPORT_C void NotifyThreadIdleL(const TBtraceThreadId& aId, const TBtraceTickCount& aFromTickCount, TTimeIntervalMicroSeconds32 aPeriod, MBtraceCpuUsageObserver& aObserver); IMPORT_C void NotifyThreadIdleL(const TBtraceThreadId& aId, const TBtraceTickCount& aFromTickCount, TTimeIntervalMicroSeconds32 aPeriod, MBtraceCpuUsageObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyThreadIdle(MBtraceCpuUsageObserver& aObserver); private: CBtraceCpuUsage(CBtraceReader& aReader, CBtraceContext& aContext); void ConstructL(); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class RCpuUsageNotif { public: RCpuUsageNotif(TUint32 aStartTickCount, TUint32 aNumNanoTicks, MBtraceCpuUsageObserver& aObserver, TBtraceNotificationPersistence aPersistence); void Close(); public: TUint32 iStartTickCount; TUint32 iNumNanoTicks; MBtraceCpuUsageObserver* iObserver; RArray<MBtraceCpuUsageObserver::TCpuUsage> iUsage; TBtraceNotificationPersistence iPersistence; }; class TContextSwitchNotif { public: TContextSwitchNotif(const TBtraceThreadId& aId); TContextSwitchNotif(const TBtraceThreadId& aId, MBtraceCpuUsageObserver& aObserver); public: TBtraceThreadId iId; MBtraceCpuUsageObserver* iObserver; }; class TThreadIdleNotif { public: TThreadIdleNotif(const TBtraceThreadId& aId); TThreadIdleNotif(const TBtraceThreadId& aId, const TBtraceTickCount& aFromTickCount, TUint aNumNanoTicks, MBtraceCpuUsageObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TBtraceThreadId iId; TUint32 iNumNanoTicks; MBtraceCpuUsageObserver* iObserver; TBtraceTickCount iLastSwitchedOut; TBool iEverScheduled; TBtraceNotificationPersistence iPersistence; }; private: void HandleContextSwitchL(const TBtraceTickCount& aTickCount, const TBtraceThreadId& aNewBtraceThreadId); void TestCpuUsagePeriodL(const TBtraceTickCount& aTickCount); void TestThreadIdlenessL(const TBtraceTickCount& aTickCount); private: CBtraceReader& iReader; CBtraceContext& iContext; RArray<RCpuUsageNotif> iCpuUsageNotifs; RArray<TContextSwitchNotif> iContextSwitchNotifs; RArray<TThreadIdleNotif> iThreadIdleNotifs; TBtraceThreadId iLastBtractThreadId; TInt iNumIgnoredFrames; TInt iNumProcessedFrames; TInt iNumRelevantFrames; }; class MBtraceKeyPressObserver { public: virtual void HandleKeyPressL(const TBtraceTickCount& aTickCount, const TKeyEvent& aKey) = 0; virtual void HandlePointerPressL(const TBtraceTickCount& aTickCount, const TPointerEvent& aPointer) = 0; virtual void HandleUnclassifiedDataL(const TBtraceTickCount& aTickCount, const TInt aCommandClass, const TInt aOpcode, const TAny* aData) = 0; virtual void HandleRawKeyL(const TBtraceTickCount& aTickCount, TBool aKeyUp, TInt aScanCode) = 0; }; NONSHARABLE_CLASS(CBtraceKeyPress) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceKeyPress* NewL(CBtraceReader& aReader); IMPORT_C ~CBtraceKeyPress(); IMPORT_C void NotifyKeyEventL(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyKeyEventL(MBtraceKeyPressObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyKeyEvent(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyPointerEventL(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyPointerEventL(MBtraceKeyPressObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyPointerEvent(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyUnclassifiedDataL(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyUnclassifiedDataL(MBtraceKeyPressObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyUnclassifiedData(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyRawKeyEventL(MBtraceKeyPressObserver& aObserver); IMPORT_C void NotifyRawKeyEventL(MBtraceKeyPressObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyRawKeyEvent(MBtraceKeyPressObserver& aObserver); private: CBtraceKeyPress(CBtraceReader& aReader); void ConstructL(); void SeenKeyL(const TBtraceTickCount& aTickCount, const TKeyEvent& aKey); void SeenPointerL(const TBtraceTickCount& aTickCount, const TPointerEvent& aKey); void SeenUnclassifiedL(const TBtraceTickCount& aTickCount, const TInt aCommandClass, const TInt aOpcode, const TAny* aData); void SeenRawKeyL(const TBtraceTickCount& aTickCount, TBool aKeyUp, TInt aScanCode); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TKeyPressNotif { public: TKeyPressNotif(MBtraceKeyPressObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: MBtraceKeyPressObserver* iObserver; TBtraceNotificationPersistence iPersistence; }; CBtraceReader& iReader; RArray<TKeyPressNotif> iKeyNotifs; RArray<TKeyPressNotif> iPointerNotifs; RArray<TKeyPressNotif> iGenericNotifs; RArray<TKeyPressNotif> iRawKeyNotifs; }; class MBtraceTextOnScreenObserver { public: virtual void HandleTextSeenL(const TBtraceTickCount& aTickCount, const TDesC& aText, TInt aWindowGroupId) = 0; }; NONSHARABLE_CLASS(CBtraceTextOnScreen) : public CRefCountedObject, public MBtraceObserver { public: enum TMatchMode { EWildNonSpanning, ESpanningNonWild }; public: IMPORT_C static CBtraceTextOnScreen* NewL(CBtraceReader& aReader); IMPORT_C ~CBtraceTextOnScreen(); IMPORT_C void NotifyTextOnScreenL(const TDesC& aText, MBtraceTextOnScreenObserver& aObserver); IMPORT_C void NotifyTextOnScreenL(const TDesC& aText, MBtraceTextOnScreenObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyTextOnScreenL(const TDesC& aText, TMatchMode aMatchMode, MBtraceTextOnScreenObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyTextOnScreenL(const TDesC& aText, TInt aWindowGroupId, TMatchMode aMatchMode, MBtraceTextOnScreenObserver& aObserver); IMPORT_C void NotifyTextOnScreenL(const TDesC& aText, TInt aWindowGroupId, TMatchMode aMatchMode, MBtraceTextOnScreenObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyTextOnScreen(MBtraceTextOnScreenObserver& aObserver); private: CBtraceTextOnScreen(CBtraceReader& aReader); void ConstructL(); void SeenL(const TBtraceTickCount& aTickCount, const TDesC& aData, TInt aWindowGroupId); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TTextOnScreenNotif { public: TTextOnScreenNotif(const TDesC& aText, MBtraceTextOnScreenObserver& aObserver, TBtraceNotificationPersistence aPersistence); TTextOnScreenNotif(const TDesC& aText, TMatchMode aMatchMode, MBtraceTextOnScreenObserver& aObserver, TBtraceNotificationPersistence aPersistence); TTextOnScreenNotif(const TDesC& aText, TInt aWindowGroupId, TMatchMode aMatchMode, MBtraceTextOnScreenObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TPtrC iTxtPtr; TInt iWindowGroupId; TInt iMatchedChars; TMatchMode iMatchMode; MBtraceTextOnScreenObserver* iObserver; TBtraceNotificationPersistence iPersistence; }; CBtraceReader& iReader; RArray<TTextOnScreenNotif> iScreenNotifs; }; // // An observer to identify the occurrence of generic events (see btrace_parser_defs.h) // class MBtraceGenericObserver { public: virtual void HandleGenericEvent0L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory) = 0; virtual void HandleGenericEvent1L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory, TUint32 aData1) = 0; virtual void HandleGenericEvent2L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory, TUint32 aData1, TUint32 aData2) = 0; virtual void HandleGenericEvent3L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory, TUint32 aData1, TUint32 aData2, TUint32 aData3) = 0; }; NONSHARABLE_CLASS(CBtraceGeneric) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceGeneric* NewL(CBtraceReader& aReader); IMPORT_C ~CBtraceGeneric(); IMPORT_C void NotifyGenericEventL(MBtraceGenericObserver& aObserver); private: CBtraceGeneric(CBtraceReader& aReader); void ConstructL(); // MBtraceObserver pure virtuals virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); void SeenGeneric0L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory); void SeenGeneric1L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory, TUint32 aData1); void SeenGeneric2L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory, TUint32 aData1, TUint32 aData2); void SeenGeneric3L(const TBtraceTickCount& aTickCount, TUint8 aSubCategory, TUint32 aData1, TUint32 aData2, TUint32 aData3); private: CBtraceReader& iReader; //TODO TBtraceNotificationPersistence iPersistence RPointerArray<MBtraceGenericObserver> iObservers; // pointers not owned }; class MBtraceDomainEventObserver { public: virtual void HandleDomainEventL(const TBtraceTickCount& aTickCount, MBtraceDomainEventObserver& aObserver) = 0; }; NONSHARABLE_CLASS(CBtraceDomainEvent) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceDomainEvent* NewL(CBtraceReader& aReader); IMPORT_C ~CBtraceDomainEvent(); IMPORT_C void NotifyDomainEventL(TUint aSubCategory, MBtraceDomainEventObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyDomainEventL(TUint aSubCategory, TUint aData1, MBtraceDomainEventObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyDomainEventL(TUint aSubCategory, TUint aData1, TUint aData2, MBtraceDomainEventObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyDomainEventL(TUint aSubCategory, TUint aData1, TUint aData2, TUint aData3, MBtraceDomainEventObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyDomainEvent(MBtraceDomainEventObserver& aObserver); private: CBtraceDomainEvent(CBtraceReader& aReader); void ConstructL(); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TDomainEventNotif { public: TDomainEventNotif(TUint aSubCategory); TDomainEventNotif(TUint aSubCategory, MBtraceDomainEventObserver& aObserver, TBtraceNotificationPersistence aPersistence); void AddDataItem(TUint aData); TBool operator==(const TDomainEventNotif& aNotif) const; public: enum { KMaxNumDataItems = 3 }; public: TUint iSubCategory; MBtraceDomainEventObserver* iObserver; TBtraceNotificationPersistence iPersistence; TInt iDataCount; TFixedArray<TUint, KMaxNumDataItems> iData; }; private: CBtraceReader& iReader; RArray<TDomainEventNotif> iNotifs; }; class MBtraceAppStartObserver { public: virtual void HandleAppStartL(const TBtraceTickCount& aTickCount) = 0; }; NONSHARABLE_CLASS(CBtraceAppStart) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceAppStart* NewL(CBtraceReader& aReader, CBtraceContext& aContext); IMPORT_C ~CBtraceAppStart(); IMPORT_C void NotifyAppStartL(MBtraceAppStartObserver& aObserver, const TDesC& aWindowGroupNamePattern); IMPORT_C void NotifyAppStartL(MBtraceAppStartObserver& aObserver, const TDesC& aWindowGroupNamePattern, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyAppStart(MBtraceAppStartObserver& aObserver); private: CBtraceAppStart(CBtraceReader& aReader, CBtraceContext& aContext); void ConstructL(); void SeenAppStartL(const TBtraceTickCount& aTickCount, TInt aWindowGroupId); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TAppStartNotif { public: TAppStartNotif(MBtraceAppStartObserver& aObserver, const TDesC& aWindowGroupNamePattern, TBtraceNotificationPersistence aPersistence); public: MBtraceAppStartObserver& iObserver; TPtrC iWindowGroupNamePattern; TBtraceNotificationPersistence iPersistence; }; private: CBtraceReader& iReader; CBtraceContext& iContext; RArray<TAppStartNotif> iNotifs; }; class MBtraceAppResponseObserver { public: virtual void HandleAppResponseSeenL(const TBtraceTickCount& aTickCount) = 0; }; NONSHARABLE_CLASS(CBtraceAppResponse) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceAppResponse* NewL(CBtraceReader& aReader, CBtraceContext& aContext); IMPORT_C ~CBtraceAppResponse(); IMPORT_C void NotifyAppResponseL(MBtraceAppResponseObserver& aObserver, const TDesC& aWindowGroupNamePattern); IMPORT_C void NotifyAppResponseL(MBtraceAppResponseObserver& aObserver, const TDesC& aWindowGroupNamePattern, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyAppResponse(MBtraceAppResponseObserver& aObserver); private: CBtraceAppResponse(CBtraceReader& aReader, CBtraceContext& aContext); void ConstructL(); void SeenAppResponseL(const TBtraceTickCount& aTickCount, TInt aWindowGroupId); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TAppResponseNotif { public: TAppResponseNotif(MBtraceAppResponseObserver& aObserver, const TDesC& aWindowGroupNamePattern, TBtraceNotificationPersistence aPersistence); public: MBtraceAppResponseObserver& iObserver; TPtrC iWindowGroupNamePattern; TBtraceNotificationPersistence iPersistence; }; private: CBtraceReader& iReader; CBtraceContext& iContext; RArray<TAppResponseNotif> iNotifs; }; class MBtraceScreenUpdateObserver { public: virtual void HandleScreenUpdateL(const TBtraceTickCount& aTickCount, TInt aScreenNumber, const TRect& aRect) = 0; }; NONSHARABLE_CLASS(CBtraceScreenUpdate) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceScreenUpdate* NewL(CBtraceReader& aReader); IMPORT_C ~CBtraceScreenUpdate(); IMPORT_C void NotifyScreenUpdateL(MBtraceScreenUpdateObserver& aObserver); IMPORT_C void NotifyScreenUpdateL(MBtraceScreenUpdateObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void NotifyScreenUpdateL(TInt aScreenNumber, const TRect& aRect, MBtraceScreenUpdateObserver& aObserver); IMPORT_C void NotifyScreenUpdateL(TInt aScreenNumber, const TRect& aRect, MBtraceScreenUpdateObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyScreenUpdate(MBtraceScreenUpdateObserver& aObserver); private: CBtraceScreenUpdate(CBtraceReader& aReader); void ConstructL(); void HandleScreenUpdateL(const TBtraceTickCount& aTickCount, TInt aScreenNumber, const TRect& aRect); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TScreenUpdateNotif { public: TScreenUpdateNotif(MBtraceScreenUpdateObserver& aObserver, TBtraceNotificationPersistence aPersistence); TScreenUpdateNotif(TInt aScreenNumber, const TRect& aRect, MBtraceScreenUpdateObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TBool iNotifyAll; TInt iScreenNumber; TRect iRect; MBtraceScreenUpdateObserver* iObserver; TBtraceNotificationPersistence iPersistence; }; private: CBtraceReader& iReader; RArray<TScreenUpdateNotif> iNotifs; }; class MBtracePubSubObserver { public: virtual void HandlePropertyChangedL(const TBtraceTickCount& aTickCount, TUint aCategory, TUint aKey, TInt aNewValue) = 0; virtual void HandlePropertyChangedL(const TBtraceTickCount& aTickCount, TUint aCategory, TUint aKey, const TDesC8& aNewValue) = 0; }; NONSHARABLE_CLASS(CBtracePubSub) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtracePubSub* NewL(CBtraceReader& aReader); IMPORT_C ~CBtracePubSub(); IMPORT_C void NotifyPropertyChangedL(MBtracePubSubObserver& aObserver); IMPORT_C void NotifyPropertyChangedL(TUint* aCategory, TUint* aKey, MBtracePubSubObserver& aObserver, TBtraceNotificationPersistence aPersistence); // Note, the pointer parameters are optional. IMPORT_C void NotifyIntegerPropertyChangedL(TUint* aCategory, TUint* aKey, TInt* aValue, MBtracePubSubObserver& aObserver, TBtraceNotificationPersistence aPersistence); // Note, the pointer parameters are optional. IMPORT_C void NotifyDataPropertyChangedL(TUint* aCategory, TUint* aKey, const TDesC8* aValue, MBtracePubSubObserver& aObserver, TBtraceNotificationPersistence aPersistence); // Note, the pointer parameters are optional. IMPORT_C void CancelNotifyPropertyChanged(MBtracePubSubObserver& aObserver); private: CBtracePubSub(CBtraceReader& aReader); void ConstructL(); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TPubSubNotif { public: TPubSubNotif(TUint* aCategory, TUint* aKey, TInt* aIntegerValue, const TDesC8* aDataValue, MBtracePubSubObserver& aObserver, TBtraceNotificationPersistence aPersistence); TBool Matches(TUint aCategory, TUint aKey, TInt aIntegerValue) const; TBool Matches(TUint aCategory, TUint aKey, const TDesC8& aDataValue) const; public: TUint* iCategory; TUint* iKey; TInt* iIntegerValue; const TDesC8* iDataValue; MBtracePubSubObserver& iObserver; TBtraceNotificationPersistence iPersistence; }; private: CBtraceReader& iReader; RArray<TPubSubNotif> iNotifs; }; class MBtraceFocusChangeObserver { public: virtual void HandleFocusChangedL(const TBtraceTickCount& aTickCount, const TBtraceWindowGroupId& aWindowGroupId) = 0; }; NONSHARABLE_CLASS(CBtraceFocusChange) : public CRefCountedObject, public MBtraceObserver { public: IMPORT_C static CBtraceFocusChange* NewL(CBtraceReader& aReader, CBtraceContext& aContext); IMPORT_C ~CBtraceFocusChange(); IMPORT_C void NotifyFocusChangedL(const TDesC& aWindowGroupNamePattern, MBtraceFocusChangeObserver& aObserver); IMPORT_C void NotifyFocusChangedL(const TDesC& aWindowGroupNamePattern, MBtraceFocusChangeObserver& aObserver, TBtraceNotificationPersistence aPersistence); IMPORT_C void CancelNotifyFocusChanged(MBtraceFocusChangeObserver& aObserver); private: CBtraceFocusChange(CBtraceReader& aReader, CBtraceContext& aContext); void ConstructL(); private: // From MBtraceObserver. virtual void HandleBtraceFrameL(const TBtraceFrame& aFrame); private: class TFocusChangeNotif { public: TFocusChangeNotif(const TDesC& aWindowGroupNamePattern, MBtraceFocusChangeObserver& aObserver, TBtraceNotificationPersistence aPersistence); public: TPtrC iWindowGroupNamePattern; MBtraceFocusChangeObserver& iObserver; TBtraceNotificationPersistence iPersistence; }; private: CBtraceReader& iReader; CBtraceContext& iContext; RArray<TFocusChangeNotif> iNotifs; }; #endif // __BTRACE_PARSER_H__
[ [ [ 1, 965 ] ] ]
6e2f41f2695b5f145f95c74f9b99d1943099bf8d
b0252ba622183d115d160eb28953189930ebf9c0
/Source/CUnit.cpp
7c35d770c888fced665743f888fd4695f1e20b4d
[]
no_license
slewicki/khanquest
6c0ced33bffd3c9ee8a60c1ef936139a594fe2fc
f2d68072a1d207f683c099372454add951da903a
refs/heads/master
2020-04-06T03:40:18.180208
2008-08-28T03:43:26
2008-08-28T03:43:26
34,305,386
2
0
null
null
null
null
UTF-8
C++
false
false
24,895
cpp
#include "CUnit.h" #include "CCamera.h" #include "CSGD_Direct3D.h" #include "SGD_Math.h" #include "CTileEngine.h" #include "ObjectManager.h" #include "CAISystem.h" #include "CSGD_TextureManager.h" #include "CGamePlayState.h" #include "CEventSystem.h" #include "HUDState.h" CUnit::CUnit(int nType) { PROFILE("CUnit::CUnit(int)"); m_nMaxHP = 0; m_nCurrentHP = 0; m_nAttack = 0; m_nRange = 1; m_fAttackSpeed = 0.f; m_fMovementSpeed = 0.f; m_nCost = 0; m_fShakeTimer = 0.f; m_fMovementTimer = 0.f; m_nBonus = 0; m_fHealTimer = 0.f; m_bIsPlayerUnit = true; m_bIsGrouped = false; m_bIsAlive = true; m_bIsSelected = false; m_fDeathTimer = 0.f; m_fScanTimer = 0.f; m_bIsActive = true; m_pTarget = NULL; m_nDirectionFacing = SOUTH_WEST; m_nState = IDLE; m_fAttackTimer = 0.f; SetType(nType); SetNextTile(NULL); SetDestTile(NULL); SetCurrentTile(NULL); m_pAnimInstance = new CAnimInstance(GetType()); m_bIsTargeted = false; m_pAnimInstance->SetPlayer(m_bIsPlayerUnit); //m_pAnimInstance->Play(m_nDirectionFacing, m_nState); m_pTE = CTileEngine::GetInstance(); m_pCAI = CAISystem::GetInstance(); } CUnit::~CUnit(void) { PROFILE("CUnit::~CUnit()"); delete m_pAnimInstance; //CSGD_TextureManager::GetInstance()->ReleaseTexture(m_nSelectionID); } void CUnit::RenderHealth() { PROFILE("CUnit::RenderHealth()"); POINT ptPos = CCamera::GetInstance()->TransformToScreen((int)GetPosX(), (int)GetPosY()); // Set Health Rect //------------------------------- float fHealth = ((float)GetHealth() / ((float)GetMaxHP())); int nHealthBarLength = (int)Lerp(0.0f, 50.f, fHealth); DWORD dwColor; if ( fHealth <= .2f ) dwColor = D3DCOLOR_ARGB(255, 255, 0, 0); else if ( fHealth <= .4f && fHealth > .2f ) dwColor = D3DCOLOR_ARGB(255, 255, 128, 0); else if ( fHealth <= .6f && fHealth > .4f) dwColor = D3DCOLOR_ARGB(255, 255, 255, 0); else if ( fHealth <= .8f && fHealth > .6f ) dwColor = D3DCOLOR_ARGB(255, 0, 240, 0); else dwColor = D3DCOLOR_ARGB(255, 0, 190, 0); RECT rHealthBar; CSGD_Direct3D::GetInstance()->DeviceEnd(); CSGD_Direct3D::GetInstance()->SpriteEnd(); rHealthBar.left = m_rLocalRect.left + (int)((m_rLocalRect.right - m_rLocalRect.left)*.5f) - 25; rHealthBar.bottom = m_rLocalRect.top-10; //rHealthBar.right = rHealthBar.left + 50; rHealthBar.top = rHealthBar.bottom - 3; //CSGD_Direct3D::GetInstance()->DrawRect(rHealthBar, 255, 0, 0); rHealthBar.right = rHealthBar.left + nHealthBarLength; //CSGD_Direct3D::GetInstance()->DrawRect(rHealthBar, 0, 255, 0); CSGD_Direct3D::GetInstance()->DrawRect(rHealthBar, dwColor); CSGD_Direct3D::GetInstance()->DeviceBegin(); CSGD_Direct3D::GetInstance()->SpriteBegin(); /*if(IsPlayerUnit() && IsSelected() && m_pTarget) { m_pTarget->RenderHealth(); }*/ } void CUnit::Update(float fElapsedTime) { PROFILE("CUnit::Update(float)"); if(m_bIsActive) { m_pAnimInstance->Update(fElapsedTime); // Set Global Rect //------------------------------- m_rGlobalRect.left = (int)GetPosX(); m_rGlobalRect.top = (int)GetPosY(); m_rGlobalRect.right = m_rGlobalRect.left + m_pAnimInstance->GetFrameWidth(m_nDirectionFacing, m_nState); m_rGlobalRect.bottom = m_rGlobalRect.top + m_pAnimInstance->GetFrameHeight(m_nDirectionFacing, m_nState); //------------------------------- POINT ptPos = CCamera::GetInstance()->TransformToScreen((int)GetPosX(), (int)GetPosY()); m_pAnimInstance->SetX(ptPos.x); m_pAnimInstance->SetY(ptPos.y); // Set Local Rect //------------------------------- m_rLocalRect = m_pAnimInstance->GetRenderRect(m_nDirectionFacing, m_nState); //---------------------------------------- } if(!m_bIsAlive) { if(m_fShakeTimer == 0.f) { m_ptCameraPosition.x = (int)CCamera::GetInstance()->GetPosX(); m_ptCameraPosition.y = (int)CCamera::GetInstance()->GetPosY(); } m_fDeathTimer += fElapsedTime; if(GetType() == UNIT_WAR_ELEPHANT && m_fDeathTimer > 2.f && m_fDeathTimer < 3.f ) { m_fShakeTimer+= fElapsedTime; POINT ptTest1; if(m_fShakeTimer <.1) { ptTest1.x = (int)(rand() % 20); ptTest1.y = (int)(rand() % 20); ptTest1.x -= 10; ptTest1.y -= 10; CCamera::GetInstance()->SetPosX(CCamera::GetInstance()->GetPosX() + (float)ptTest1.x); CCamera::GetInstance()->SetPosY(CCamera::GetInstance()->GetPosY() + (float)ptTest1.y); } else if(m_fShakeTimer < .2f) { CCamera::GetInstance()->SetPosX((float)m_ptCameraPosition.x); CCamera::GetInstance()->SetPosY((float)m_ptCameraPosition.y); } else m_fShakeTimer = 0.f; } if(m_fDeathTimer >= 7.f) m_bIsActive = false; return; } // Make 6 tiles around unit visible if(m_bIsPlayerUnit) UpdateVisibility(); //---------------------------------- if(m_nCurrentHP <= 0 && m_bIsAlive == true) { m_bIsAlive = false; m_bIsSelected = false; CHUDState::GetInstance()->UpdateSelected(); //Start death animation and fading m_pAnimInstance->Stop(m_nDirectionFacing, m_nState); m_nState = DYING; m_pAnimInstance->Play(m_nDirectionFacing, m_nState); m_pAnimInstance->SetLooping(false); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); m_pAnimInstance->StartFadeTimer(m_nDirectionFacing, m_nState); CEventSystem::GetInstance()->SendEvent("Dying_Sound", this); // Clear the tile m_pCurrentTile->bIsOccupied = false; m_pCurrentTile->pUnit = NULL; } else if(m_nState != RETREAT && m_nCurrentHP <= ( m_nMaxHP * .25) && m_bIsAlive == true && !IsPlayerUnit() && ( !m_pCurrentTile->bIsEnemySpawn && !m_pCurrentTile->bIsPlayerSpawn )) { m_nState = RETREAT; m_pTarget = NULL; SetDestTile(NULL); SetNextTile(NULL); ObjectManager::GetInstance()->GetSpawnPointDest(this); SetPath(CAISystem::GetInstance()->FindPath(m_pCurrentTile, m_pDestinationTile)); ChangeDirection(m_pCurrentTile); } // If the target is dead dont mind him if(m_pTarget && m_pTarget->GetHealth() <= 0) { m_pTarget = NULL; SetState(IDLE); // Change animation to idle ChangeDirection(m_pCurrentTile); } else if(m_pTarget && m_pTarget->GetHealth() >0 && IsSelected()) m_pTarget->SetTargeted(true); switch (m_nState) { case IDLE: m_fScanTimer += fElapsedTime; m_fHealTimer += fElapsedTime; if (m_fHealTimer > 2.f && m_nCurrentHP < m_nMaxHP) { m_nCurrentHP += 1; m_fHealTimer = 0.f; } // If we aren't moving then make sure we are on the anchor point! SetPosX((float)m_pCurrentTile->ptLocalAnchor.x); SetPosY((float)m_pCurrentTile->ptLocalAnchor.y); //----------------------------------------------------- if((((int)m_fScanTimer) < 1.) && !m_pTarget && m_nCurrentHP > ( m_nMaxHP * .25)) { ScanForEnemies(); } else if(m_fScanTimer > 1.f) m_fScanTimer = 0.f; if(m_pTarget) { if(IsTargetInRange()) { SetState(COMBAT); // Face the target ChangeDirection(m_pTarget->m_pCurrentTile); } else { SetState(MOVEMENT); SetDestTile(m_pTarget->m_pCurrentTile); SetPath(CAISystem::GetInstance()->FindPath(m_pCurrentTile, m_pDestinationTile)); if(m_vPath.size()) { // Found a path, set next tile POINT& path = m_vPath.back(); SetNextTile( m_pTE->GetTile(0, path.x, path.y ) ); ChangeDirection(m_pNextTile); m_vPath.pop_back(); } else { // No path available, go back to IDLE SetState(IDLE); ChangeDirection(m_pCurrentTile); } } } break; case COMBAT: // If we aren't moving then make sure we are on the anchor point! SetPosX((float)m_pCurrentTile->ptLocalAnchor.x); SetPosY((float)m_pCurrentTile->ptLocalAnchor.y); //----------------------------------------------------- m_fAttackTimer += fElapsedTime; if(m_pTarget) { if(IsTargetInRange()) { ResolveCombat(); } else { // Go back to idle, which will reset path and move to target SetState(IDLE); ChangeDirection(m_pCurrentTile); } } else { // No target, Go back to IDLE to chill SetState(IDLE); ChangeDirection(m_pCurrentTile); } break; case MOVEMENT: // No destination, then go back to IDLE if(!m_pDestinationTile) { SetState(IDLE); SetNextTile(NULL); ChangeDirection(m_pCurrentTile); break; } // Reached destination or in range of target if((m_pCurrentTile == m_pDestinationTile) || (m_pTarget && IsTargetInRange())) { m_vPath.clear(); SetDestTile(NULL); SetNextTile(NULL); SetState(IDLE); ChangeDirection(m_pCurrentTile); break; } // If we have a destination but not a next, set it if(m_pDestinationTile && !m_pNextTile) { if(m_vPath.size()) { POINT& path = m_vPath.back(); SetNextTile( m_pTE->GetTile(0, path.x, path.y ) ); ChangeDirection(m_pNextTile); m_vPath.pop_back(); // If the next tile isn't right next to us, we cant move there if(!IsTileAdjacent(m_pCurrentTile, m_pNextTile)) { m_vPath.clear(); SetNextTile(NULL); break; } } // No path to dest? find one else { SetPath(CAISystem::GetInstance()->FindPath(m_pCurrentTile, m_pDestinationTile)); break; } } // Next one is occupied, stop and find a new path next run if(m_pNextTile->bIsOccupied) { // If that is the dest, just stop if(m_pNextTile == m_pDestinationTile) { SetDestTile(NULL); SetState(IDLE); ChangeDirection(m_pCurrentTile); } // Clear the old path and next tile m_vPath.clear(); SetNextTile(NULL); break; } // Returns true if we make it to the next tile if(MoveUnit(fElapsedTime)) { // Set prev. to unoccupied m_pCurrentTile->bIsOccupied = false; m_pCurrentTile->pUnit = NULL; SetCurrentTile(m_pNextTile); // Start out the next one m_pCurrentTile->bIsOccupied = true; m_pCurrentTile->pUnit = this; // Clear next tile, will be reset next run if path exists SetNextTile(NULL); if(!m_bIsPlayerUnit && m_pTarget && !IsTargetInView()) { m_pTarget = NULL; m_nState = IDLE; ChangeDirection(m_pCurrentTile); } break; } break; case RETREAT: // No destination, then go back to IDLE if(!m_pDestinationTile) { SetState(IDLE); SetNextTile(NULL); ChangeDirection(m_pCurrentTile); break; } // Reached destination or in range of target if((m_pCurrentTile == m_pDestinationTile) || (!IsPlayerUnit() && m_pCurrentTile->bIsEnemySpawn) || (IsPlayerUnit() && m_pCurrentTile->bIsPlayerSpawn)) { m_vPath.clear(); SetDestTile(NULL); SetNextTile(NULL); SetState(IDLE); ChangeDirection(m_pCurrentTile); break; } // If we have a destination but not a next, set it if(m_pDestinationTile && !m_pNextTile) { if(m_vPath.size()) { POINT& path = m_vPath.back(); SetNextTile( m_pTE->GetTile(0, path.x, path.y ) ); ChangeDirection(m_pNextTile); m_vPath.pop_back(); // If the next tile isn't right next to us, we cant move there if(!IsTileAdjacent(m_pCurrentTile, m_pNextTile)) { m_vPath.clear(); SetNextTile(NULL); break; } } // No path to dest? find one else { SetPath(CAISystem::GetInstance()->FindPath(m_pCurrentTile, m_pDestinationTile)); break; } } // Next one is occupied, stop and find a new path next run if(m_pNextTile->bIsOccupied) { // If that is the dest, just stop if(m_pNextTile == m_pDestinationTile) { SetDestTile(NULL); SetState(IDLE); ChangeDirection(m_pCurrentTile); } // Clear the old path and next tile m_vPath.clear(); SetNextTile(NULL); break; } // Returns true if we make it to the next tile if(MoveUnit(fElapsedTime)) { // Set prev. to unoccupied m_pCurrentTile->bIsOccupied = false; m_pCurrentTile->pUnit = NULL; SetCurrentTile(m_pNextTile); // Start out the next one m_pCurrentTile->bIsOccupied = true; m_pCurrentTile->pUnit = this; // Clear next tile, will be reset next run if path exists SetNextTile(NULL); break; } break; case DYING: break; } } void CUnit::RenderSelection() { PROFILE("CUnit::RenderSelection()"); int nPosX = m_rLocalRect.left+ (int)((m_rLocalRect.right - m_rLocalRect.left)*.5f) - 32; int nPosY = m_rLocalRect.top+ (int)((m_rLocalRect.bottom - m_rLocalRect.top)*.5f); if(m_bIsPlayerUnit) CSGD_TextureManager::GetInstance()->Draw(CGamePlayState::GetInstance()->GetSelectionID(), nPosX, nPosY); else CSGD_TextureManager::GetInstance()->Draw(CGamePlayState::GetInstance()->GetSelectionID(), nPosX, nPosY, 1.f, 1.f, 0, 0, 0, 0, D3DCOLOR_ARGB(255, 255, 0, 0)); /*if(m_pTarget && m_bIsPlayerUnit) { int nPosX = m_pTarget->GetLocalRect().left+ (int)((m_pTarget->GetLocalRect().right - m_pTarget->GetLocalRect().left)*.5f) - 32; int nPosY = m_pTarget->GetLocalRect().top+ (int)((m_pTarget->GetLocalRect().bottom - m_pTarget->GetLocalRect().top)*.5f); CSGD_TextureManager::GetInstance()->Draw(CGamePlayState::GetInstance()->GetSelectionID(), nPosX, nPosY, 1.f, 1.f, 0, 0, 0, 0, D3DCOLOR_ARGB(255, 255, 0, 0)); }*/ } void CUnit::Render(float fElapsedTime) { PROFILE("CUnit::Render(float)"); if(!m_bIsActive) return; if(IsOnScreen() && m_pCurrentTile->bIsVisible) { if(m_bIsAlive) { if(m_bIsSelected) { RenderSelection(); RenderHealth(); } else if(m_bIsTargeted && !IsPlayerUnit()) { RenderSelection(); RenderHealth(); } } m_pAnimInstance->Render(); } } void CUnit::ScanForEnemies() { PROFILE("CUnit::ScanForEnemies()"); ObjectManager* pOM = ObjectManager::GetInstance(); // If we are dead or already in combat, do not check if(!m_bIsAlive || this->GetState() == COMBAT || GetState() == RETREAT) return; //if(this->IsPlayerUnit() && this->GetState() != IDLE) // return false; CTileEngine* Map = CTileEngine::GetInstance(); //tile positionx+range, tile positiony+range //to //tile positionx-range, tile positiony-range //00-22-44 POINT ptTileID = m_pCurrentTile->ptTileLoc; // Start at top left corner and check all surrounding int nLayer = 1; while(nLayer <= VISIBILITY) { for (int x = ptTileID.x-nLayer; x < ptTileID.x + nLayer; x++) { for (int y = ptTileID.y-nLayer; y < ptTileID.y + nLayer; y++) { // Don't go out of bounds if(x >= Map->GetMapWidth() || x < 0) continue; // Don't go out of bounds if(y >= Map->GetMapHeight() || y < 0) continue; /* if((x >= Map->GetMapWidth() || x < 0) && (y >= Map->GetMapHeight() || y < 0)) return NULL;*/ if(Map->GetTile(0, x, y)->bIsOccupied) { CUnit* pUnit = Map->GetTile(0, x, y)->pUnit; if(pUnit == NULL) break; // Ignore allies if(pUnit->IsPlayerUnit() == this->IsPlayerUnit()) continue; // Ignore dead and self if(!pUnit->IsAlive() || pUnit == this) continue; if(this->GetTarget() == NULL) { // If unit finds an enemy, set the target SetTarget(pUnit); return; } } } } nLayer++; } } void CUnit::UpdateVisibility() { PROFILE("CUnit::UpdateVisibility()"); CTileEngine* Map = CTileEngine::GetInstance(); POINT ptTileID = m_pCurrentTile->ptTileLoc; POINT ptTopLeft; // Start at top left corner and check all surrounding ptTopLeft.x = ptTileID.x-VISIBILITY; ptTopLeft.y = ptTileID.y-VISIBILITY; for (int x = ptTopLeft.x; x < ptTopLeft.x + VISIBILITY*2; x++) { for (int y = ptTopLeft.y; y < ptTopLeft.y + VISIBILITY*2; y++) { // Don't go out of bounds if(x >= Map->GetMapWidth() || x < 0) continue; // Don't go out of bounds if(y >= Map->GetMapHeight() || y < 0) continue; Map->SetVisible(x, y, true, NULL); //Map->GetTile(0, x, y)->vColor = D3DCOLOR_ARGB(255, 255, 0, 0); } } } void CUnit::ChangeDirection(CTile* pTileFacing) { PROFILE("CUnit::ChangeDirection(CTile*)"); if(pTileFacing == m_pCurrentTile || pTileFacing == NULL) { m_pAnimInstance->StopAllAnimations(); return; } if(pTileFacing->ptLocalAnchor.y < m_pCurrentTile->ptLocalAnchor.y && pTileFacing->ptLocalAnchor.x < m_pCurrentTile->ptLocalAnchor.x) { // If this already is our animation, and it's playing just return if(m_nDirectionFacing == NORTH_WEST && !m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = NORTH_WEST; m_pAnimInstance->SetFlip(false); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.y < m_pCurrentTile->ptLocalAnchor.y && pTileFacing->ptLocalAnchor.x > m_pCurrentTile->ptLocalAnchor.x) { if(m_nDirectionFacing == NORTH_WEST && m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = NORTH_WEST; m_pAnimInstance->SetFlip(true); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.y > m_pCurrentTile->ptLocalAnchor.y && pTileFacing->ptLocalAnchor.x < m_pCurrentTile->ptLocalAnchor.x) { if(m_nDirectionFacing == SOUTH_WEST && !m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = SOUTH_WEST; m_pAnimInstance->SetFlip(false); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.y > m_pCurrentTile->ptLocalAnchor.y && pTileFacing->ptLocalAnchor.x > m_pCurrentTile->ptLocalAnchor.x) { if(m_nDirectionFacing == SOUTH_WEST && m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = SOUTH_WEST; m_pAnimInstance->SetFlip(true); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.x < m_pCurrentTile->ptLocalAnchor.x) { if(m_nDirectionFacing == WEST && !m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = WEST; m_pAnimInstance->SetFlip(false); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.x > m_pCurrentTile->ptLocalAnchor.x) { if(m_nDirectionFacing == WEST && m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = WEST; m_pAnimInstance->SetFlip(true); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.y < m_pCurrentTile->ptLocalAnchor.y) { if(m_nDirectionFacing == NORTH && !m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = NORTH; m_pAnimInstance->SetFlip(false); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } else if(pTileFacing->ptLocalAnchor.y > GetLocalRect().top) { if(m_nDirectionFacing == SOUTH && !m_pAnimInstance->IsFlipped() && m_pAnimInstance->IsPlaying(m_nDirectionFacing, GetState())) return; m_pAnimInstance->StopAllAnimations(); m_nDirectionFacing = SOUTH; m_pAnimInstance->SetFlip(false); m_pAnimInstance->Play(m_nDirectionFacing, m_nState); //m_pAnimInstance->SetPlayer(IsPlayerUnit()); return; } } void CUnit::ResolveCombat() { PROFILE("CUnit::ResolveCombat()"); if(!m_pTarget) return; CalcAttackBonus(); if(m_fAttackTimer >= m_fAttackSpeed) { m_pTarget->SetCurrentHP(m_pTarget->GetHealth() - GetAttackPower()+m_nBonus); m_fAttackTimer = 0.f; if(IsOnScreen()) { CEventSystem::GetInstance()->SendEvent("Attack_Sound", this); } } if(m_pTarget->GetHealth() <= 0) { m_pTarget = NULL; } } void CUnit::CalcAttackBonus() { PROFILE("CUnit::CalcAttackBonus()"); if(!m_pTarget) return; m_nBonus = 0; switch (GetType()) { case UNIT_INFANTRY: // Unit Type bonuses if(m_pTarget->GetType() == UNIT_AXMEN) m_nBonus = 1; break; case UNIT_CAVALRY: if(m_pTarget->GetType() == UNIT_ARCHER || m_pTarget->GetType() == UNIT_INFANTRY) m_nBonus = 1; break; case UNIT_CAVALRY_ARCHER: if(m_pTarget->GetType() == UNIT_ARCHER || m_pTarget->GetType() == UNIT_CAVALRY_ARCHER) m_nBonus = 1; break; case UNIT_AXMEN: if(m_pTarget->GetType() == UNIT_CAVALRY) m_nBonus = 1; break; case UNIT_ARCHER: if(m_pTarget->GetType() == UNIT_WAR_ELEPHANT) m_nBonus = 3; break; case UNIT_WAR_ELEPHANT: if(m_pTarget->GetType() == UNIT_CAVALRY || m_pTarget->GetType() == UNIT_INFANTRY || m_pTarget->GetType() == UNIT_AXMEN) m_nBonus = 1; break; default: break; } // Mountain bonus if(m_pCurrentTile->nType == MOUNTAIN) m_nBonus++; // Forest enemy defense bonus if(GetTarget()->m_pCurrentTile->nType == FOREST) m_nBonus--; } CTile* CUnit::PlaceOnSurrounding(CTile* pCenterTile) { PROFILE("CUnit::PlaceOnSurrounding(CTile*)"); CTileEngine* Map = CTileEngine::GetInstance(); POINT ptTileID = pCenterTile->ptTileLoc; // Start at top left corner and check all surrounding CTile* pCheckTile = NULL; int nLayer = 1; //-1, -1 //-1, 0 //-1, 1 //------ // 0, -1 // 0, 0 // 0, 1 //------ // 1, -1 // 1, 0 // 1, 1 while(true) { for (int x = ptTileID.x-nLayer; x < ptTileID.x + nLayer; x++) { for (int y = ptTileID.y-nLayer; y < ptTileID.y + nLayer; y++) { // Don't go out of bounds if(x >= Map->GetMapWidth() || x < 0) continue; // Don't go out of bounds if(y >= Map->GetMapHeight() || y < 0) continue; if((x >= Map->GetMapWidth() || x < 0) && (y >= Map->GetMapHeight() || y < 0)) return NULL; if(!Map->GetTile(0, x, y)->bIsOccupied) return Map->GetTile(0, x, y); } } nLayer++; } } bool CUnit::MoveUnit(float fElapsedTime) { PROFILE("CUnit::MoveUnit(float)"); m_fMovementTimer += fElapsedTime; POINT ptStart = m_pCurrentTile->ptLocalAnchor; POINT ptEnd = m_pNextTile->ptLocalAnchor; float fPercent = m_fMovementTimer/(1/m_fMovementSpeed) ; if(fPercent >=1) { SetPosX((float)ptEnd.x); SetPosY((float)ptEnd.y); m_fMovementTimer = 0.f; return true; } int xPos = (int)Lerp((float)ptStart.x, (float)ptEnd.x, fPercent); int yPos = (int)Lerp((float)ptStart.y, (float)ptEnd.y, fPercent); SetPosX((float)xPos); SetPosY((float)yPos); return false; } bool CUnit::IsTargetInRange() { PROFILE("CUnit::IsTargetInRange()"); if((m_pTarget->m_pCurrentTile->ptTileLoc.x <= m_pCurrentTile->ptTileLoc.x + m_nRange && m_pTarget->m_pCurrentTile->ptTileLoc.x >= m_pCurrentTile->ptTileLoc.x - m_nRange) && (m_pTarget->m_pCurrentTile->ptTileLoc.y <= m_pCurrentTile->ptTileLoc.y + m_nRange && m_pTarget->m_pCurrentTile->ptTileLoc.y >= m_pCurrentTile->ptTileLoc.y - m_nRange)) return true; return false; } bool CUnit::IsTargetInView() { PROFILE("CUnit::IsTargetInView()"); if((m_pTarget->m_pCurrentTile->ptTileLoc.x <= m_pCurrentTile->ptTileLoc.x + VISIBILITY && m_pTarget->m_pCurrentTile->ptTileLoc.x >= m_pCurrentTile->ptTileLoc.x - VISIBILITY) && (m_pTarget->m_pCurrentTile->ptTileLoc.y <= m_pCurrentTile->ptTileLoc.y + VISIBILITY && m_pTarget->m_pCurrentTile->ptTileLoc.y >= m_pCurrentTile->ptTileLoc.y - VISIBILITY)) return true; return false; } bool CUnit::IsTileAdjacent(CTile* pTile1, CTile* pTile2) { PROFILE("CUnit::IsTileAdjacent(CTile*, CTile*)"); if((pTile1->ptTileLoc.x <= pTile2->ptTileLoc.x + 1 && pTile1->ptTileLoc.x >= pTile2->ptTileLoc.x - 1) && (pTile1->ptTileLoc.y <= pTile2->ptTileLoc.y + 1 && pTile1->ptTileLoc.y >= pTile2->ptTileLoc.y - 1)) return true; return false; }
[ "[email protected]@631b4192-2952-0410-9426-c5ed74a7d3ec", "[email protected]@631b4192-2952-0410-9426-c5ed74a7d3ec", "[email protected]@631b4192-2952-0410-9426-c5ed74a7d3ec", "[email protected]@631b4192-2952-0410-9426-c5ed74a7d3ec", "[email protected]@631b4192-2952-0410-9426-c5ed74a7d3ec" ]
[ [ [ 1, 2 ], [ 7, 13 ], [ 15, 17 ], [ 19, 25 ], [ 27, 27 ], [ 29, 35 ], [ 37, 46 ], [ 50, 54 ], [ 56, 62 ], [ 64, 102 ], [ 104, 124 ], [ 126, 163 ], [ 166, 172 ], [ 174, 178 ], [ 180, 215 ], [ 217, 306 ], [ 310, 337 ], [ 339, 356 ], [ 358, 399 ], [ 401, 429 ], [ 431, 434 ], [ 436, 459 ], [ 461, 479 ], [ 481, 484 ], [ 486, 486 ], [ 488, 490 ], [ 492, 500 ], [ 502, 502 ], [ 504, 508 ], [ 511, 565 ], [ 567, 567 ], [ 570, 594 ], [ 596, 601 ], [ 603, 607 ], [ 611, 611 ], [ 614, 614 ], [ 616, 618 ], [ 622, 622 ], [ 626, 626 ], [ 628, 630 ], [ 634, 634 ], [ 638, 638 ], [ 640, 642 ], [ 646, 646 ], [ 650, 650 ], [ 652, 654 ], [ 658, 658 ], [ 662, 662 ], [ 664, 666 ], [ 670, 670 ], [ 674, 674 ], [ 676, 678 ], [ 682, 682 ], [ 686, 686 ], [ 688, 690 ], [ 694, 694 ], [ 699, 701 ], [ 703, 724 ], [ 726, 768 ], [ 770, 810 ], [ 812, 832 ], [ 834, 845 ], [ 847, 857 ], [ 859, 867 ] ], [ [ 3, 3 ], [ 216, 216 ], [ 485, 485 ], [ 491, 491 ], [ 609, 610 ], [ 612, 613 ], [ 615, 615 ], [ 619, 620 ], [ 632, 633 ], [ 636, 637 ], [ 639, 639 ], [ 643, 644 ], [ 656, 657 ], [ 660, 661 ], [ 663, 663 ], [ 667, 668 ], [ 680, 680 ], [ 692, 692 ] ], [ [ 4, 6 ], [ 18, 18 ], [ 28, 28 ], [ 47, 47 ], [ 487, 487 ], [ 501, 501 ], [ 510, 510 ], [ 566, 566 ], [ 568, 568 ], [ 602, 602 ], [ 608, 608 ], [ 621, 621 ], [ 623, 625 ], [ 627, 627 ], [ 631, 631 ], [ 635, 635 ], [ 645, 645 ], [ 647, 649 ], [ 651, 651 ], [ 655, 655 ], [ 659, 659 ], [ 669, 669 ], [ 671, 673 ], [ 675, 675 ], [ 679, 679 ], [ 681, 681 ], [ 683, 685 ], [ 687, 687 ], [ 691, 691 ], [ 693, 693 ], [ 695, 697 ] ], [ [ 14, 14 ], [ 55, 55 ], [ 63, 63 ], [ 103, 103 ], [ 460, 460 ], [ 480, 480 ], [ 509, 509 ], [ 569, 569 ], [ 595, 595 ], [ 702, 702 ], [ 725, 725 ], [ 769, 769 ], [ 811, 811 ], [ 833, 833 ], [ 846, 846 ], [ 858, 858 ] ], [ [ 26, 26 ], [ 36, 36 ], [ 48, 49 ], [ 125, 125 ], [ 164, 165 ], [ 173, 173 ], [ 179, 179 ], [ 307, 309 ], [ 338, 338 ], [ 357, 357 ], [ 400, 400 ], [ 430, 430 ], [ 435, 435 ], [ 503, 503 ], [ 698, 698 ] ] ]
9a0da5243608b367a9a6293198ba879eeedaeeac
9152cb31fbe4e82c22092bb3071b2ec8c6ae86ab
/demos/rtc/RTCSAMPLE/rtccore.h
fe6de45a9534d072cd4adffc36fb2104107f30e3
[]
no_license
zzjs2001702/sfsipua-svn
ca3051b53549066494f6264e8f3bf300b8090d17
e8768338340254aa287bf37cf620e2c68e4ff844
refs/heads/master
2022-01-09T20:02:20.777586
2006-03-29T13:24:02
2006-03-29T13:24:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
583,193
h
/* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 6.00.0366 */ /* at Fri Feb 24 21:15:12 2006 */ /* Compiler settings for rtccore.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ //@@MIDL_FILE_HEADING( ) #pragma warning( disable: 4049 ) /* more than 64k source lines */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 #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 __rtccore_h__ #define __rtccore_h__ #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* Forward Declarations */ #ifndef __IRTCClient_FWD_DEFINED__ #define __IRTCClient_FWD_DEFINED__ typedef interface IRTCClient IRTCClient; #endif /* __IRTCClient_FWD_DEFINED__ */ #ifndef __IRTCClient2_FWD_DEFINED__ #define __IRTCClient2_FWD_DEFINED__ typedef interface IRTCClient2 IRTCClient2; #endif /* __IRTCClient2_FWD_DEFINED__ */ #ifndef __IRTCClientPresence_FWD_DEFINED__ #define __IRTCClientPresence_FWD_DEFINED__ typedef interface IRTCClientPresence IRTCClientPresence; #endif /* __IRTCClientPresence_FWD_DEFINED__ */ #ifndef __IRTCClientPresence2_FWD_DEFINED__ #define __IRTCClientPresence2_FWD_DEFINED__ typedef interface IRTCClientPresence2 IRTCClientPresence2; #endif /* __IRTCClientPresence2_FWD_DEFINED__ */ #ifndef __IRTCClientProvisioning_FWD_DEFINED__ #define __IRTCClientProvisioning_FWD_DEFINED__ typedef interface IRTCClientProvisioning IRTCClientProvisioning; #endif /* __IRTCClientProvisioning_FWD_DEFINED__ */ #ifndef __IRTCClientProvisioning2_FWD_DEFINED__ #define __IRTCClientProvisioning2_FWD_DEFINED__ typedef interface IRTCClientProvisioning2 IRTCClientProvisioning2; #endif /* __IRTCClientProvisioning2_FWD_DEFINED__ */ #ifndef __IRTCProfile_FWD_DEFINED__ #define __IRTCProfile_FWD_DEFINED__ typedef interface IRTCProfile IRTCProfile; #endif /* __IRTCProfile_FWD_DEFINED__ */ #ifndef __IRTCProfile2_FWD_DEFINED__ #define __IRTCProfile2_FWD_DEFINED__ typedef interface IRTCProfile2 IRTCProfile2; #endif /* __IRTCProfile2_FWD_DEFINED__ */ #ifndef __IRTCProfile3_FWD_DEFINED__ #define __IRTCProfile3_FWD_DEFINED__ typedef interface IRTCProfile3 IRTCProfile3; #endif /* __IRTCProfile3_FWD_DEFINED__ */ #ifndef __IRTCSession_FWD_DEFINED__ #define __IRTCSession_FWD_DEFINED__ typedef interface IRTCSession IRTCSession; #endif /* __IRTCSession_FWD_DEFINED__ */ #ifndef __IRTCSession2_FWD_DEFINED__ #define __IRTCSession2_FWD_DEFINED__ typedef interface IRTCSession2 IRTCSession2; #endif /* __IRTCSession2_FWD_DEFINED__ */ #ifndef __IRTCSession3_FWD_DEFINED__ #define __IRTCSession3_FWD_DEFINED__ typedef interface IRTCSession3 IRTCSession3; #endif /* __IRTCSession3_FWD_DEFINED__ */ #ifndef __IRTCSessionCallControl_FWD_DEFINED__ #define __IRTCSessionCallControl_FWD_DEFINED__ typedef interface IRTCSessionCallControl IRTCSessionCallControl; #endif /* __IRTCSessionCallControl_FWD_DEFINED__ */ #ifndef __IRTCParticipant_FWD_DEFINED__ #define __IRTCParticipant_FWD_DEFINED__ typedef interface IRTCParticipant IRTCParticipant; #endif /* __IRTCParticipant_FWD_DEFINED__ */ #ifndef __IRTCParticipant2_FWD_DEFINED__ #define __IRTCParticipant2_FWD_DEFINED__ typedef interface IRTCParticipant2 IRTCParticipant2; #endif /* __IRTCParticipant2_FWD_DEFINED__ */ #ifndef __IRTCRoamingEvent_FWD_DEFINED__ #define __IRTCRoamingEvent_FWD_DEFINED__ typedef interface IRTCRoamingEvent IRTCRoamingEvent; #endif /* __IRTCRoamingEvent_FWD_DEFINED__ */ #ifndef __IRTCProfileEvent_FWD_DEFINED__ #define __IRTCProfileEvent_FWD_DEFINED__ typedef interface IRTCProfileEvent IRTCProfileEvent; #endif /* __IRTCProfileEvent_FWD_DEFINED__ */ #ifndef __IRTCProfileEvent2_FWD_DEFINED__ #define __IRTCProfileEvent2_FWD_DEFINED__ typedef interface IRTCProfileEvent2 IRTCProfileEvent2; #endif /* __IRTCProfileEvent2_FWD_DEFINED__ */ #ifndef __IRTCClientEvent_FWD_DEFINED__ #define __IRTCClientEvent_FWD_DEFINED__ typedef interface IRTCClientEvent IRTCClientEvent; #endif /* __IRTCClientEvent_FWD_DEFINED__ */ #ifndef __IRTCRegistrationStateChangeEvent_FWD_DEFINED__ #define __IRTCRegistrationStateChangeEvent_FWD_DEFINED__ typedef interface IRTCRegistrationStateChangeEvent IRTCRegistrationStateChangeEvent; #endif /* __IRTCRegistrationStateChangeEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionStateChangeEvent_FWD_DEFINED__ #define __IRTCSessionStateChangeEvent_FWD_DEFINED__ typedef interface IRTCSessionStateChangeEvent IRTCSessionStateChangeEvent; #endif /* __IRTCSessionStateChangeEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionStateChangeEvent2_FWD_DEFINED__ #define __IRTCSessionStateChangeEvent2_FWD_DEFINED__ typedef interface IRTCSessionStateChangeEvent2 IRTCSessionStateChangeEvent2; #endif /* __IRTCSessionStateChangeEvent2_FWD_DEFINED__ */ #ifndef __IRTCSessionOperationCompleteEvent_FWD_DEFINED__ #define __IRTCSessionOperationCompleteEvent_FWD_DEFINED__ typedef interface IRTCSessionOperationCompleteEvent IRTCSessionOperationCompleteEvent; #endif /* __IRTCSessionOperationCompleteEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionOperationCompleteEvent2_FWD_DEFINED__ #define __IRTCSessionOperationCompleteEvent2_FWD_DEFINED__ typedef interface IRTCSessionOperationCompleteEvent2 IRTCSessionOperationCompleteEvent2; #endif /* __IRTCSessionOperationCompleteEvent2_FWD_DEFINED__ */ #ifndef __IRTCParticipantStateChangeEvent_FWD_DEFINED__ #define __IRTCParticipantStateChangeEvent_FWD_DEFINED__ typedef interface IRTCParticipantStateChangeEvent IRTCParticipantStateChangeEvent; #endif /* __IRTCParticipantStateChangeEvent_FWD_DEFINED__ */ #ifndef __IRTCMediaEvent_FWD_DEFINED__ #define __IRTCMediaEvent_FWD_DEFINED__ typedef interface IRTCMediaEvent IRTCMediaEvent; #endif /* __IRTCMediaEvent_FWD_DEFINED__ */ #ifndef __IRTCIntensityEvent_FWD_DEFINED__ #define __IRTCIntensityEvent_FWD_DEFINED__ typedef interface IRTCIntensityEvent IRTCIntensityEvent; #endif /* __IRTCIntensityEvent_FWD_DEFINED__ */ #ifndef __IRTCMessagingEvent_FWD_DEFINED__ #define __IRTCMessagingEvent_FWD_DEFINED__ typedef interface IRTCMessagingEvent IRTCMessagingEvent; #endif /* __IRTCMessagingEvent_FWD_DEFINED__ */ #ifndef __IRTCBuddyEvent_FWD_DEFINED__ #define __IRTCBuddyEvent_FWD_DEFINED__ typedef interface IRTCBuddyEvent IRTCBuddyEvent; #endif /* __IRTCBuddyEvent_FWD_DEFINED__ */ #ifndef __IRTCBuddyEvent2_FWD_DEFINED__ #define __IRTCBuddyEvent2_FWD_DEFINED__ typedef interface IRTCBuddyEvent2 IRTCBuddyEvent2; #endif /* __IRTCBuddyEvent2_FWD_DEFINED__ */ #ifndef __IRTCWatcherEvent_FWD_DEFINED__ #define __IRTCWatcherEvent_FWD_DEFINED__ typedef interface IRTCWatcherEvent IRTCWatcherEvent; #endif /* __IRTCWatcherEvent_FWD_DEFINED__ */ #ifndef __IRTCWatcherEvent2_FWD_DEFINED__ #define __IRTCWatcherEvent2_FWD_DEFINED__ typedef interface IRTCWatcherEvent2 IRTCWatcherEvent2; #endif /* __IRTCWatcherEvent2_FWD_DEFINED__ */ #ifndef __IRTCBuddyGroupEvent_FWD_DEFINED__ #define __IRTCBuddyGroupEvent_FWD_DEFINED__ typedef interface IRTCBuddyGroupEvent IRTCBuddyGroupEvent; #endif /* __IRTCBuddyGroupEvent_FWD_DEFINED__ */ #ifndef __IRTCInfoEvent_FWD_DEFINED__ #define __IRTCInfoEvent_FWD_DEFINED__ typedef interface IRTCInfoEvent IRTCInfoEvent; #endif /* __IRTCInfoEvent_FWD_DEFINED__ */ #ifndef __IRTCMediaRequestEvent_FWD_DEFINED__ #define __IRTCMediaRequestEvent_FWD_DEFINED__ typedef interface IRTCMediaRequestEvent IRTCMediaRequestEvent; #endif /* __IRTCMediaRequestEvent_FWD_DEFINED__ */ #ifndef __IRTCReInviteEvent_FWD_DEFINED__ #define __IRTCReInviteEvent_FWD_DEFINED__ typedef interface IRTCReInviteEvent IRTCReInviteEvent; #endif /* __IRTCReInviteEvent_FWD_DEFINED__ */ #ifndef __IRTCPresencePropertyEvent_FWD_DEFINED__ #define __IRTCPresencePropertyEvent_FWD_DEFINED__ typedef interface IRTCPresencePropertyEvent IRTCPresencePropertyEvent; #endif /* __IRTCPresencePropertyEvent_FWD_DEFINED__ */ #ifndef __IRTCPresenceDataEvent_FWD_DEFINED__ #define __IRTCPresenceDataEvent_FWD_DEFINED__ typedef interface IRTCPresenceDataEvent IRTCPresenceDataEvent; #endif /* __IRTCPresenceDataEvent_FWD_DEFINED__ */ #ifndef __IRTCPresenceStatusEvent_FWD_DEFINED__ #define __IRTCPresenceStatusEvent_FWD_DEFINED__ typedef interface IRTCPresenceStatusEvent IRTCPresenceStatusEvent; #endif /* __IRTCPresenceStatusEvent_FWD_DEFINED__ */ #ifndef __IRTCCollection_FWD_DEFINED__ #define __IRTCCollection_FWD_DEFINED__ typedef interface IRTCCollection IRTCCollection; #endif /* __IRTCCollection_FWD_DEFINED__ */ #ifndef __IRTCEnumParticipants_FWD_DEFINED__ #define __IRTCEnumParticipants_FWD_DEFINED__ typedef interface IRTCEnumParticipants IRTCEnumParticipants; #endif /* __IRTCEnumParticipants_FWD_DEFINED__ */ #ifndef __IRTCEnumProfiles_FWD_DEFINED__ #define __IRTCEnumProfiles_FWD_DEFINED__ typedef interface IRTCEnumProfiles IRTCEnumProfiles; #endif /* __IRTCEnumProfiles_FWD_DEFINED__ */ #ifndef __IRTCEnumBuddies_FWD_DEFINED__ #define __IRTCEnumBuddies_FWD_DEFINED__ typedef interface IRTCEnumBuddies IRTCEnumBuddies; #endif /* __IRTCEnumBuddies_FWD_DEFINED__ */ #ifndef __IRTCEnumWatchers_FWD_DEFINED__ #define __IRTCEnumWatchers_FWD_DEFINED__ typedef interface IRTCEnumWatchers IRTCEnumWatchers; #endif /* __IRTCEnumWatchers_FWD_DEFINED__ */ #ifndef __IRTCEnumGroups_FWD_DEFINED__ #define __IRTCEnumGroups_FWD_DEFINED__ typedef interface IRTCEnumGroups IRTCEnumGroups; #endif /* __IRTCEnumGroups_FWD_DEFINED__ */ #ifndef __IRTCPresenceContact_FWD_DEFINED__ #define __IRTCPresenceContact_FWD_DEFINED__ typedef interface IRTCPresenceContact IRTCPresenceContact; #endif /* __IRTCPresenceContact_FWD_DEFINED__ */ #ifndef __IRTCBuddy_FWD_DEFINED__ #define __IRTCBuddy_FWD_DEFINED__ typedef interface IRTCBuddy IRTCBuddy; #endif /* __IRTCBuddy_FWD_DEFINED__ */ #ifndef __IRTCBuddy2_FWD_DEFINED__ #define __IRTCBuddy2_FWD_DEFINED__ typedef interface IRTCBuddy2 IRTCBuddy2; #endif /* __IRTCBuddy2_FWD_DEFINED__ */ #ifndef __IRTCWatcher_FWD_DEFINED__ #define __IRTCWatcher_FWD_DEFINED__ typedef interface IRTCWatcher IRTCWatcher; #endif /* __IRTCWatcher_FWD_DEFINED__ */ #ifndef __IRTCWatcher2_FWD_DEFINED__ #define __IRTCWatcher2_FWD_DEFINED__ typedef interface IRTCWatcher2 IRTCWatcher2; #endif /* __IRTCWatcher2_FWD_DEFINED__ */ #ifndef __IRTCBuddyGroup_FWD_DEFINED__ #define __IRTCBuddyGroup_FWD_DEFINED__ typedef interface IRTCBuddyGroup IRTCBuddyGroup; #endif /* __IRTCBuddyGroup_FWD_DEFINED__ */ #ifndef __IRTCEventNotification_FWD_DEFINED__ #define __IRTCEventNotification_FWD_DEFINED__ typedef interface IRTCEventNotification IRTCEventNotification; #endif /* __IRTCEventNotification_FWD_DEFINED__ */ #ifndef __IRTCDispatchEventNotification_FWD_DEFINED__ #define __IRTCDispatchEventNotification_FWD_DEFINED__ typedef interface IRTCDispatchEventNotification IRTCDispatchEventNotification; #endif /* __IRTCDispatchEventNotification_FWD_DEFINED__ */ #ifndef __IRTCPortManager_FWD_DEFINED__ #define __IRTCPortManager_FWD_DEFINED__ typedef interface IRTCPortManager IRTCPortManager; #endif /* __IRTCPortManager_FWD_DEFINED__ */ #ifndef __IRTCPortManager2_FWD_DEFINED__ #define __IRTCPortManager2_FWD_DEFINED__ typedef interface IRTCPortManager2 IRTCPortManager2; #endif /* __IRTCPortManager2_FWD_DEFINED__ */ #ifndef __IRTCSessionPortManagement_FWD_DEFINED__ #define __IRTCSessionPortManagement_FWD_DEFINED__ typedef interface IRTCSessionPortManagement IRTCSessionPortManagement; #endif /* __IRTCSessionPortManagement_FWD_DEFINED__ */ #ifndef __IRTCClientPortManagement_FWD_DEFINED__ #define __IRTCClientPortManagement_FWD_DEFINED__ typedef interface IRTCClientPortManagement IRTCClientPortManagement; #endif /* __IRTCClientPortManagement_FWD_DEFINED__ */ #ifndef __IRTCUserSearch_FWD_DEFINED__ #define __IRTCUserSearch_FWD_DEFINED__ typedef interface IRTCUserSearch IRTCUserSearch; #endif /* __IRTCUserSearch_FWD_DEFINED__ */ #ifndef __IRTCUserSearchQuery_FWD_DEFINED__ #define __IRTCUserSearchQuery_FWD_DEFINED__ typedef interface IRTCUserSearchQuery IRTCUserSearchQuery; #endif /* __IRTCUserSearchQuery_FWD_DEFINED__ */ #ifndef __IRTCUserSearchResult_FWD_DEFINED__ #define __IRTCUserSearchResult_FWD_DEFINED__ typedef interface IRTCUserSearchResult IRTCUserSearchResult; #endif /* __IRTCUserSearchResult_FWD_DEFINED__ */ #ifndef __IRTCEnumUserSearchResults_FWD_DEFINED__ #define __IRTCEnumUserSearchResults_FWD_DEFINED__ typedef interface IRTCEnumUserSearchResults IRTCEnumUserSearchResults; #endif /* __IRTCEnumUserSearchResults_FWD_DEFINED__ */ #ifndef __IRTCUserSearchResultsEvent_FWD_DEFINED__ #define __IRTCUserSearchResultsEvent_FWD_DEFINED__ typedef interface IRTCUserSearchResultsEvent IRTCUserSearchResultsEvent; #endif /* __IRTCUserSearchResultsEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionReferStatusEvent_FWD_DEFINED__ #define __IRTCSessionReferStatusEvent_FWD_DEFINED__ typedef interface IRTCSessionReferStatusEvent IRTCSessionReferStatusEvent; #endif /* __IRTCSessionReferStatusEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionReferredEvent_FWD_DEFINED__ #define __IRTCSessionReferredEvent_FWD_DEFINED__ typedef interface IRTCSessionReferredEvent IRTCSessionReferredEvent; #endif /* __IRTCSessionReferredEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionDescriptionManager_FWD_DEFINED__ #define __IRTCSessionDescriptionManager_FWD_DEFINED__ typedef interface IRTCSessionDescriptionManager IRTCSessionDescriptionManager; #endif /* __IRTCSessionDescriptionManager_FWD_DEFINED__ */ #ifndef __IRTCEnumPresenceDevices_FWD_DEFINED__ #define __IRTCEnumPresenceDevices_FWD_DEFINED__ typedef interface IRTCEnumPresenceDevices IRTCEnumPresenceDevices; #endif /* __IRTCEnumPresenceDevices_FWD_DEFINED__ */ #ifndef __IRTCPresenceDevice_FWD_DEFINED__ #define __IRTCPresenceDevice_FWD_DEFINED__ typedef interface IRTCPresenceDevice IRTCPresenceDevice; #endif /* __IRTCPresenceDevice_FWD_DEFINED__ */ #ifndef __IRTCPresenceDevice2_FWD_DEFINED__ #define __IRTCPresenceDevice2_FWD_DEFINED__ typedef interface IRTCPresenceDevice2 IRTCPresenceDevice2; #endif /* __IRTCPresenceDevice2_FWD_DEFINED__ */ #ifndef __IRTCProfile_FWD_DEFINED__ #define __IRTCProfile_FWD_DEFINED__ typedef interface IRTCProfile IRTCProfile; #endif /* __IRTCProfile_FWD_DEFINED__ */ #ifndef __IRTCProfile2_FWD_DEFINED__ #define __IRTCProfile2_FWD_DEFINED__ typedef interface IRTCProfile2 IRTCProfile2; #endif /* __IRTCProfile2_FWD_DEFINED__ */ #ifndef __IRTCProfile3_FWD_DEFINED__ #define __IRTCProfile3_FWD_DEFINED__ typedef interface IRTCProfile3 IRTCProfile3; #endif /* __IRTCProfile3_FWD_DEFINED__ */ #ifndef __IRTCEnumProfiles_FWD_DEFINED__ #define __IRTCEnumProfiles_FWD_DEFINED__ typedef interface IRTCEnumProfiles IRTCEnumProfiles; #endif /* __IRTCEnumProfiles_FWD_DEFINED__ */ #ifndef __IRTCSession_FWD_DEFINED__ #define __IRTCSession_FWD_DEFINED__ typedef interface IRTCSession IRTCSession; #endif /* __IRTCSession_FWD_DEFINED__ */ #ifndef __IRTCSession2_FWD_DEFINED__ #define __IRTCSession2_FWD_DEFINED__ typedef interface IRTCSession2 IRTCSession2; #endif /* __IRTCSession2_FWD_DEFINED__ */ #ifndef __IRTCSession3_FWD_DEFINED__ #define __IRTCSession3_FWD_DEFINED__ typedef interface IRTCSession3 IRTCSession3; #endif /* __IRTCSession3_FWD_DEFINED__ */ #ifndef __IRTCSessionCallControl_FWD_DEFINED__ #define __IRTCSessionCallControl_FWD_DEFINED__ typedef interface IRTCSessionCallControl IRTCSessionCallControl; #endif /* __IRTCSessionCallControl_FWD_DEFINED__ */ #ifndef __IRTCParticipant_FWD_DEFINED__ #define __IRTCParticipant_FWD_DEFINED__ typedef interface IRTCParticipant IRTCParticipant; #endif /* __IRTCParticipant_FWD_DEFINED__ */ #ifndef __IRTCParticipant2_FWD_DEFINED__ #define __IRTCParticipant2_FWD_DEFINED__ typedef interface IRTCParticipant2 IRTCParticipant2; #endif /* __IRTCParticipant2_FWD_DEFINED__ */ #ifndef __IRTCEnumParticipants_FWD_DEFINED__ #define __IRTCEnumParticipants_FWD_DEFINED__ typedef interface IRTCEnumParticipants IRTCEnumParticipants; #endif /* __IRTCEnumParticipants_FWD_DEFINED__ */ #ifndef __IRTCCollection_FWD_DEFINED__ #define __IRTCCollection_FWD_DEFINED__ typedef interface IRTCCollection IRTCCollection; #endif /* __IRTCCollection_FWD_DEFINED__ */ #ifndef __IRTCPresenceContact_FWD_DEFINED__ #define __IRTCPresenceContact_FWD_DEFINED__ typedef interface IRTCPresenceContact IRTCPresenceContact; #endif /* __IRTCPresenceContact_FWD_DEFINED__ */ #ifndef __IRTCBuddy_FWD_DEFINED__ #define __IRTCBuddy_FWD_DEFINED__ typedef interface IRTCBuddy IRTCBuddy; #endif /* __IRTCBuddy_FWD_DEFINED__ */ #ifndef __IRTCBuddy2_FWD_DEFINED__ #define __IRTCBuddy2_FWD_DEFINED__ typedef interface IRTCBuddy2 IRTCBuddy2; #endif /* __IRTCBuddy2_FWD_DEFINED__ */ #ifndef __IRTCEnumBuddies_FWD_DEFINED__ #define __IRTCEnumBuddies_FWD_DEFINED__ typedef interface IRTCEnumBuddies IRTCEnumBuddies; #endif /* __IRTCEnumBuddies_FWD_DEFINED__ */ #ifndef __IRTCWatcher_FWD_DEFINED__ #define __IRTCWatcher_FWD_DEFINED__ typedef interface IRTCWatcher IRTCWatcher; #endif /* __IRTCWatcher_FWD_DEFINED__ */ #ifndef __IRTCWatcher2_FWD_DEFINED__ #define __IRTCWatcher2_FWD_DEFINED__ typedef interface IRTCWatcher2 IRTCWatcher2; #endif /* __IRTCWatcher2_FWD_DEFINED__ */ #ifndef __IRTCEnumWatchers_FWD_DEFINED__ #define __IRTCEnumWatchers_FWD_DEFINED__ typedef interface IRTCEnumWatchers IRTCEnumWatchers; #endif /* __IRTCEnumWatchers_FWD_DEFINED__ */ #ifndef __IRTCBuddyGroup_FWD_DEFINED__ #define __IRTCBuddyGroup_FWD_DEFINED__ typedef interface IRTCBuddyGroup IRTCBuddyGroup; #endif /* __IRTCBuddyGroup_FWD_DEFINED__ */ #ifndef __IRTCEnumGroups_FWD_DEFINED__ #define __IRTCEnumGroups_FWD_DEFINED__ typedef interface IRTCEnumGroups IRTCEnumGroups; #endif /* __IRTCEnumGroups_FWD_DEFINED__ */ #ifndef __IRTCUserSearchQuery_FWD_DEFINED__ #define __IRTCUserSearchQuery_FWD_DEFINED__ typedef interface IRTCUserSearchQuery IRTCUserSearchQuery; #endif /* __IRTCUserSearchQuery_FWD_DEFINED__ */ #ifndef __IRTCUserSearchResult_FWD_DEFINED__ #define __IRTCUserSearchResult_FWD_DEFINED__ typedef interface IRTCUserSearchResult IRTCUserSearchResult; #endif /* __IRTCUserSearchResult_FWD_DEFINED__ */ #ifndef __IRTCEnumUserSearchResults_FWD_DEFINED__ #define __IRTCEnumUserSearchResults_FWD_DEFINED__ typedef interface IRTCEnumUserSearchResults IRTCEnumUserSearchResults; #endif /* __IRTCEnumUserSearchResults_FWD_DEFINED__ */ #ifndef __IRTCEventNotification_FWD_DEFINED__ #define __IRTCEventNotification_FWD_DEFINED__ typedef interface IRTCEventNotification IRTCEventNotification; #endif /* __IRTCEventNotification_FWD_DEFINED__ */ #ifndef __IRTCClientEvent_FWD_DEFINED__ #define __IRTCClientEvent_FWD_DEFINED__ typedef interface IRTCClientEvent IRTCClientEvent; #endif /* __IRTCClientEvent_FWD_DEFINED__ */ #ifndef __IRTCRegistrationStateChangeEvent_FWD_DEFINED__ #define __IRTCRegistrationStateChangeEvent_FWD_DEFINED__ typedef interface IRTCRegistrationStateChangeEvent IRTCRegistrationStateChangeEvent; #endif /* __IRTCRegistrationStateChangeEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionStateChangeEvent_FWD_DEFINED__ #define __IRTCSessionStateChangeEvent_FWD_DEFINED__ typedef interface IRTCSessionStateChangeEvent IRTCSessionStateChangeEvent; #endif /* __IRTCSessionStateChangeEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionStateChangeEvent2_FWD_DEFINED__ #define __IRTCSessionStateChangeEvent2_FWD_DEFINED__ typedef interface IRTCSessionStateChangeEvent2 IRTCSessionStateChangeEvent2; #endif /* __IRTCSessionStateChangeEvent2_FWD_DEFINED__ */ #ifndef __IRTCSessionOperationCompleteEvent_FWD_DEFINED__ #define __IRTCSessionOperationCompleteEvent_FWD_DEFINED__ typedef interface IRTCSessionOperationCompleteEvent IRTCSessionOperationCompleteEvent; #endif /* __IRTCSessionOperationCompleteEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionOperationCompleteEvent2_FWD_DEFINED__ #define __IRTCSessionOperationCompleteEvent2_FWD_DEFINED__ typedef interface IRTCSessionOperationCompleteEvent2 IRTCSessionOperationCompleteEvent2; #endif /* __IRTCSessionOperationCompleteEvent2_FWD_DEFINED__ */ #ifndef __IRTCParticipantStateChangeEvent_FWD_DEFINED__ #define __IRTCParticipantStateChangeEvent_FWD_DEFINED__ typedef interface IRTCParticipantStateChangeEvent IRTCParticipantStateChangeEvent; #endif /* __IRTCParticipantStateChangeEvent_FWD_DEFINED__ */ #ifndef __IRTCMediaEvent_FWD_DEFINED__ #define __IRTCMediaEvent_FWD_DEFINED__ typedef interface IRTCMediaEvent IRTCMediaEvent; #endif /* __IRTCMediaEvent_FWD_DEFINED__ */ #ifndef __IRTCIntensityEvent_FWD_DEFINED__ #define __IRTCIntensityEvent_FWD_DEFINED__ typedef interface IRTCIntensityEvent IRTCIntensityEvent; #endif /* __IRTCIntensityEvent_FWD_DEFINED__ */ #ifndef __IRTCMessagingEvent_FWD_DEFINED__ #define __IRTCMessagingEvent_FWD_DEFINED__ typedef interface IRTCMessagingEvent IRTCMessagingEvent; #endif /* __IRTCMessagingEvent_FWD_DEFINED__ */ #ifndef __IRTCBuddyEvent_FWD_DEFINED__ #define __IRTCBuddyEvent_FWD_DEFINED__ typedef interface IRTCBuddyEvent IRTCBuddyEvent; #endif /* __IRTCBuddyEvent_FWD_DEFINED__ */ #ifndef __IRTCBuddyEvent2_FWD_DEFINED__ #define __IRTCBuddyEvent2_FWD_DEFINED__ typedef interface IRTCBuddyEvent2 IRTCBuddyEvent2; #endif /* __IRTCBuddyEvent2_FWD_DEFINED__ */ #ifndef __IRTCWatcherEvent_FWD_DEFINED__ #define __IRTCWatcherEvent_FWD_DEFINED__ typedef interface IRTCWatcherEvent IRTCWatcherEvent; #endif /* __IRTCWatcherEvent_FWD_DEFINED__ */ #ifndef __IRTCPortManager_FWD_DEFINED__ #define __IRTCPortManager_FWD_DEFINED__ typedef interface IRTCPortManager IRTCPortManager; #endif /* __IRTCPortManager_FWD_DEFINED__ */ #ifndef __IRTCPortManager2_FWD_DEFINED__ #define __IRTCPortManager2_FWD_DEFINED__ typedef interface IRTCPortManager2 IRTCPortManager2; #endif /* __IRTCPortManager2_FWD_DEFINED__ */ #ifndef __IRTCSessionPortManagement_FWD_DEFINED__ #define __IRTCSessionPortManagement_FWD_DEFINED__ typedef interface IRTCSessionPortManagement IRTCSessionPortManagement; #endif /* __IRTCSessionPortManagement_FWD_DEFINED__ */ #ifndef __IRTCClientPortManagement_FWD_DEFINED__ #define __IRTCClientPortManagement_FWD_DEFINED__ typedef interface IRTCClientPortManagement IRTCClientPortManagement; #endif /* __IRTCClientPortManagement_FWD_DEFINED__ */ #ifndef __IRTCWatcherEvent2_FWD_DEFINED__ #define __IRTCWatcherEvent2_FWD_DEFINED__ typedef interface IRTCWatcherEvent2 IRTCWatcherEvent2; #endif /* __IRTCWatcherEvent2_FWD_DEFINED__ */ #ifndef __IRTCBuddyGroupEvent_FWD_DEFINED__ #define __IRTCBuddyGroupEvent_FWD_DEFINED__ typedef interface IRTCBuddyGroupEvent IRTCBuddyGroupEvent; #endif /* __IRTCBuddyGroupEvent_FWD_DEFINED__ */ #ifndef __IRTCProfileEvent_FWD_DEFINED__ #define __IRTCProfileEvent_FWD_DEFINED__ typedef interface IRTCProfileEvent IRTCProfileEvent; #endif /* __IRTCProfileEvent_FWD_DEFINED__ */ #ifndef __IRTCProfileEvent2_FWD_DEFINED__ #define __IRTCProfileEvent2_FWD_DEFINED__ typedef interface IRTCProfileEvent2 IRTCProfileEvent2; #endif /* __IRTCProfileEvent2_FWD_DEFINED__ */ #ifndef __IRTCUserSearchResultsEvent_FWD_DEFINED__ #define __IRTCUserSearchResultsEvent_FWD_DEFINED__ typedef interface IRTCUserSearchResultsEvent IRTCUserSearchResultsEvent; #endif /* __IRTCUserSearchResultsEvent_FWD_DEFINED__ */ #ifndef __IRTCInfoEvent_FWD_DEFINED__ #define __IRTCInfoEvent_FWD_DEFINED__ typedef interface IRTCInfoEvent IRTCInfoEvent; #endif /* __IRTCInfoEvent_FWD_DEFINED__ */ #ifndef __IRTCRoamingEvent_FWD_DEFINED__ #define __IRTCRoamingEvent_FWD_DEFINED__ typedef interface IRTCRoamingEvent IRTCRoamingEvent; #endif /* __IRTCRoamingEvent_FWD_DEFINED__ */ #ifndef __IRTCMediaRequestEvent_FWD_DEFINED__ #define __IRTCMediaRequestEvent_FWD_DEFINED__ typedef interface IRTCMediaRequestEvent IRTCMediaRequestEvent; #endif /* __IRTCMediaRequestEvent_FWD_DEFINED__ */ #ifndef __IRTCReInviteEvent_FWD_DEFINED__ #define __IRTCReInviteEvent_FWD_DEFINED__ typedef interface IRTCReInviteEvent IRTCReInviteEvent; #endif /* __IRTCReInviteEvent_FWD_DEFINED__ */ #ifndef __IRTCPresencePropertyEvent_FWD_DEFINED__ #define __IRTCPresencePropertyEvent_FWD_DEFINED__ typedef interface IRTCPresencePropertyEvent IRTCPresencePropertyEvent; #endif /* __IRTCPresencePropertyEvent_FWD_DEFINED__ */ #ifndef __IRTCPresenceDataEvent_FWD_DEFINED__ #define __IRTCPresenceDataEvent_FWD_DEFINED__ typedef interface IRTCPresenceDataEvent IRTCPresenceDataEvent; #endif /* __IRTCPresenceDataEvent_FWD_DEFINED__ */ #ifndef __IRTCPresenceStatusEvent_FWD_DEFINED__ #define __IRTCPresenceStatusEvent_FWD_DEFINED__ typedef interface IRTCPresenceStatusEvent IRTCPresenceStatusEvent; #endif /* __IRTCPresenceStatusEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionReferStatusEvent_FWD_DEFINED__ #define __IRTCSessionReferStatusEvent_FWD_DEFINED__ typedef interface IRTCSessionReferStatusEvent IRTCSessionReferStatusEvent; #endif /* __IRTCSessionReferStatusEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionReferredEvent_FWD_DEFINED__ #define __IRTCSessionReferredEvent_FWD_DEFINED__ typedef interface IRTCSessionReferredEvent IRTCSessionReferredEvent; #endif /* __IRTCSessionReferredEvent_FWD_DEFINED__ */ #ifndef __IRTCSessionDescriptionManager_FWD_DEFINED__ #define __IRTCSessionDescriptionManager_FWD_DEFINED__ typedef interface IRTCSessionDescriptionManager IRTCSessionDescriptionManager; #endif /* __IRTCSessionDescriptionManager_FWD_DEFINED__ */ #ifndef __IRTCEnumPresenceDevices_FWD_DEFINED__ #define __IRTCEnumPresenceDevices_FWD_DEFINED__ typedef interface IRTCEnumPresenceDevices IRTCEnumPresenceDevices; #endif /* __IRTCEnumPresenceDevices_FWD_DEFINED__ */ #ifndef __IRTCPresenceDevice_FWD_DEFINED__ #define __IRTCPresenceDevice_FWD_DEFINED__ typedef interface IRTCPresenceDevice IRTCPresenceDevice; #endif /* __IRTCPresenceDevice_FWD_DEFINED__ */ #ifndef __IRTCPresenceDevice2_FWD_DEFINED__ #define __IRTCPresenceDevice2_FWD_DEFINED__ typedef interface IRTCPresenceDevice2 IRTCPresenceDevice2; #endif /* __IRTCPresenceDevice2_FWD_DEFINED__ */ #ifndef __IRTCDispatchEventNotification_FWD_DEFINED__ #define __IRTCDispatchEventNotification_FWD_DEFINED__ typedef interface IRTCDispatchEventNotification IRTCDispatchEventNotification; #endif /* __IRTCDispatchEventNotification_FWD_DEFINED__ */ #ifndef __RTCClient_FWD_DEFINED__ #define __RTCClient_FWD_DEFINED__ #ifdef __cplusplus typedef class RTCClient RTCClient; #else typedef struct RTCClient RTCClient; #endif /* __cplusplus */ #endif /* __RTCClient_FWD_DEFINED__ */ /* header files for imported files */ #include "oaidl.h" #include "ocidl.h" #include "control.h" #ifdef __cplusplus extern "C"{ #endif void * __RPC_USER MIDL_user_allocate(size_t); void __RPC_USER MIDL_user_free( void * ); /* interface __MIDL_itf_rtccore_0000 */ /* [local] */ // Copyright (c) Microsoft Corporation. All rights reserved. typedef enum RTC_AUDIO_DEVICE { RTCAD_SPEAKER = 0, RTCAD_MICROPHONE = RTCAD_SPEAKER + 1 } RTC_AUDIO_DEVICE; typedef enum RTC_VIDEO_DEVICE { RTCVD_RECEIVE = 0, RTCVD_PREVIEW = RTCVD_RECEIVE + 1 } RTC_VIDEO_DEVICE; typedef enum RTC_EVENT { RTCE_CLIENT = 0, RTCE_REGISTRATION_STATE_CHANGE = RTCE_CLIENT + 1, RTCE_SESSION_STATE_CHANGE = RTCE_REGISTRATION_STATE_CHANGE + 1, RTCE_SESSION_OPERATION_COMPLETE = RTCE_SESSION_STATE_CHANGE + 1, RTCE_PARTICIPANT_STATE_CHANGE = RTCE_SESSION_OPERATION_COMPLETE + 1, RTCE_MEDIA = RTCE_PARTICIPANT_STATE_CHANGE + 1, RTCE_INTENSITY = RTCE_MEDIA + 1, RTCE_MESSAGING = RTCE_INTENSITY + 1, RTCE_BUDDY = RTCE_MESSAGING + 1, RTCE_WATCHER = RTCE_BUDDY + 1, RTCE_PROFILE = RTCE_WATCHER + 1, RTCE_USERSEARCH = RTCE_PROFILE + 1, RTCE_INFO = RTCE_USERSEARCH + 1, RTCE_GROUP = RTCE_INFO + 1, RTCE_MEDIA_REQUEST = RTCE_GROUP + 1, RTCE_ROAMING = RTCE_MEDIA_REQUEST + 1, RTCE_PRESENCE_PROPERTY = RTCE_ROAMING + 1, RTCE_PRESENCE_DATA = RTCE_PRESENCE_PROPERTY + 1, RTCE_PRESENCE_STATUS = RTCE_PRESENCE_DATA + 1, RTCE_SESSION_REFER_STATUS = RTCE_PRESENCE_STATUS + 1, RTCE_SESSION_REFERRED = RTCE_SESSION_REFER_STATUS + 1, RTCE_REINVITE = RTCE_SESSION_REFERRED + 1 } RTC_EVENT; typedef enum RTC_LISTEN_MODE { RTCLM_NONE = 0, RTCLM_DYNAMIC = RTCLM_NONE + 1, RTCLM_BOTH = RTCLM_DYNAMIC + 1 } RTC_LISTEN_MODE; typedef enum RTC_CLIENT_EVENT_TYPE { RTCCET_VOLUME_CHANGE = 0, RTCCET_DEVICE_CHANGE = RTCCET_VOLUME_CHANGE + 1, RTCCET_NETWORK_QUALITY_CHANGE = RTCCET_DEVICE_CHANGE + 1, RTCCET_ASYNC_CLEANUP_DONE = RTCCET_NETWORK_QUALITY_CHANGE + 1 } RTC_CLIENT_EVENT_TYPE; typedef enum RTC_BUDDY_EVENT_TYPE { RTCBET_BUDDY_ADD = 0, RTCBET_BUDDY_REMOVE = RTCBET_BUDDY_ADD + 1, RTCBET_BUDDY_UPDATE = RTCBET_BUDDY_REMOVE + 1, RTCBET_BUDDY_STATE_CHANGE = RTCBET_BUDDY_UPDATE + 1, RTCBET_BUDDY_ROAMED = RTCBET_BUDDY_STATE_CHANGE + 1, RTCBET_BUDDY_SUBSCRIBED = RTCBET_BUDDY_ROAMED + 1 } RTC_BUDDY_EVENT_TYPE; typedef enum RTC_WATCHER_EVENT_TYPE { RTCWET_WATCHER_ADD = 0, RTCWET_WATCHER_REMOVE = RTCWET_WATCHER_ADD + 1, RTCWET_WATCHER_UPDATE = RTCWET_WATCHER_REMOVE + 1, RTCWET_WATCHER_OFFERING = RTCWET_WATCHER_UPDATE + 1, RTCWET_WATCHER_ROAMED = RTCWET_WATCHER_OFFERING + 1 } RTC_WATCHER_EVENT_TYPE; typedef enum RTC_GROUP_EVENT_TYPE { RTCGET_GROUP_ADD = 0, RTCGET_GROUP_REMOVE = RTCGET_GROUP_ADD + 1, RTCGET_GROUP_UPDATE = RTCGET_GROUP_REMOVE + 1, RTCGET_GROUP_BUDDY_ADD = RTCGET_GROUP_UPDATE + 1, RTCGET_GROUP_BUDDY_REMOVE = RTCGET_GROUP_BUDDY_ADD + 1, RTCGET_GROUP_ROAMED = RTCGET_GROUP_BUDDY_REMOVE + 1 } RTC_GROUP_EVENT_TYPE; typedef enum RTC_TERMINATE_REASON { RTCTR_NORMAL = 0, RTCTR_DND = RTCTR_NORMAL + 1, RTCTR_BUSY = RTCTR_DND + 1, RTCTR_REJECT = RTCTR_BUSY + 1, RTCTR_TIMEOUT = RTCTR_REJECT + 1, RTCTR_SHUTDOWN = RTCTR_TIMEOUT + 1, RTCTR_INSUFFICIENT_SECURITY_LEVEL = RTCTR_SHUTDOWN + 1, RTCTR_NOT_SUPPORTED = RTCTR_INSUFFICIENT_SECURITY_LEVEL + 1 } RTC_TERMINATE_REASON; typedef enum RTC_REGISTRATION_STATE { RTCRS_NOT_REGISTERED = 0, RTCRS_REGISTERING = RTCRS_NOT_REGISTERED + 1, RTCRS_REGISTERED = RTCRS_REGISTERING + 1, RTCRS_REJECTED = RTCRS_REGISTERED + 1, RTCRS_UNREGISTERING = RTCRS_REJECTED + 1, RTCRS_ERROR = RTCRS_UNREGISTERING + 1, RTCRS_LOGGED_OFF = RTCRS_ERROR + 1, RTCRS_LOCAL_PA_LOGGED_OFF = RTCRS_LOGGED_OFF + 1, RTCRS_REMOTE_PA_LOGGED_OFF = RTCRS_LOCAL_PA_LOGGED_OFF + 1 } RTC_REGISTRATION_STATE; typedef enum RTC_SESSION_STATE { RTCSS_IDLE = 0, RTCSS_INCOMING = RTCSS_IDLE + 1, RTCSS_ANSWERING = RTCSS_INCOMING + 1, RTCSS_INPROGRESS = RTCSS_ANSWERING + 1, RTCSS_CONNECTED = RTCSS_INPROGRESS + 1, RTCSS_DISCONNECTED = RTCSS_CONNECTED + 1, RTCSS_HOLD = RTCSS_DISCONNECTED + 1, RTCSS_REFER = RTCSS_HOLD + 1 } RTC_SESSION_STATE; typedef enum RTC_PARTICIPANT_STATE { RTCPS_IDLE = 0, RTCPS_PENDING = RTCPS_IDLE + 1, RTCPS_INCOMING = RTCPS_PENDING + 1, RTCPS_ANSWERING = RTCPS_INCOMING + 1, RTCPS_INPROGRESS = RTCPS_ANSWERING + 1, RTCPS_ALERTING = RTCPS_INPROGRESS + 1, RTCPS_CONNECTED = RTCPS_ALERTING + 1, RTCPS_DISCONNECTING = RTCPS_CONNECTED + 1, RTCPS_DISCONNECTED = RTCPS_DISCONNECTING + 1 } RTC_PARTICIPANT_STATE; typedef enum RTC_WATCHER_STATE { RTCWS_UNKNOWN = 0, RTCWS_OFFERING = RTCWS_UNKNOWN + 1, RTCWS_ALLOWED = RTCWS_OFFERING + 1, RTCWS_BLOCKED = RTCWS_ALLOWED + 1, RTCWS_DENIED = RTCWS_BLOCKED + 1, RTCWS_PROMPT = RTCWS_DENIED + 1 } RTC_WATCHER_STATE; typedef enum RTC_ACE_SCOPE { RTCAS_SCOPE_USER = 0, RTCAS_SCOPE_DOMAIN = RTCAS_SCOPE_USER + 1, RTCAS_SCOPE_ALL = RTCAS_SCOPE_DOMAIN + 1 } RTC_ACE_SCOPE; typedef enum RTC_OFFER_WATCHER_MODE { RTCOWM_OFFER_WATCHER_EVENT = 0, RTCOWM_AUTOMATICALLY_ADD_WATCHER = RTCOWM_OFFER_WATCHER_EVENT + 1 } RTC_OFFER_WATCHER_MODE; typedef enum RTC_WATCHER_MATCH_MODE { RTCWMM_EXACT_MATCH = 0, RTCWMM_BEST_ACE_MATCH = RTCWMM_EXACT_MATCH + 1 } RTC_WATCHER_MATCH_MODE; typedef enum RTC_PRIVACY_MODE { RTCPM_BLOCK_LIST_EXCLUDED = 0, RTCPM_ALLOW_LIST_ONLY = RTCPM_BLOCK_LIST_EXCLUDED + 1 } RTC_PRIVACY_MODE; typedef enum RTC_SESSION_TYPE { RTCST_PC_TO_PC = 0, RTCST_PC_TO_PHONE = RTCST_PC_TO_PC + 1, RTCST_PHONE_TO_PHONE = RTCST_PC_TO_PHONE + 1, RTCST_IM = RTCST_PHONE_TO_PHONE + 1, RTCST_MULTIPARTY_IM = RTCST_IM + 1, RTCST_APPLICATION = RTCST_MULTIPARTY_IM + 1 } RTC_SESSION_TYPE; typedef enum RTC_PRESENCE_STATUS { RTCXS_PRESENCE_OFFLINE = 0, RTCXS_PRESENCE_ONLINE = RTCXS_PRESENCE_OFFLINE + 1, RTCXS_PRESENCE_AWAY = RTCXS_PRESENCE_ONLINE + 1, RTCXS_PRESENCE_IDLE = RTCXS_PRESENCE_AWAY + 1, RTCXS_PRESENCE_BUSY = RTCXS_PRESENCE_IDLE + 1, RTCXS_PRESENCE_BE_RIGHT_BACK = RTCXS_PRESENCE_BUSY + 1, RTCXS_PRESENCE_ON_THE_PHONE = RTCXS_PRESENCE_BE_RIGHT_BACK + 1, RTCXS_PRESENCE_OUT_TO_LUNCH = RTCXS_PRESENCE_ON_THE_PHONE + 1 } RTC_PRESENCE_STATUS; typedef enum RTC_BUDDY_SUBSCRIPTION_TYPE { RTCBT_SUBSCRIBED = 0, RTCBT_ALWAYS_OFFLINE = RTCBT_SUBSCRIBED + 1, RTCBT_ALWAYS_ONLINE = RTCBT_ALWAYS_OFFLINE + 1, RTCBT_POLL = RTCBT_ALWAYS_ONLINE + 1 } RTC_BUDDY_SUBSCRIPTION_TYPE; typedef enum RTC_MEDIA_EVENT_TYPE { RTCMET_STOPPED = 0, RTCMET_STARTED = RTCMET_STOPPED + 1, RTCMET_FAILED = RTCMET_STARTED + 1 } RTC_MEDIA_EVENT_TYPE; typedef enum RTC_MEDIA_EVENT_REASON { RTCMER_NORMAL = 0, RTCMER_HOLD = RTCMER_NORMAL + 1, RTCMER_TIMEOUT = RTCMER_HOLD + 1, RTCMER_BAD_DEVICE = RTCMER_TIMEOUT + 1, RTCMER_NO_PORT = RTCMER_BAD_DEVICE + 1, RTCMER_PORT_MAPPING_FAILED = RTCMER_NO_PORT + 1, RTCMER_REMOTE_REQUEST = RTCMER_PORT_MAPPING_FAILED + 1 } RTC_MEDIA_EVENT_REASON; typedef enum RTC_MESSAGING_EVENT_TYPE { RTCMSET_MESSAGE = 0, RTCMSET_STATUS = RTCMSET_MESSAGE + 1 } RTC_MESSAGING_EVENT_TYPE; typedef enum RTC_MESSAGING_USER_STATUS { RTCMUS_IDLE = 0, RTCMUS_TYPING = RTCMUS_IDLE + 1 } RTC_MESSAGING_USER_STATUS; typedef enum RTC_DTMF { RTC_DTMF_0 = 0, RTC_DTMF_1 = RTC_DTMF_0 + 1, RTC_DTMF_2 = RTC_DTMF_1 + 1, RTC_DTMF_3 = RTC_DTMF_2 + 1, RTC_DTMF_4 = RTC_DTMF_3 + 1, RTC_DTMF_5 = RTC_DTMF_4 + 1, RTC_DTMF_6 = RTC_DTMF_5 + 1, RTC_DTMF_7 = RTC_DTMF_6 + 1, RTC_DTMF_8 = RTC_DTMF_7 + 1, RTC_DTMF_9 = RTC_DTMF_8 + 1, RTC_DTMF_STAR = RTC_DTMF_9 + 1, RTC_DTMF_POUND = RTC_DTMF_STAR + 1, RTC_DTMF_A = RTC_DTMF_POUND + 1, RTC_DTMF_B = RTC_DTMF_A + 1, RTC_DTMF_C = RTC_DTMF_B + 1, RTC_DTMF_D = RTC_DTMF_C + 1, RTC_DTMF_FLASH = RTC_DTMF_D + 1 } RTC_DTMF; typedef enum RTC_PROVIDER_URI { RTCPU_URIHOMEPAGE = 0, RTCPU_URIHELPDESK = RTCPU_URIHOMEPAGE + 1, RTCPU_URIPERSONALACCOUNT = RTCPU_URIHELPDESK + 1, RTCPU_URIDISPLAYDURINGCALL = RTCPU_URIPERSONALACCOUNT + 1, RTCPU_URIDISPLAYDURINGIDLE = RTCPU_URIDISPLAYDURINGCALL + 1 } RTC_PROVIDER_URI; typedef enum RTC_RING_TYPE { RTCRT_PHONE = 0, RTCRT_MESSAGE = RTCRT_PHONE + 1, RTCRT_RINGBACK = RTCRT_MESSAGE + 1 } RTC_RING_TYPE; typedef enum RTC_T120_APPLET { RTCTA_WHITEBOARD = 0, RTCTA_APPSHARING = RTCTA_WHITEBOARD + 1 } RTC_T120_APPLET; typedef enum RTC_PORT_TYPE { RTCPT_AUDIO_RTP = 0, RTCPT_AUDIO_RTCP = RTCPT_AUDIO_RTP + 1, RTCPT_VIDEO_RTP = RTCPT_AUDIO_RTCP + 1, RTCPT_VIDEO_RTCP = RTCPT_VIDEO_RTP + 1, RTCPT_SIP = RTCPT_VIDEO_RTCP + 1 } RTC_PORT_TYPE; typedef enum RTC_USER_SEARCH_COLUMN { RTCUSC_URI = 0, RTCUSC_DISPLAYNAME = RTCUSC_URI + 1, RTCUSC_TITLE = RTCUSC_DISPLAYNAME + 1, RTCUSC_OFFICE = RTCUSC_TITLE + 1, RTCUSC_PHONE = RTCUSC_OFFICE + 1, RTCUSC_COMPANY = RTCUSC_PHONE + 1, RTCUSC_CITY = RTCUSC_COMPANY + 1, RTCUSC_STATE = RTCUSC_CITY + 1, RTCUSC_COUNTRY = RTCUSC_STATE + 1, RTCUSC_EMAIL = RTCUSC_COUNTRY + 1 } RTC_USER_SEARCH_COLUMN; typedef enum RTC_USER_SEARCH_PREFERENCE { RTCUSP_MAX_MATCHES = 0, RTCUSP_TIME_LIMIT = RTCUSP_MAX_MATCHES + 1 } RTC_USER_SEARCH_PREFERENCE; typedef enum RTC_ROAMING_EVENT_TYPE { RTCRET_BUDDY_ROAMING = 0, RTCRET_WATCHER_ROAMING = RTCRET_BUDDY_ROAMING + 1, RTCRET_PRESENCE_ROAMING = RTCRET_WATCHER_ROAMING + 1, RTCRET_PROFILE_ROAMING = RTCRET_PRESENCE_ROAMING + 1, RTCRET_WPENDING_ROAMING = RTCRET_PROFILE_ROAMING + 1 } RTC_ROAMING_EVENT_TYPE; typedef enum RTC_PROFILE_EVENT_TYPE { RTCPFET_PROFILE_GET = 0, RTCPFET_PROFILE_UPDATE = RTCPFET_PROFILE_GET + 1 } RTC_PROFILE_EVENT_TYPE; typedef enum RTC_ANSWER_MODE { RTCAM_OFFER_SESSION_EVENT = 0, RTCAM_AUTOMATICALLY_ACCEPT = RTCAM_OFFER_SESSION_EVENT + 1, RTCAM_AUTOMATICALLY_REJECT = RTCAM_AUTOMATICALLY_ACCEPT + 1, RTCAM_NOT_SUPPORTED = RTCAM_AUTOMATICALLY_REJECT + 1 } RTC_ANSWER_MODE; typedef enum RTC_SESSION_REFER_STATUS { RTCSRS_REFERRING = 0, RTCSRS_ACCEPTED = RTCSRS_REFERRING + 1, RTCSRS_ERROR = RTCSRS_ACCEPTED + 1, RTCSRS_REJECTED = RTCSRS_ERROR + 1, RTCSRS_DROPPED = RTCSRS_REJECTED + 1, RTCSRS_DONE = RTCSRS_DROPPED + 1 } RTC_SESSION_REFER_STATUS; typedef enum RTC_PRESENCE_PROPERTY { RTCPP_PHONENUMBER = 0, RTCPP_DISPLAYNAME = RTCPP_PHONENUMBER + 1, RTCPP_EMAIL = RTCPP_DISPLAYNAME + 1, RTCPP_DEVICE_NAME = RTCPP_EMAIL + 1, RTCPP_MULTIPLE = RTCPP_DEVICE_NAME + 1 } RTC_PRESENCE_PROPERTY; typedef enum RTC_SECURITY_TYPE { RTCSECT_AUDIO_VIDEO_MEDIA_ENCRYPTION = 0, RTCSECT_T120_MEDIA_ENCRYPTION = RTCSECT_AUDIO_VIDEO_MEDIA_ENCRYPTION + 1 } RTC_SECURITY_TYPE; typedef enum RTC_SECURITY_LEVEL { RTCSECL_UNSUPPORTED = 1, RTCSECL_SUPPORTED = RTCSECL_UNSUPPORTED + 1, RTCSECL_REQUIRED = RTCSECL_SUPPORTED + 1 } RTC_SECURITY_LEVEL; typedef enum RTC_REINVITE_STATE { RTCRIN_INCOMING = 0, RTCRIN_SUCCEEDED = RTCRIN_INCOMING + 1, RTCRIN_FAIL = RTCRIN_SUCCEEDED + 1 } RTC_REINVITE_STATE; #define RTCCS_FORCE_PROFILE 0x00000001 #define RTCCS_FAIL_ON_REDIRECT 0x00000002 #define RTCMT_AUDIO_SEND 0x00000001 #define RTCMT_AUDIO_RECEIVE 0x00000002 #define RTCMT_VIDEO_SEND 0x00000004 #define RTCMT_VIDEO_RECEIVE 0x00000008 #define RTCMT_T120_SENDRECV 0x00000010 #define RTCMT_ALL_RTP ( \ RTCMT_AUDIO_SEND | \ RTCMT_AUDIO_RECEIVE | \ RTCMT_VIDEO_SEND | \ RTCMT_VIDEO_RECEIVE ) #define RTCMT_ALL ( \ RTCMT_ALL_RTP | \ RTCMT_T120_SENDRECV ) #define RTCSI_PC_TO_PC 0x00000001 #define RTCSI_PC_TO_PHONE 0x00000002 #define RTCSI_PHONE_TO_PHONE 0x00000004 #define RTCSI_IM 0x00000008 #define RTCSI_MULTIPARTY_IM 0x00000010 #define RTCSI_APPLICATION 0x00000020 #define RTCTR_UDP 0x00000001 #define RTCTR_TCP 0x00000002 #define RTCTR_TLS 0x00000004 #define RTCAU_BASIC 0x00000001 #define RTCAU_DIGEST 0x00000002 #define RTCAU_NTLM 0x00000004 #define RTCAU_KERBEROS 0x00000008 #define RTCAU_USE_LOGON_CRED 0x00010000 #define RTCRF_REGISTER_INVITE_SESSIONS 0x00000001 #define RTCRF_REGISTER_MESSAGE_SESSIONS 0x00000002 #define RTCRF_REGISTER_PRESENCE 0x00000004 #define RTCRF_REGISTER_NOTIFY 0x00000008 #define RTCRF_REGISTER_ALL 0x0000000F #define RTCRMF_BUDDY_ROAMING 0x00000001 #define RTCRMF_WATCHER_ROAMING 0x00000002 #define RTCRMF_PRESENCE_ROAMING 0x00000004 #define RTCRMF_PROFILE_ROAMING 0x00000008 #define RTCRMF_ALL_ROAMING 0x0000000F #define RTCEF_CLIENT 0x00000001 #define RTCEF_REGISTRATION_STATE_CHANGE 0x00000002 #define RTCEF_SESSION_STATE_CHANGE 0x00000004 #define RTCEF_SESSION_OPERATION_COMPLETE 0x00000008 #define RTCEF_PARTICIPANT_STATE_CHANGE 0x00000010 #define RTCEF_MEDIA 0x00000020 #define RTCEF_INTENSITY 0x00000040 #define RTCEF_MESSAGING 0x00000080 #define RTCEF_BUDDY 0x00000100 #define RTCEF_WATCHER 0x00000200 #define RTCEF_PROFILE 0x00000400 #define RTCEF_USERSEARCH 0x00000800 #define RTCEF_INFO 0x00001000 #define RTCEF_GROUP 0x00002000 #define RTCEF_MEDIA_REQUEST 0x00004000 #define RTCEF_ROAMING 0x00010000 #define RTCEF_PRESENCE_PROPERTY 0x00020000 #define RTCEF_BUDDY2 0x00040000 #define RTCEF_WATCHER2 0x00080000 #define RTCEF_SESSION_REFER_STATUS 0x00100000 #define RTCEF_SESSION_REFERRED 0x00200000 #define RTCEF_REINVITE 0x00400000 #define RTCEF_PRESENCE_DATA 0x00800000 #define RTCEF_PRESENCE_STATUS 0x01000000 #define RTCEF_ALL 0x01FFFFFF #define RTCIF_DISABLE_MEDIA 0x00000001 #define RTCIF_DISABLE_UPNP 0x00000002 #define RTCIF_ENABLE_SERVER_CLASS 0x00000004 #define RTCIF_DISABLE_STRICT_DNS 0x00000008 #define RTCIF_DISABLE_UNAUTH_WATCHERS_AND_ROAMING 0x00000010 #define RTCIF_DISABLE_UNAUTH_SESSIONS 0x00000020 #define RTCIF_SUPPORT_FORKING 0x00000040 #define RTCFF_FEDERATED 0x00000001 #define RTCFF_ARCHIVED 0x00000002 extern RPC_IF_HANDLE __MIDL_itf_rtccore_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_rtccore_0000_v0_0_s_ifspec; #ifndef __IRTCClient_INTERFACE_DEFINED__ #define __IRTCClient_INTERFACE_DEFINED__ /* interface IRTCClient */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClient; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("07829e45-9a34-408e-a011-bddf13487cd1") IRTCClient : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Initialize( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Shutdown( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE PrepareForShutdown( void) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_EventFilter( /* [in] */ long lFilter) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EventFilter( /* [retval][out] */ long *plFilter) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPreferredMediaTypes( /* [in] */ long lMediaTypes, /* [in] */ VARIANT_BOOL fPersistent) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredMediaTypes( /* [retval][out] */ long *plMediaTypes) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_MediaCapabilities( /* [retval][out] */ long *plMediaTypes) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateSession( /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession **ppSession) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ListenForIncomingSessions( /* [in] */ RTC_LISTEN_MODE enListen) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ListenForIncomingSessions( /* [retval][out] */ RTC_LISTEN_MODE *penListen) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NetworkAddresses( /* [in] */ VARIANT_BOOL fTCP, /* [in] */ VARIANT_BOOL fExternal, /* [retval][out] */ VARIANT *pvAddresses) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Volume( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Volume( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_AudioMuted( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ VARIANT_BOOL fMuted) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioMuted( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ VARIANT_BOOL *pfMuted) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_IVideoWindow( /* [in] */ RTC_VIDEO_DEVICE enDevice, /* [retval][out] */ IVideoWindow **ppIVideoWindow) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredAudioDevice( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ BSTR bstrDeviceName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredAudioDevice( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ BSTR *pbstrDeviceName) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredVolume( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredVolume( /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredAEC( /* [in] */ VARIANT_BOOL bEnable) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredAEC( /* [retval][out] */ VARIANT_BOOL *pbEnabled) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredVideoDevice( /* [in] */ BSTR bstrDeviceName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredVideoDevice( /* [retval][out] */ BSTR *pbstrDeviceName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ActiveMedia( /* [retval][out] */ long *plMediaType) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_MaxBitrate( /* [in] */ long lMaxBitrate) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_MaxBitrate( /* [retval][out] */ long *plMaxBitrate) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_TemporalSpatialTradeOff( /* [in] */ long lValue) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_TemporalSpatialTradeOff( /* [retval][out] */ long *plValue) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NetworkQuality( /* [retval][out] */ long *plNetworkQuality) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE StartT120Applet( /* [in] */ RTC_T120_APPLET enApplet) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE StopT120Applets( void) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_IsT120AppletRunning( /* [in] */ RTC_T120_APPLET enApplet, /* [retval][out] */ VARIANT_BOOL *pfRunning) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LocalUserURI( /* [retval][out] */ BSTR *pbstrUserURI) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_LocalUserURI( /* [in] */ BSTR bstrUserURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LocalUserName( /* [retval][out] */ BSTR *pbstrUserName) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_LocalUserName( /* [in] */ BSTR bstrUserName) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE PlayRing( /* [in] */ RTC_RING_TYPE enType, /* [in] */ VARIANT_BOOL bPlay) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SendDTMF( /* [in] */ RTC_DTMF enDTMF) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE InvokeTuningWizard( /* [in] */ OAHWND hwndParent) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_IsTuned( /* [retval][out] */ VARIANT_BOOL *pfTuned) = 0; }; #else /* C style interface */ typedef struct IRTCClientVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClient * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClient * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClient * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Initialize )( IRTCClient * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Shutdown )( IRTCClient * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *PrepareForShutdown )( IRTCClient * This); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EventFilter )( IRTCClient * This, /* [in] */ long lFilter); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventFilter )( IRTCClient * This, /* [retval][out] */ long *plFilter); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPreferredMediaTypes )( IRTCClient * This, /* [in] */ long lMediaTypes, /* [in] */ VARIANT_BOOL fPersistent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredMediaTypes )( IRTCClient * This, /* [retval][out] */ long *plMediaTypes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaCapabilities )( IRTCClient * This, /* [retval][out] */ long *plMediaTypes); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateSession )( IRTCClient * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ListenForIncomingSessions )( IRTCClient * This, /* [in] */ RTC_LISTEN_MODE enListen); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ListenForIncomingSessions )( IRTCClient * This, /* [retval][out] */ RTC_LISTEN_MODE *penListen); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkAddresses )( IRTCClient * This, /* [in] */ VARIANT_BOOL fTCP, /* [in] */ VARIANT_BOOL fExternal, /* [retval][out] */ VARIANT *pvAddresses); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AudioMuted )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ VARIANT_BOOL fMuted); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioMuted )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ VARIANT_BOOL *pfMuted); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IVideoWindow )( IRTCClient * This, /* [in] */ RTC_VIDEO_DEVICE enDevice, /* [retval][out] */ IVideoWindow **ppIVideoWindow); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredAudioDevice )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ BSTR bstrDeviceName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredAudioDevice )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ BSTR *pbstrDeviceName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredVolume )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredVolume )( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredAEC )( IRTCClient * This, /* [in] */ VARIANT_BOOL bEnable); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredAEC )( IRTCClient * This, /* [retval][out] */ VARIANT_BOOL *pbEnabled); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredVideoDevice )( IRTCClient * This, /* [in] */ BSTR bstrDeviceName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredVideoDevice )( IRTCClient * This, /* [retval][out] */ BSTR *pbstrDeviceName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveMedia )( IRTCClient * This, /* [retval][out] */ long *plMediaType); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxBitrate )( IRTCClient * This, /* [in] */ long lMaxBitrate); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxBitrate )( IRTCClient * This, /* [retval][out] */ long *plMaxBitrate); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TemporalSpatialTradeOff )( IRTCClient * This, /* [in] */ long lValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TemporalSpatialTradeOff )( IRTCClient * This, /* [retval][out] */ long *plValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkQuality )( IRTCClient * This, /* [retval][out] */ long *plNetworkQuality); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *StartT120Applet )( IRTCClient * This, /* [in] */ RTC_T120_APPLET enApplet); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *StopT120Applets )( IRTCClient * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsT120AppletRunning )( IRTCClient * This, /* [in] */ RTC_T120_APPLET enApplet, /* [retval][out] */ VARIANT_BOOL *pfRunning); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LocalUserURI )( IRTCClient * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LocalUserURI )( IRTCClient * This, /* [in] */ BSTR bstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LocalUserName )( IRTCClient * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LocalUserName )( IRTCClient * This, /* [in] */ BSTR bstrUserName); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *PlayRing )( IRTCClient * This, /* [in] */ RTC_RING_TYPE enType, /* [in] */ VARIANT_BOOL bPlay); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendDTMF )( IRTCClient * This, /* [in] */ RTC_DTMF enDTMF); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *InvokeTuningWizard )( IRTCClient * This, /* [in] */ OAHWND hwndParent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsTuned )( IRTCClient * This, /* [retval][out] */ VARIANT_BOOL *pfTuned); END_INTERFACE } IRTCClientVtbl; interface IRTCClient { CONST_VTBL struct IRTCClientVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClient_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClient_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClient_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClient_Initialize(This) \ (This)->lpVtbl -> Initialize(This) #define IRTCClient_Shutdown(This) \ (This)->lpVtbl -> Shutdown(This) #define IRTCClient_PrepareForShutdown(This) \ (This)->lpVtbl -> PrepareForShutdown(This) #define IRTCClient_put_EventFilter(This,lFilter) \ (This)->lpVtbl -> put_EventFilter(This,lFilter) #define IRTCClient_get_EventFilter(This,plFilter) \ (This)->lpVtbl -> get_EventFilter(This,plFilter) #define IRTCClient_SetPreferredMediaTypes(This,lMediaTypes,fPersistent) \ (This)->lpVtbl -> SetPreferredMediaTypes(This,lMediaTypes,fPersistent) #define IRTCClient_get_PreferredMediaTypes(This,plMediaTypes) \ (This)->lpVtbl -> get_PreferredMediaTypes(This,plMediaTypes) #define IRTCClient_get_MediaCapabilities(This,plMediaTypes) \ (This)->lpVtbl -> get_MediaCapabilities(This,plMediaTypes) #define IRTCClient_CreateSession(This,enType,bstrLocalPhoneURI,pProfile,lFlags,ppSession) \ (This)->lpVtbl -> CreateSession(This,enType,bstrLocalPhoneURI,pProfile,lFlags,ppSession) #define IRTCClient_put_ListenForIncomingSessions(This,enListen) \ (This)->lpVtbl -> put_ListenForIncomingSessions(This,enListen) #define IRTCClient_get_ListenForIncomingSessions(This,penListen) \ (This)->lpVtbl -> get_ListenForIncomingSessions(This,penListen) #define IRTCClient_get_NetworkAddresses(This,fTCP,fExternal,pvAddresses) \ (This)->lpVtbl -> get_NetworkAddresses(This,fTCP,fExternal,pvAddresses) #define IRTCClient_put_Volume(This,enDevice,lVolume) \ (This)->lpVtbl -> put_Volume(This,enDevice,lVolume) #define IRTCClient_get_Volume(This,enDevice,plVolume) \ (This)->lpVtbl -> get_Volume(This,enDevice,plVolume) #define IRTCClient_put_AudioMuted(This,enDevice,fMuted) \ (This)->lpVtbl -> put_AudioMuted(This,enDevice,fMuted) #define IRTCClient_get_AudioMuted(This,enDevice,pfMuted) \ (This)->lpVtbl -> get_AudioMuted(This,enDevice,pfMuted) #define IRTCClient_get_IVideoWindow(This,enDevice,ppIVideoWindow) \ (This)->lpVtbl -> get_IVideoWindow(This,enDevice,ppIVideoWindow) #define IRTCClient_put_PreferredAudioDevice(This,enDevice,bstrDeviceName) \ (This)->lpVtbl -> put_PreferredAudioDevice(This,enDevice,bstrDeviceName) #define IRTCClient_get_PreferredAudioDevice(This,enDevice,pbstrDeviceName) \ (This)->lpVtbl -> get_PreferredAudioDevice(This,enDevice,pbstrDeviceName) #define IRTCClient_put_PreferredVolume(This,enDevice,lVolume) \ (This)->lpVtbl -> put_PreferredVolume(This,enDevice,lVolume) #define IRTCClient_get_PreferredVolume(This,enDevice,plVolume) \ (This)->lpVtbl -> get_PreferredVolume(This,enDevice,plVolume) #define IRTCClient_put_PreferredAEC(This,bEnable) \ (This)->lpVtbl -> put_PreferredAEC(This,bEnable) #define IRTCClient_get_PreferredAEC(This,pbEnabled) \ (This)->lpVtbl -> get_PreferredAEC(This,pbEnabled) #define IRTCClient_put_PreferredVideoDevice(This,bstrDeviceName) \ (This)->lpVtbl -> put_PreferredVideoDevice(This,bstrDeviceName) #define IRTCClient_get_PreferredVideoDevice(This,pbstrDeviceName) \ (This)->lpVtbl -> get_PreferredVideoDevice(This,pbstrDeviceName) #define IRTCClient_get_ActiveMedia(This,plMediaType) \ (This)->lpVtbl -> get_ActiveMedia(This,plMediaType) #define IRTCClient_put_MaxBitrate(This,lMaxBitrate) \ (This)->lpVtbl -> put_MaxBitrate(This,lMaxBitrate) #define IRTCClient_get_MaxBitrate(This,plMaxBitrate) \ (This)->lpVtbl -> get_MaxBitrate(This,plMaxBitrate) #define IRTCClient_put_TemporalSpatialTradeOff(This,lValue) \ (This)->lpVtbl -> put_TemporalSpatialTradeOff(This,lValue) #define IRTCClient_get_TemporalSpatialTradeOff(This,plValue) \ (This)->lpVtbl -> get_TemporalSpatialTradeOff(This,plValue) #define IRTCClient_get_NetworkQuality(This,plNetworkQuality) \ (This)->lpVtbl -> get_NetworkQuality(This,plNetworkQuality) #define IRTCClient_StartT120Applet(This,enApplet) \ (This)->lpVtbl -> StartT120Applet(This,enApplet) #define IRTCClient_StopT120Applets(This) \ (This)->lpVtbl -> StopT120Applets(This) #define IRTCClient_get_IsT120AppletRunning(This,enApplet,pfRunning) \ (This)->lpVtbl -> get_IsT120AppletRunning(This,enApplet,pfRunning) #define IRTCClient_get_LocalUserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_LocalUserURI(This,pbstrUserURI) #define IRTCClient_put_LocalUserURI(This,bstrUserURI) \ (This)->lpVtbl -> put_LocalUserURI(This,bstrUserURI) #define IRTCClient_get_LocalUserName(This,pbstrUserName) \ (This)->lpVtbl -> get_LocalUserName(This,pbstrUserName) #define IRTCClient_put_LocalUserName(This,bstrUserName) \ (This)->lpVtbl -> put_LocalUserName(This,bstrUserName) #define IRTCClient_PlayRing(This,enType,bPlay) \ (This)->lpVtbl -> PlayRing(This,enType,bPlay) #define IRTCClient_SendDTMF(This,enDTMF) \ (This)->lpVtbl -> SendDTMF(This,enDTMF) #define IRTCClient_InvokeTuningWizard(This,hwndParent) \ (This)->lpVtbl -> InvokeTuningWizard(This,hwndParent) #define IRTCClient_get_IsTuned(This,pfTuned) \ (This)->lpVtbl -> get_IsTuned(This,pfTuned) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_Initialize_Proxy( IRTCClient * This); void __RPC_STUB IRTCClient_Initialize_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_Shutdown_Proxy( IRTCClient * This); void __RPC_STUB IRTCClient_Shutdown_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_PrepareForShutdown_Proxy( IRTCClient * This); void __RPC_STUB IRTCClient_PrepareForShutdown_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_EventFilter_Proxy( IRTCClient * This, /* [in] */ long lFilter); void __RPC_STUB IRTCClient_put_EventFilter_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_EventFilter_Proxy( IRTCClient * This, /* [retval][out] */ long *plFilter); void __RPC_STUB IRTCClient_get_EventFilter_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_SetPreferredMediaTypes_Proxy( IRTCClient * This, /* [in] */ long lMediaTypes, /* [in] */ VARIANT_BOOL fPersistent); void __RPC_STUB IRTCClient_SetPreferredMediaTypes_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_PreferredMediaTypes_Proxy( IRTCClient * This, /* [retval][out] */ long *plMediaTypes); void __RPC_STUB IRTCClient_get_PreferredMediaTypes_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_MediaCapabilities_Proxy( IRTCClient * This, /* [retval][out] */ long *plMediaTypes); void __RPC_STUB IRTCClient_get_MediaCapabilities_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_CreateSession_Proxy( IRTCClient * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession **ppSession); void __RPC_STUB IRTCClient_CreateSession_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_ListenForIncomingSessions_Proxy( IRTCClient * This, /* [in] */ RTC_LISTEN_MODE enListen); void __RPC_STUB IRTCClient_put_ListenForIncomingSessions_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_ListenForIncomingSessions_Proxy( IRTCClient * This, /* [retval][out] */ RTC_LISTEN_MODE *penListen); void __RPC_STUB IRTCClient_get_ListenForIncomingSessions_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_NetworkAddresses_Proxy( IRTCClient * This, /* [in] */ VARIANT_BOOL fTCP, /* [in] */ VARIANT_BOOL fExternal, /* [retval][out] */ VARIANT *pvAddresses); void __RPC_STUB IRTCClient_get_NetworkAddresses_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_Volume_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume); void __RPC_STUB IRTCClient_put_Volume_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_Volume_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume); void __RPC_STUB IRTCClient_get_Volume_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_AudioMuted_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ VARIANT_BOOL fMuted); void __RPC_STUB IRTCClient_put_AudioMuted_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_AudioMuted_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ VARIANT_BOOL *pfMuted); void __RPC_STUB IRTCClient_get_AudioMuted_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_IVideoWindow_Proxy( IRTCClient * This, /* [in] */ RTC_VIDEO_DEVICE enDevice, /* [retval][out] */ IVideoWindow **ppIVideoWindow); void __RPC_STUB IRTCClient_get_IVideoWindow_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_PreferredAudioDevice_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ BSTR bstrDeviceName); void __RPC_STUB IRTCClient_put_PreferredAudioDevice_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_PreferredAudioDevice_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ BSTR *pbstrDeviceName); void __RPC_STUB IRTCClient_get_PreferredAudioDevice_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_PreferredVolume_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume); void __RPC_STUB IRTCClient_put_PreferredVolume_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_PreferredVolume_Proxy( IRTCClient * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume); void __RPC_STUB IRTCClient_get_PreferredVolume_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_PreferredAEC_Proxy( IRTCClient * This, /* [in] */ VARIANT_BOOL bEnable); void __RPC_STUB IRTCClient_put_PreferredAEC_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_PreferredAEC_Proxy( IRTCClient * This, /* [retval][out] */ VARIANT_BOOL *pbEnabled); void __RPC_STUB IRTCClient_get_PreferredAEC_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_PreferredVideoDevice_Proxy( IRTCClient * This, /* [in] */ BSTR bstrDeviceName); void __RPC_STUB IRTCClient_put_PreferredVideoDevice_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_PreferredVideoDevice_Proxy( IRTCClient * This, /* [retval][out] */ BSTR *pbstrDeviceName); void __RPC_STUB IRTCClient_get_PreferredVideoDevice_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_ActiveMedia_Proxy( IRTCClient * This, /* [retval][out] */ long *plMediaType); void __RPC_STUB IRTCClient_get_ActiveMedia_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_MaxBitrate_Proxy( IRTCClient * This, /* [in] */ long lMaxBitrate); void __RPC_STUB IRTCClient_put_MaxBitrate_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_MaxBitrate_Proxy( IRTCClient * This, /* [retval][out] */ long *plMaxBitrate); void __RPC_STUB IRTCClient_get_MaxBitrate_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_TemporalSpatialTradeOff_Proxy( IRTCClient * This, /* [in] */ long lValue); void __RPC_STUB IRTCClient_put_TemporalSpatialTradeOff_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_TemporalSpatialTradeOff_Proxy( IRTCClient * This, /* [retval][out] */ long *plValue); void __RPC_STUB IRTCClient_get_TemporalSpatialTradeOff_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_NetworkQuality_Proxy( IRTCClient * This, /* [retval][out] */ long *plNetworkQuality); void __RPC_STUB IRTCClient_get_NetworkQuality_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_StartT120Applet_Proxy( IRTCClient * This, /* [in] */ RTC_T120_APPLET enApplet); void __RPC_STUB IRTCClient_StartT120Applet_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_StopT120Applets_Proxy( IRTCClient * This); void __RPC_STUB IRTCClient_StopT120Applets_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_IsT120AppletRunning_Proxy( IRTCClient * This, /* [in] */ RTC_T120_APPLET enApplet, /* [retval][out] */ VARIANT_BOOL *pfRunning); void __RPC_STUB IRTCClient_get_IsT120AppletRunning_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_LocalUserURI_Proxy( IRTCClient * This, /* [retval][out] */ BSTR *pbstrUserURI); void __RPC_STUB IRTCClient_get_LocalUserURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_LocalUserURI_Proxy( IRTCClient * This, /* [in] */ BSTR bstrUserURI); void __RPC_STUB IRTCClient_put_LocalUserURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_LocalUserName_Proxy( IRTCClient * This, /* [retval][out] */ BSTR *pbstrUserName); void __RPC_STUB IRTCClient_get_LocalUserName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient_put_LocalUserName_Proxy( IRTCClient * This, /* [in] */ BSTR bstrUserName); void __RPC_STUB IRTCClient_put_LocalUserName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_PlayRing_Proxy( IRTCClient * This, /* [in] */ RTC_RING_TYPE enType, /* [in] */ VARIANT_BOOL bPlay); void __RPC_STUB IRTCClient_PlayRing_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_SendDTMF_Proxy( IRTCClient * This, /* [in] */ RTC_DTMF enDTMF); void __RPC_STUB IRTCClient_SendDTMF_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient_InvokeTuningWizard_Proxy( IRTCClient * This, /* [in] */ OAHWND hwndParent); void __RPC_STUB IRTCClient_InvokeTuningWizard_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient_get_IsTuned_Proxy( IRTCClient * This, /* [retval][out] */ VARIANT_BOOL *pfTuned); void __RPC_STUB IRTCClient_get_IsTuned_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClient_INTERFACE_DEFINED__ */ #ifndef __IRTCClient2_INTERFACE_DEFINED__ #define __IRTCClient2_INTERFACE_DEFINED__ /* interface IRTCClient2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClient2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("0C91D71D-1064-42da-BFA5-572BEB8EEA84") IRTCClient2 : public IRTCClient { public: virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_AnswerMode( /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ RTC_ANSWER_MODE enMode) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AnswerMode( /* [in] */ RTC_SESSION_TYPE enType, /* [retval][out] */ RTC_ANSWER_MODE *penMode) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE InvokeTuningWizardEx( /* [in] */ OAHWND hwndParent, /* [in] */ VARIANT_BOOL fAllowAudio, /* [in] */ VARIANT_BOOL fAllowVideo) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Version( /* [retval][out] */ long *plVersion) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ClientName( /* [in] */ BSTR bstrClientName) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ClientCurVer( /* [in] */ BSTR bstrClientCurVer) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE InitializeEx( /* [in] */ long lFlags) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateSessionWithDescription( /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession2 **ppSession2) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSessionDescriptionManager( /* [in] */ IRTCSessionDescriptionManager *pSessionDescriptionManager) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredSecurityLevel( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredSecurityLevel( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_AllowedPorts( /* [in] */ long lTransport, /* [in] */ RTC_LISTEN_MODE enListenMode) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AllowedPorts( /* [in] */ long lTransport, /* [retval][out] */ RTC_LISTEN_MODE *penListenMode) = 0; }; #else /* C style interface */ typedef struct IRTCClient2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClient2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClient2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClient2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Initialize )( IRTCClient2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Shutdown )( IRTCClient2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *PrepareForShutdown )( IRTCClient2 * This); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EventFilter )( IRTCClient2 * This, /* [in] */ long lFilter); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventFilter )( IRTCClient2 * This, /* [retval][out] */ long *plFilter); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPreferredMediaTypes )( IRTCClient2 * This, /* [in] */ long lMediaTypes, /* [in] */ VARIANT_BOOL fPersistent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredMediaTypes )( IRTCClient2 * This, /* [retval][out] */ long *plMediaTypes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaCapabilities )( IRTCClient2 * This, /* [retval][out] */ long *plMediaTypes); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateSession )( IRTCClient2 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ListenForIncomingSessions )( IRTCClient2 * This, /* [in] */ RTC_LISTEN_MODE enListen); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ListenForIncomingSessions )( IRTCClient2 * This, /* [retval][out] */ RTC_LISTEN_MODE *penListen); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkAddresses )( IRTCClient2 * This, /* [in] */ VARIANT_BOOL fTCP, /* [in] */ VARIANT_BOOL fExternal, /* [retval][out] */ VARIANT *pvAddresses); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AudioMuted )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ VARIANT_BOOL fMuted); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioMuted )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ VARIANT_BOOL *pfMuted); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IVideoWindow )( IRTCClient2 * This, /* [in] */ RTC_VIDEO_DEVICE enDevice, /* [retval][out] */ IVideoWindow **ppIVideoWindow); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredAudioDevice )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ BSTR bstrDeviceName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredAudioDevice )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ BSTR *pbstrDeviceName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredVolume )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [in] */ long lVolume); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredVolume )( IRTCClient2 * This, /* [in] */ RTC_AUDIO_DEVICE enDevice, /* [retval][out] */ long *plVolume); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredAEC )( IRTCClient2 * This, /* [in] */ VARIANT_BOOL bEnable); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredAEC )( IRTCClient2 * This, /* [retval][out] */ VARIANT_BOOL *pbEnabled); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredVideoDevice )( IRTCClient2 * This, /* [in] */ BSTR bstrDeviceName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredVideoDevice )( IRTCClient2 * This, /* [retval][out] */ BSTR *pbstrDeviceName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveMedia )( IRTCClient2 * This, /* [retval][out] */ long *plMediaType); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxBitrate )( IRTCClient2 * This, /* [in] */ long lMaxBitrate); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxBitrate )( IRTCClient2 * This, /* [retval][out] */ long *plMaxBitrate); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TemporalSpatialTradeOff )( IRTCClient2 * This, /* [in] */ long lValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TemporalSpatialTradeOff )( IRTCClient2 * This, /* [retval][out] */ long *plValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkQuality )( IRTCClient2 * This, /* [retval][out] */ long *plNetworkQuality); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *StartT120Applet )( IRTCClient2 * This, /* [in] */ RTC_T120_APPLET enApplet); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *StopT120Applets )( IRTCClient2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsT120AppletRunning )( IRTCClient2 * This, /* [in] */ RTC_T120_APPLET enApplet, /* [retval][out] */ VARIANT_BOOL *pfRunning); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LocalUserURI )( IRTCClient2 * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LocalUserURI )( IRTCClient2 * This, /* [in] */ BSTR bstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LocalUserName )( IRTCClient2 * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LocalUserName )( IRTCClient2 * This, /* [in] */ BSTR bstrUserName); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *PlayRing )( IRTCClient2 * This, /* [in] */ RTC_RING_TYPE enType, /* [in] */ VARIANT_BOOL bPlay); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendDTMF )( IRTCClient2 * This, /* [in] */ RTC_DTMF enDTMF); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *InvokeTuningWizard )( IRTCClient2 * This, /* [in] */ OAHWND hwndParent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsTuned )( IRTCClient2 * This, /* [retval][out] */ VARIANT_BOOL *pfTuned); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AnswerMode )( IRTCClient2 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ RTC_ANSWER_MODE enMode); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AnswerMode )( IRTCClient2 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [retval][out] */ RTC_ANSWER_MODE *penMode); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *InvokeTuningWizardEx )( IRTCClient2 * This, /* [in] */ OAHWND hwndParent, /* [in] */ VARIANT_BOOL fAllowAudio, /* [in] */ VARIANT_BOOL fAllowVideo); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Version )( IRTCClient2 * This, /* [retval][out] */ long *plVersion); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ClientName )( IRTCClient2 * This, /* [in] */ BSTR bstrClientName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ClientCurVer )( IRTCClient2 * This, /* [in] */ BSTR bstrClientCurVer); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *InitializeEx )( IRTCClient2 * This, /* [in] */ long lFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateSessionWithDescription )( IRTCClient2 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession2 **ppSession2); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSessionDescriptionManager )( IRTCClient2 * This, /* [in] */ IRTCSessionDescriptionManager *pSessionDescriptionManager); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredSecurityLevel )( IRTCClient2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredSecurityLevel )( IRTCClient2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowedPorts )( IRTCClient2 * This, /* [in] */ long lTransport, /* [in] */ RTC_LISTEN_MODE enListenMode); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowedPorts )( IRTCClient2 * This, /* [in] */ long lTransport, /* [retval][out] */ RTC_LISTEN_MODE *penListenMode); END_INTERFACE } IRTCClient2Vtbl; interface IRTCClient2 { CONST_VTBL struct IRTCClient2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClient2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClient2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClient2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClient2_Initialize(This) \ (This)->lpVtbl -> Initialize(This) #define IRTCClient2_Shutdown(This) \ (This)->lpVtbl -> Shutdown(This) #define IRTCClient2_PrepareForShutdown(This) \ (This)->lpVtbl -> PrepareForShutdown(This) #define IRTCClient2_put_EventFilter(This,lFilter) \ (This)->lpVtbl -> put_EventFilter(This,lFilter) #define IRTCClient2_get_EventFilter(This,plFilter) \ (This)->lpVtbl -> get_EventFilter(This,plFilter) #define IRTCClient2_SetPreferredMediaTypes(This,lMediaTypes,fPersistent) \ (This)->lpVtbl -> SetPreferredMediaTypes(This,lMediaTypes,fPersistent) #define IRTCClient2_get_PreferredMediaTypes(This,plMediaTypes) \ (This)->lpVtbl -> get_PreferredMediaTypes(This,plMediaTypes) #define IRTCClient2_get_MediaCapabilities(This,plMediaTypes) \ (This)->lpVtbl -> get_MediaCapabilities(This,plMediaTypes) #define IRTCClient2_CreateSession(This,enType,bstrLocalPhoneURI,pProfile,lFlags,ppSession) \ (This)->lpVtbl -> CreateSession(This,enType,bstrLocalPhoneURI,pProfile,lFlags,ppSession) #define IRTCClient2_put_ListenForIncomingSessions(This,enListen) \ (This)->lpVtbl -> put_ListenForIncomingSessions(This,enListen) #define IRTCClient2_get_ListenForIncomingSessions(This,penListen) \ (This)->lpVtbl -> get_ListenForIncomingSessions(This,penListen) #define IRTCClient2_get_NetworkAddresses(This,fTCP,fExternal,pvAddresses) \ (This)->lpVtbl -> get_NetworkAddresses(This,fTCP,fExternal,pvAddresses) #define IRTCClient2_put_Volume(This,enDevice,lVolume) \ (This)->lpVtbl -> put_Volume(This,enDevice,lVolume) #define IRTCClient2_get_Volume(This,enDevice,plVolume) \ (This)->lpVtbl -> get_Volume(This,enDevice,plVolume) #define IRTCClient2_put_AudioMuted(This,enDevice,fMuted) \ (This)->lpVtbl -> put_AudioMuted(This,enDevice,fMuted) #define IRTCClient2_get_AudioMuted(This,enDevice,pfMuted) \ (This)->lpVtbl -> get_AudioMuted(This,enDevice,pfMuted) #define IRTCClient2_get_IVideoWindow(This,enDevice,ppIVideoWindow) \ (This)->lpVtbl -> get_IVideoWindow(This,enDevice,ppIVideoWindow) #define IRTCClient2_put_PreferredAudioDevice(This,enDevice,bstrDeviceName) \ (This)->lpVtbl -> put_PreferredAudioDevice(This,enDevice,bstrDeviceName) #define IRTCClient2_get_PreferredAudioDevice(This,enDevice,pbstrDeviceName) \ (This)->lpVtbl -> get_PreferredAudioDevice(This,enDevice,pbstrDeviceName) #define IRTCClient2_put_PreferredVolume(This,enDevice,lVolume) \ (This)->lpVtbl -> put_PreferredVolume(This,enDevice,lVolume) #define IRTCClient2_get_PreferredVolume(This,enDevice,plVolume) \ (This)->lpVtbl -> get_PreferredVolume(This,enDevice,plVolume) #define IRTCClient2_put_PreferredAEC(This,bEnable) \ (This)->lpVtbl -> put_PreferredAEC(This,bEnable) #define IRTCClient2_get_PreferredAEC(This,pbEnabled) \ (This)->lpVtbl -> get_PreferredAEC(This,pbEnabled) #define IRTCClient2_put_PreferredVideoDevice(This,bstrDeviceName) \ (This)->lpVtbl -> put_PreferredVideoDevice(This,bstrDeviceName) #define IRTCClient2_get_PreferredVideoDevice(This,pbstrDeviceName) \ (This)->lpVtbl -> get_PreferredVideoDevice(This,pbstrDeviceName) #define IRTCClient2_get_ActiveMedia(This,plMediaType) \ (This)->lpVtbl -> get_ActiveMedia(This,plMediaType) #define IRTCClient2_put_MaxBitrate(This,lMaxBitrate) \ (This)->lpVtbl -> put_MaxBitrate(This,lMaxBitrate) #define IRTCClient2_get_MaxBitrate(This,plMaxBitrate) \ (This)->lpVtbl -> get_MaxBitrate(This,plMaxBitrate) #define IRTCClient2_put_TemporalSpatialTradeOff(This,lValue) \ (This)->lpVtbl -> put_TemporalSpatialTradeOff(This,lValue) #define IRTCClient2_get_TemporalSpatialTradeOff(This,plValue) \ (This)->lpVtbl -> get_TemporalSpatialTradeOff(This,plValue) #define IRTCClient2_get_NetworkQuality(This,plNetworkQuality) \ (This)->lpVtbl -> get_NetworkQuality(This,plNetworkQuality) #define IRTCClient2_StartT120Applet(This,enApplet) \ (This)->lpVtbl -> StartT120Applet(This,enApplet) #define IRTCClient2_StopT120Applets(This) \ (This)->lpVtbl -> StopT120Applets(This) #define IRTCClient2_get_IsT120AppletRunning(This,enApplet,pfRunning) \ (This)->lpVtbl -> get_IsT120AppletRunning(This,enApplet,pfRunning) #define IRTCClient2_get_LocalUserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_LocalUserURI(This,pbstrUserURI) #define IRTCClient2_put_LocalUserURI(This,bstrUserURI) \ (This)->lpVtbl -> put_LocalUserURI(This,bstrUserURI) #define IRTCClient2_get_LocalUserName(This,pbstrUserName) \ (This)->lpVtbl -> get_LocalUserName(This,pbstrUserName) #define IRTCClient2_put_LocalUserName(This,bstrUserName) \ (This)->lpVtbl -> put_LocalUserName(This,bstrUserName) #define IRTCClient2_PlayRing(This,enType,bPlay) \ (This)->lpVtbl -> PlayRing(This,enType,bPlay) #define IRTCClient2_SendDTMF(This,enDTMF) \ (This)->lpVtbl -> SendDTMF(This,enDTMF) #define IRTCClient2_InvokeTuningWizard(This,hwndParent) \ (This)->lpVtbl -> InvokeTuningWizard(This,hwndParent) #define IRTCClient2_get_IsTuned(This,pfTuned) \ (This)->lpVtbl -> get_IsTuned(This,pfTuned) #define IRTCClient2_put_AnswerMode(This,enType,enMode) \ (This)->lpVtbl -> put_AnswerMode(This,enType,enMode) #define IRTCClient2_get_AnswerMode(This,enType,penMode) \ (This)->lpVtbl -> get_AnswerMode(This,enType,penMode) #define IRTCClient2_InvokeTuningWizardEx(This,hwndParent,fAllowAudio,fAllowVideo) \ (This)->lpVtbl -> InvokeTuningWizardEx(This,hwndParent,fAllowAudio,fAllowVideo) #define IRTCClient2_get_Version(This,plVersion) \ (This)->lpVtbl -> get_Version(This,plVersion) #define IRTCClient2_put_ClientName(This,bstrClientName) \ (This)->lpVtbl -> put_ClientName(This,bstrClientName) #define IRTCClient2_put_ClientCurVer(This,bstrClientCurVer) \ (This)->lpVtbl -> put_ClientCurVer(This,bstrClientCurVer) #define IRTCClient2_InitializeEx(This,lFlags) \ (This)->lpVtbl -> InitializeEx(This,lFlags) #define IRTCClient2_CreateSessionWithDescription(This,bstrContentType,bstrSessionDescription,pProfile,lFlags,ppSession2) \ (This)->lpVtbl -> CreateSessionWithDescription(This,bstrContentType,bstrSessionDescription,pProfile,lFlags,ppSession2) #define IRTCClient2_SetSessionDescriptionManager(This,pSessionDescriptionManager) \ (This)->lpVtbl -> SetSessionDescriptionManager(This,pSessionDescriptionManager) #define IRTCClient2_put_PreferredSecurityLevel(This,enSecurityType,enSecurityLevel) \ (This)->lpVtbl -> put_PreferredSecurityLevel(This,enSecurityType,enSecurityLevel) #define IRTCClient2_get_PreferredSecurityLevel(This,enSecurityType,penSecurityLevel) \ (This)->lpVtbl -> get_PreferredSecurityLevel(This,enSecurityType,penSecurityLevel) #define IRTCClient2_put_AllowedPorts(This,lTransport,enListenMode) \ (This)->lpVtbl -> put_AllowedPorts(This,lTransport,enListenMode) #define IRTCClient2_get_AllowedPorts(This,lTransport,penListenMode) \ (This)->lpVtbl -> get_AllowedPorts(This,lTransport,penListenMode) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient2_put_AnswerMode_Proxy( IRTCClient2 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ RTC_ANSWER_MODE enMode); void __RPC_STUB IRTCClient2_put_AnswerMode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient2_get_AnswerMode_Proxy( IRTCClient2 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [retval][out] */ RTC_ANSWER_MODE *penMode); void __RPC_STUB IRTCClient2_get_AnswerMode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient2_InvokeTuningWizardEx_Proxy( IRTCClient2 * This, /* [in] */ OAHWND hwndParent, /* [in] */ VARIANT_BOOL fAllowAudio, /* [in] */ VARIANT_BOOL fAllowVideo); void __RPC_STUB IRTCClient2_InvokeTuningWizardEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient2_get_Version_Proxy( IRTCClient2 * This, /* [retval][out] */ long *plVersion); void __RPC_STUB IRTCClient2_get_Version_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient2_put_ClientName_Proxy( IRTCClient2 * This, /* [in] */ BSTR bstrClientName); void __RPC_STUB IRTCClient2_put_ClientName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient2_put_ClientCurVer_Proxy( IRTCClient2 * This, /* [in] */ BSTR bstrClientCurVer); void __RPC_STUB IRTCClient2_put_ClientCurVer_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient2_InitializeEx_Proxy( IRTCClient2 * This, /* [in] */ long lFlags); void __RPC_STUB IRTCClient2_InitializeEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient2_CreateSessionWithDescription_Proxy( IRTCClient2 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCSession2 **ppSession2); void __RPC_STUB IRTCClient2_CreateSessionWithDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClient2_SetSessionDescriptionManager_Proxy( IRTCClient2 * This, /* [in] */ IRTCSessionDescriptionManager *pSessionDescriptionManager); void __RPC_STUB IRTCClient2_SetSessionDescriptionManager_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient2_put_PreferredSecurityLevel_Proxy( IRTCClient2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel); void __RPC_STUB IRTCClient2_put_PreferredSecurityLevel_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient2_get_PreferredSecurityLevel_Proxy( IRTCClient2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); void __RPC_STUB IRTCClient2_get_PreferredSecurityLevel_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClient2_put_AllowedPorts_Proxy( IRTCClient2 * This, /* [in] */ long lTransport, /* [in] */ RTC_LISTEN_MODE enListenMode); void __RPC_STUB IRTCClient2_put_AllowedPorts_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClient2_get_AllowedPorts_Proxy( IRTCClient2 * This, /* [in] */ long lTransport, /* [retval][out] */ RTC_LISTEN_MODE *penListenMode); void __RPC_STUB IRTCClient2_get_AllowedPorts_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClient2_INTERFACE_DEFINED__ */ #ifndef __IRTCClientPresence_INTERFACE_DEFINED__ #define __IRTCClientPresence_INTERFACE_DEFINED__ /* interface IRTCClientPresence */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClientPresence; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("11c3cbcc-0744-42d1-968a-51aa1bb274c6") IRTCClientPresence : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnablePresence( /* [in] */ VARIANT_BOOL fUseStorage, /* [in] */ VARIANT varStorage) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Export( /* [in] */ VARIANT varStorage) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Import( /* [in] */ VARIANT varStorage, /* [in] */ VARIANT_BOOL fReplaceAll) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateBuddies( /* [retval][out] */ IRTCEnumBuddies **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Buddies( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Buddy( /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCBuddy **ppBuddy) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddBuddy( /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy **ppBuddy) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveBuddy( /* [in] */ IRTCBuddy *pBuddy) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateWatchers( /* [retval][out] */ IRTCEnumWatchers **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Watchers( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Watcher( /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher **ppWatcher) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddWatcher( /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fBlocked, /* [in] */ VARIANT_BOOL fPersistent, /* [retval][out] */ IRTCWatcher **ppWatcher) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveWatcher( /* [in] */ IRTCWatcher *pWatcher) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetLocalPresenceInfo( /* [in] */ RTC_PRESENCE_STATUS enStatus, /* [in] */ BSTR bstrNotes) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_OfferWatcherMode( /* [retval][out] */ RTC_OFFER_WATCHER_MODE *penMode) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_OfferWatcherMode( /* [in] */ RTC_OFFER_WATCHER_MODE enMode) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PrivacyMode( /* [retval][out] */ RTC_PRIVACY_MODE *penMode) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PrivacyMode( /* [in] */ RTC_PRIVACY_MODE enMode) = 0; }; #else /* C style interface */ typedef struct IRTCClientPresenceVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClientPresence * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClientPresence * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClientPresence * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnablePresence )( IRTCClientPresence * This, /* [in] */ VARIANT_BOOL fUseStorage, /* [in] */ VARIANT varStorage); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Export )( IRTCClientPresence * This, /* [in] */ VARIANT varStorage); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Import )( IRTCClientPresence * This, /* [in] */ VARIANT varStorage, /* [in] */ VARIANT_BOOL fReplaceAll); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateBuddies )( IRTCClientPresence * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddies )( IRTCClientPresence * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddy )( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCBuddy **ppBuddy); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddBuddy )( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy **ppBuddy); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveBuddy )( IRTCClientPresence * This, /* [in] */ IRTCBuddy *pBuddy); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateWatchers )( IRTCClientPresence * This, /* [retval][out] */ IRTCEnumWatchers **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Watchers )( IRTCClientPresence * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Watcher )( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher **ppWatcher); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddWatcher )( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fBlocked, /* [in] */ VARIANT_BOOL fPersistent, /* [retval][out] */ IRTCWatcher **ppWatcher); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveWatcher )( IRTCClientPresence * This, /* [in] */ IRTCWatcher *pWatcher); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetLocalPresenceInfo )( IRTCClientPresence * This, /* [in] */ RTC_PRESENCE_STATUS enStatus, /* [in] */ BSTR bstrNotes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OfferWatcherMode )( IRTCClientPresence * This, /* [retval][out] */ RTC_OFFER_WATCHER_MODE *penMode); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OfferWatcherMode )( IRTCClientPresence * This, /* [in] */ RTC_OFFER_WATCHER_MODE enMode); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PrivacyMode )( IRTCClientPresence * This, /* [retval][out] */ RTC_PRIVACY_MODE *penMode); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PrivacyMode )( IRTCClientPresence * This, /* [in] */ RTC_PRIVACY_MODE enMode); END_INTERFACE } IRTCClientPresenceVtbl; interface IRTCClientPresence { CONST_VTBL struct IRTCClientPresenceVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClientPresence_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClientPresence_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClientPresence_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClientPresence_EnablePresence(This,fUseStorage,varStorage) \ (This)->lpVtbl -> EnablePresence(This,fUseStorage,varStorage) #define IRTCClientPresence_Export(This,varStorage) \ (This)->lpVtbl -> Export(This,varStorage) #define IRTCClientPresence_Import(This,varStorage,fReplaceAll) \ (This)->lpVtbl -> Import(This,varStorage,fReplaceAll) #define IRTCClientPresence_EnumerateBuddies(This,ppEnum) \ (This)->lpVtbl -> EnumerateBuddies(This,ppEnum) #define IRTCClientPresence_get_Buddies(This,ppCollection) \ (This)->lpVtbl -> get_Buddies(This,ppCollection) #define IRTCClientPresence_get_Buddy(This,bstrPresentityURI,ppBuddy) \ (This)->lpVtbl -> get_Buddy(This,bstrPresentityURI,ppBuddy) #define IRTCClientPresence_AddBuddy(This,bstrPresentityURI,bstrUserName,bstrData,fPersistent,pProfile,lFlags,ppBuddy) \ (This)->lpVtbl -> AddBuddy(This,bstrPresentityURI,bstrUserName,bstrData,fPersistent,pProfile,lFlags,ppBuddy) #define IRTCClientPresence_RemoveBuddy(This,pBuddy) \ (This)->lpVtbl -> RemoveBuddy(This,pBuddy) #define IRTCClientPresence_EnumerateWatchers(This,ppEnum) \ (This)->lpVtbl -> EnumerateWatchers(This,ppEnum) #define IRTCClientPresence_get_Watchers(This,ppCollection) \ (This)->lpVtbl -> get_Watchers(This,ppCollection) #define IRTCClientPresence_get_Watcher(This,bstrPresentityURI,ppWatcher) \ (This)->lpVtbl -> get_Watcher(This,bstrPresentityURI,ppWatcher) #define IRTCClientPresence_AddWatcher(This,bstrPresentityURI,bstrUserName,bstrData,fBlocked,fPersistent,ppWatcher) \ (This)->lpVtbl -> AddWatcher(This,bstrPresentityURI,bstrUserName,bstrData,fBlocked,fPersistent,ppWatcher) #define IRTCClientPresence_RemoveWatcher(This,pWatcher) \ (This)->lpVtbl -> RemoveWatcher(This,pWatcher) #define IRTCClientPresence_SetLocalPresenceInfo(This,enStatus,bstrNotes) \ (This)->lpVtbl -> SetLocalPresenceInfo(This,enStatus,bstrNotes) #define IRTCClientPresence_get_OfferWatcherMode(This,penMode) \ (This)->lpVtbl -> get_OfferWatcherMode(This,penMode) #define IRTCClientPresence_put_OfferWatcherMode(This,enMode) \ (This)->lpVtbl -> put_OfferWatcherMode(This,enMode) #define IRTCClientPresence_get_PrivacyMode(This,penMode) \ (This)->lpVtbl -> get_PrivacyMode(This,penMode) #define IRTCClientPresence_put_PrivacyMode(This,enMode) \ (This)->lpVtbl -> put_PrivacyMode(This,enMode) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_EnablePresence_Proxy( IRTCClientPresence * This, /* [in] */ VARIANT_BOOL fUseStorage, /* [in] */ VARIANT varStorage); void __RPC_STUB IRTCClientPresence_EnablePresence_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_Export_Proxy( IRTCClientPresence * This, /* [in] */ VARIANT varStorage); void __RPC_STUB IRTCClientPresence_Export_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_Import_Proxy( IRTCClientPresence * This, /* [in] */ VARIANT varStorage, /* [in] */ VARIANT_BOOL fReplaceAll); void __RPC_STUB IRTCClientPresence_Import_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_EnumerateBuddies_Proxy( IRTCClientPresence * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); void __RPC_STUB IRTCClientPresence_EnumerateBuddies_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_get_Buddies_Proxy( IRTCClientPresence * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCClientPresence_get_Buddies_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_get_Buddy_Proxy( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCBuddy **ppBuddy); void __RPC_STUB IRTCClientPresence_get_Buddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_AddBuddy_Proxy( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy **ppBuddy); void __RPC_STUB IRTCClientPresence_AddBuddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_RemoveBuddy_Proxy( IRTCClientPresence * This, /* [in] */ IRTCBuddy *pBuddy); void __RPC_STUB IRTCClientPresence_RemoveBuddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_EnumerateWatchers_Proxy( IRTCClientPresence * This, /* [retval][out] */ IRTCEnumWatchers **ppEnum); void __RPC_STUB IRTCClientPresence_EnumerateWatchers_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_get_Watchers_Proxy( IRTCClientPresence * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCClientPresence_get_Watchers_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_get_Watcher_Proxy( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher **ppWatcher); void __RPC_STUB IRTCClientPresence_get_Watcher_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_AddWatcher_Proxy( IRTCClientPresence * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fBlocked, /* [in] */ VARIANT_BOOL fPersistent, /* [retval][out] */ IRTCWatcher **ppWatcher); void __RPC_STUB IRTCClientPresence_AddWatcher_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_RemoveWatcher_Proxy( IRTCClientPresence * This, /* [in] */ IRTCWatcher *pWatcher); void __RPC_STUB IRTCClientPresence_RemoveWatcher_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_SetLocalPresenceInfo_Proxy( IRTCClientPresence * This, /* [in] */ RTC_PRESENCE_STATUS enStatus, /* [in] */ BSTR bstrNotes); void __RPC_STUB IRTCClientPresence_SetLocalPresenceInfo_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_get_OfferWatcherMode_Proxy( IRTCClientPresence * This, /* [retval][out] */ RTC_OFFER_WATCHER_MODE *penMode); void __RPC_STUB IRTCClientPresence_get_OfferWatcherMode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_put_OfferWatcherMode_Proxy( IRTCClientPresence * This, /* [in] */ RTC_OFFER_WATCHER_MODE enMode); void __RPC_STUB IRTCClientPresence_put_OfferWatcherMode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_get_PrivacyMode_Proxy( IRTCClientPresence * This, /* [retval][out] */ RTC_PRIVACY_MODE *penMode); void __RPC_STUB IRTCClientPresence_get_PrivacyMode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence_put_PrivacyMode_Proxy( IRTCClientPresence * This, /* [in] */ RTC_PRIVACY_MODE enMode); void __RPC_STUB IRTCClientPresence_put_PrivacyMode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClientPresence_INTERFACE_DEFINED__ */ #ifndef __IRTCClientPresence2_INTERFACE_DEFINED__ #define __IRTCClientPresence2_INTERFACE_DEFINED__ /* interface IRTCClientPresence2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClientPresence2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("AD1809E8-62F7-4783-909A-29C9D2CB1D34") IRTCClientPresence2 : public IRTCClientPresence { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnablePresenceEx( /* [in] */ IRTCProfile *pProfile, /* [in] */ VARIANT varStorage, /* [in] */ long lFlags) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE DisablePresence( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddGroup( /* [in] */ BSTR bstrGroupName, /* [in] */ BSTR bstrData, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddyGroup **ppGroup) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveGroup( /* [in] */ IRTCBuddyGroup *pGroup) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateGroups( /* [retval][out] */ IRTCEnumGroups **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Groups( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Group( /* [in] */ BSTR bstrGroupName, /* [retval][out] */ IRTCBuddyGroup **ppGroup) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddWatcherEx( /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ RTC_WATCHER_STATE enState, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ RTC_ACE_SCOPE enScope, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCWatcher2 **ppWatcher) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_WatcherEx( /* [in] */ RTC_WATCHER_MATCH_MODE enMode, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher2 **ppWatcher) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PresenceProperty( /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [in] */ BSTR bstrProperty) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PresenceProperty( /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPresenceData( /* [in] */ BSTR bstrNamespace, /* [in] */ BSTR bstrData) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPresenceData( /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetLocalPresenceInfo( /* [out] */ RTC_PRESENCE_STATUS *penStatus, /* [out] */ BSTR *pbstrNotes) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddBuddyEx( /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ RTC_BUDDY_SUBSCRIPTION_TYPE enSubscriptionType, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy2 **ppBuddy) = 0; }; #else /* C style interface */ typedef struct IRTCClientPresence2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClientPresence2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClientPresence2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClientPresence2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnablePresence )( IRTCClientPresence2 * This, /* [in] */ VARIANT_BOOL fUseStorage, /* [in] */ VARIANT varStorage); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Export )( IRTCClientPresence2 * This, /* [in] */ VARIANT varStorage); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Import )( IRTCClientPresence2 * This, /* [in] */ VARIANT varStorage, /* [in] */ VARIANT_BOOL fReplaceAll); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateBuddies )( IRTCClientPresence2 * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddies )( IRTCClientPresence2 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddy )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCBuddy **ppBuddy); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddBuddy )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy **ppBuddy); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveBuddy )( IRTCClientPresence2 * This, /* [in] */ IRTCBuddy *pBuddy); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateWatchers )( IRTCClientPresence2 * This, /* [retval][out] */ IRTCEnumWatchers **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Watchers )( IRTCClientPresence2 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Watcher )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher **ppWatcher); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddWatcher )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fBlocked, /* [in] */ VARIANT_BOOL fPersistent, /* [retval][out] */ IRTCWatcher **ppWatcher); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveWatcher )( IRTCClientPresence2 * This, /* [in] */ IRTCWatcher *pWatcher); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetLocalPresenceInfo )( IRTCClientPresence2 * This, /* [in] */ RTC_PRESENCE_STATUS enStatus, /* [in] */ BSTR bstrNotes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OfferWatcherMode )( IRTCClientPresence2 * This, /* [retval][out] */ RTC_OFFER_WATCHER_MODE *penMode); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OfferWatcherMode )( IRTCClientPresence2 * This, /* [in] */ RTC_OFFER_WATCHER_MODE enMode); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PrivacyMode )( IRTCClientPresence2 * This, /* [retval][out] */ RTC_PRIVACY_MODE *penMode); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PrivacyMode )( IRTCClientPresence2 * This, /* [in] */ RTC_PRIVACY_MODE enMode); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnablePresenceEx )( IRTCClientPresence2 * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ VARIANT varStorage, /* [in] */ long lFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *DisablePresence )( IRTCClientPresence2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddGroup )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrGroupName, /* [in] */ BSTR bstrData, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddyGroup **ppGroup); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveGroup )( IRTCClientPresence2 * This, /* [in] */ IRTCBuddyGroup *pGroup); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateGroups )( IRTCClientPresence2 * This, /* [retval][out] */ IRTCEnumGroups **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Groups )( IRTCClientPresence2 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Group )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrGroupName, /* [retval][out] */ IRTCBuddyGroup **ppGroup); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddWatcherEx )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ RTC_WATCHER_STATE enState, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ RTC_ACE_SCOPE enScope, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCWatcher2 **ppWatcher); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_WatcherEx )( IRTCClientPresence2 * This, /* [in] */ RTC_WATCHER_MATCH_MODE enMode, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher2 **ppWatcher); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PresenceProperty )( IRTCClientPresence2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [in] */ BSTR bstrProperty); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresenceProperty )( IRTCClientPresence2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPresenceData )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrNamespace, /* [in] */ BSTR bstrData); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPresenceData )( IRTCClientPresence2 * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetLocalPresenceInfo )( IRTCClientPresence2 * This, /* [out] */ RTC_PRESENCE_STATUS *penStatus, /* [out] */ BSTR *pbstrNotes); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddBuddyEx )( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ RTC_BUDDY_SUBSCRIPTION_TYPE enSubscriptionType, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy2 **ppBuddy); END_INTERFACE } IRTCClientPresence2Vtbl; interface IRTCClientPresence2 { CONST_VTBL struct IRTCClientPresence2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClientPresence2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClientPresence2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClientPresence2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClientPresence2_EnablePresence(This,fUseStorage,varStorage) \ (This)->lpVtbl -> EnablePresence(This,fUseStorage,varStorage) #define IRTCClientPresence2_Export(This,varStorage) \ (This)->lpVtbl -> Export(This,varStorage) #define IRTCClientPresence2_Import(This,varStorage,fReplaceAll) \ (This)->lpVtbl -> Import(This,varStorage,fReplaceAll) #define IRTCClientPresence2_EnumerateBuddies(This,ppEnum) \ (This)->lpVtbl -> EnumerateBuddies(This,ppEnum) #define IRTCClientPresence2_get_Buddies(This,ppCollection) \ (This)->lpVtbl -> get_Buddies(This,ppCollection) #define IRTCClientPresence2_get_Buddy(This,bstrPresentityURI,ppBuddy) \ (This)->lpVtbl -> get_Buddy(This,bstrPresentityURI,ppBuddy) #define IRTCClientPresence2_AddBuddy(This,bstrPresentityURI,bstrUserName,bstrData,fPersistent,pProfile,lFlags,ppBuddy) \ (This)->lpVtbl -> AddBuddy(This,bstrPresentityURI,bstrUserName,bstrData,fPersistent,pProfile,lFlags,ppBuddy) #define IRTCClientPresence2_RemoveBuddy(This,pBuddy) \ (This)->lpVtbl -> RemoveBuddy(This,pBuddy) #define IRTCClientPresence2_EnumerateWatchers(This,ppEnum) \ (This)->lpVtbl -> EnumerateWatchers(This,ppEnum) #define IRTCClientPresence2_get_Watchers(This,ppCollection) \ (This)->lpVtbl -> get_Watchers(This,ppCollection) #define IRTCClientPresence2_get_Watcher(This,bstrPresentityURI,ppWatcher) \ (This)->lpVtbl -> get_Watcher(This,bstrPresentityURI,ppWatcher) #define IRTCClientPresence2_AddWatcher(This,bstrPresentityURI,bstrUserName,bstrData,fBlocked,fPersistent,ppWatcher) \ (This)->lpVtbl -> AddWatcher(This,bstrPresentityURI,bstrUserName,bstrData,fBlocked,fPersistent,ppWatcher) #define IRTCClientPresence2_RemoveWatcher(This,pWatcher) \ (This)->lpVtbl -> RemoveWatcher(This,pWatcher) #define IRTCClientPresence2_SetLocalPresenceInfo(This,enStatus,bstrNotes) \ (This)->lpVtbl -> SetLocalPresenceInfo(This,enStatus,bstrNotes) #define IRTCClientPresence2_get_OfferWatcherMode(This,penMode) \ (This)->lpVtbl -> get_OfferWatcherMode(This,penMode) #define IRTCClientPresence2_put_OfferWatcherMode(This,enMode) \ (This)->lpVtbl -> put_OfferWatcherMode(This,enMode) #define IRTCClientPresence2_get_PrivacyMode(This,penMode) \ (This)->lpVtbl -> get_PrivacyMode(This,penMode) #define IRTCClientPresence2_put_PrivacyMode(This,enMode) \ (This)->lpVtbl -> put_PrivacyMode(This,enMode) #define IRTCClientPresence2_EnablePresenceEx(This,pProfile,varStorage,lFlags) \ (This)->lpVtbl -> EnablePresenceEx(This,pProfile,varStorage,lFlags) #define IRTCClientPresence2_DisablePresence(This) \ (This)->lpVtbl -> DisablePresence(This) #define IRTCClientPresence2_AddGroup(This,bstrGroupName,bstrData,pProfile,lFlags,ppGroup) \ (This)->lpVtbl -> AddGroup(This,bstrGroupName,bstrData,pProfile,lFlags,ppGroup) #define IRTCClientPresence2_RemoveGroup(This,pGroup) \ (This)->lpVtbl -> RemoveGroup(This,pGroup) #define IRTCClientPresence2_EnumerateGroups(This,ppEnum) \ (This)->lpVtbl -> EnumerateGroups(This,ppEnum) #define IRTCClientPresence2_get_Groups(This,ppCollection) \ (This)->lpVtbl -> get_Groups(This,ppCollection) #define IRTCClientPresence2_get_Group(This,bstrGroupName,ppGroup) \ (This)->lpVtbl -> get_Group(This,bstrGroupName,ppGroup) #define IRTCClientPresence2_AddWatcherEx(This,bstrPresentityURI,bstrUserName,bstrData,enState,fPersistent,enScope,pProfile,lFlags,ppWatcher) \ (This)->lpVtbl -> AddWatcherEx(This,bstrPresentityURI,bstrUserName,bstrData,enState,fPersistent,enScope,pProfile,lFlags,ppWatcher) #define IRTCClientPresence2_get_WatcherEx(This,enMode,bstrPresentityURI,ppWatcher) \ (This)->lpVtbl -> get_WatcherEx(This,enMode,bstrPresentityURI,ppWatcher) #define IRTCClientPresence2_put_PresenceProperty(This,enProperty,bstrProperty) \ (This)->lpVtbl -> put_PresenceProperty(This,enProperty,bstrProperty) #define IRTCClientPresence2_get_PresenceProperty(This,enProperty,pbstrProperty) \ (This)->lpVtbl -> get_PresenceProperty(This,enProperty,pbstrProperty) #define IRTCClientPresence2_SetPresenceData(This,bstrNamespace,bstrData) \ (This)->lpVtbl -> SetPresenceData(This,bstrNamespace,bstrData) #define IRTCClientPresence2_GetPresenceData(This,pbstrNamespace,pbstrData) \ (This)->lpVtbl -> GetPresenceData(This,pbstrNamespace,pbstrData) #define IRTCClientPresence2_GetLocalPresenceInfo(This,penStatus,pbstrNotes) \ (This)->lpVtbl -> GetLocalPresenceInfo(This,penStatus,pbstrNotes) #define IRTCClientPresence2_AddBuddyEx(This,bstrPresentityURI,bstrUserName,bstrData,fPersistent,enSubscriptionType,pProfile,lFlags,ppBuddy) \ (This)->lpVtbl -> AddBuddyEx(This,bstrPresentityURI,bstrUserName,bstrData,fPersistent,enSubscriptionType,pProfile,lFlags,ppBuddy) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_EnablePresenceEx_Proxy( IRTCClientPresence2 * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ VARIANT varStorage, /* [in] */ long lFlags); void __RPC_STUB IRTCClientPresence2_EnablePresenceEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_DisablePresence_Proxy( IRTCClientPresence2 * This); void __RPC_STUB IRTCClientPresence2_DisablePresence_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_AddGroup_Proxy( IRTCClientPresence2 * This, /* [in] */ BSTR bstrGroupName, /* [in] */ BSTR bstrData, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddyGroup **ppGroup); void __RPC_STUB IRTCClientPresence2_AddGroup_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_RemoveGroup_Proxy( IRTCClientPresence2 * This, /* [in] */ IRTCBuddyGroup *pGroup); void __RPC_STUB IRTCClientPresence2_RemoveGroup_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_EnumerateGroups_Proxy( IRTCClientPresence2 * This, /* [retval][out] */ IRTCEnumGroups **ppEnum); void __RPC_STUB IRTCClientPresence2_EnumerateGroups_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_get_Groups_Proxy( IRTCClientPresence2 * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCClientPresence2_get_Groups_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_get_Group_Proxy( IRTCClientPresence2 * This, /* [in] */ BSTR bstrGroupName, /* [retval][out] */ IRTCBuddyGroup **ppGroup); void __RPC_STUB IRTCClientPresence2_get_Group_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_AddWatcherEx_Proxy( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ RTC_WATCHER_STATE enState, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ RTC_ACE_SCOPE enScope, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCWatcher2 **ppWatcher); void __RPC_STUB IRTCClientPresence2_AddWatcherEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_get_WatcherEx_Proxy( IRTCClientPresence2 * This, /* [in] */ RTC_WATCHER_MATCH_MODE enMode, /* [in] */ BSTR bstrPresentityURI, /* [retval][out] */ IRTCWatcher2 **ppWatcher); void __RPC_STUB IRTCClientPresence2_get_WatcherEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_put_PresenceProperty_Proxy( IRTCClientPresence2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [in] */ BSTR bstrProperty); void __RPC_STUB IRTCClientPresence2_put_PresenceProperty_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_get_PresenceProperty_Proxy( IRTCClientPresence2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); void __RPC_STUB IRTCClientPresence2_get_PresenceProperty_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_SetPresenceData_Proxy( IRTCClientPresence2 * This, /* [in] */ BSTR bstrNamespace, /* [in] */ BSTR bstrData); void __RPC_STUB IRTCClientPresence2_SetPresenceData_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_GetPresenceData_Proxy( IRTCClientPresence2 * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); void __RPC_STUB IRTCClientPresence2_GetPresenceData_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_GetLocalPresenceInfo_Proxy( IRTCClientPresence2 * This, /* [out] */ RTC_PRESENCE_STATUS *penStatus, /* [out] */ BSTR *pbstrNotes); void __RPC_STUB IRTCClientPresence2_GetLocalPresenceInfo_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPresence2_AddBuddyEx_Proxy( IRTCClientPresence2 * This, /* [in] */ BSTR bstrPresentityURI, /* [in] */ BSTR bstrUserName, /* [in] */ BSTR bstrData, /* [in] */ VARIANT_BOOL fPersistent, /* [in] */ RTC_BUDDY_SUBSCRIPTION_TYPE enSubscriptionType, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags, /* [retval][out] */ IRTCBuddy2 **ppBuddy); void __RPC_STUB IRTCClientPresence2_AddBuddyEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClientPresence2_INTERFACE_DEFINED__ */ #ifndef __IRTCClientProvisioning_INTERFACE_DEFINED__ #define __IRTCClientProvisioning_INTERFACE_DEFINED__ /* interface IRTCClientProvisioning */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClientProvisioning; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("B9F5CF06-65B9-4a80-A0E6-73CAE3EF3822") IRTCClientProvisioning : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateProfile( /* [in] */ BSTR bstrProfileXML, /* [retval][out] */ IRTCProfile **ppProfile) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnableProfile( /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE DisableProfile( /* [in] */ IRTCProfile *pProfile) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateProfiles( /* [retval][out] */ IRTCEnumProfiles **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Profiles( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetProfile( /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrUserPassword, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrServer, /* [in] */ long lTransport, /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SessionCapabilities( /* [retval][out] */ long *plSupportedSessions) = 0; }; #else /* C style interface */ typedef struct IRTCClientProvisioningVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClientProvisioning * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClientProvisioning * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClientProvisioning * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateProfile )( IRTCClientProvisioning * This, /* [in] */ BSTR bstrProfileXML, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableProfile )( IRTCClientProvisioning * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *DisableProfile )( IRTCClientProvisioning * This, /* [in] */ IRTCProfile *pProfile); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateProfiles )( IRTCClientProvisioning * This, /* [retval][out] */ IRTCEnumProfiles **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profiles )( IRTCClientProvisioning * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetProfile )( IRTCClientProvisioning * This, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrUserPassword, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrServer, /* [in] */ long lTransport, /* [in] */ LONG_PTR lCookie); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SessionCapabilities )( IRTCClientProvisioning * This, /* [retval][out] */ long *plSupportedSessions); END_INTERFACE } IRTCClientProvisioningVtbl; interface IRTCClientProvisioning { CONST_VTBL struct IRTCClientProvisioningVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClientProvisioning_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClientProvisioning_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClientProvisioning_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClientProvisioning_CreateProfile(This,bstrProfileXML,ppProfile) \ (This)->lpVtbl -> CreateProfile(This,bstrProfileXML,ppProfile) #define IRTCClientProvisioning_EnableProfile(This,pProfile,lRegisterFlags) \ (This)->lpVtbl -> EnableProfile(This,pProfile,lRegisterFlags) #define IRTCClientProvisioning_DisableProfile(This,pProfile) \ (This)->lpVtbl -> DisableProfile(This,pProfile) #define IRTCClientProvisioning_EnumerateProfiles(This,ppEnum) \ (This)->lpVtbl -> EnumerateProfiles(This,ppEnum) #define IRTCClientProvisioning_get_Profiles(This,ppCollection) \ (This)->lpVtbl -> get_Profiles(This,ppCollection) #define IRTCClientProvisioning_GetProfile(This,bstrUserAccount,bstrUserPassword,bstrUserURI,bstrServer,lTransport,lCookie) \ (This)->lpVtbl -> GetProfile(This,bstrUserAccount,bstrUserPassword,bstrUserURI,bstrServer,lTransport,lCookie) #define IRTCClientProvisioning_get_SessionCapabilities(This,plSupportedSessions) \ (This)->lpVtbl -> get_SessionCapabilities(This,plSupportedSessions) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_CreateProfile_Proxy( IRTCClientProvisioning * This, /* [in] */ BSTR bstrProfileXML, /* [retval][out] */ IRTCProfile **ppProfile); void __RPC_STUB IRTCClientProvisioning_CreateProfile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_EnableProfile_Proxy( IRTCClientProvisioning * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags); void __RPC_STUB IRTCClientProvisioning_EnableProfile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_DisableProfile_Proxy( IRTCClientProvisioning * This, /* [in] */ IRTCProfile *pProfile); void __RPC_STUB IRTCClientProvisioning_DisableProfile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_EnumerateProfiles_Proxy( IRTCClientProvisioning * This, /* [retval][out] */ IRTCEnumProfiles **ppEnum); void __RPC_STUB IRTCClientProvisioning_EnumerateProfiles_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_get_Profiles_Proxy( IRTCClientProvisioning * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCClientProvisioning_get_Profiles_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_GetProfile_Proxy( IRTCClientProvisioning * This, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrUserPassword, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrServer, /* [in] */ long lTransport, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCClientProvisioning_GetProfile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning_get_SessionCapabilities_Proxy( IRTCClientProvisioning * This, /* [retval][out] */ long *plSupportedSessions); void __RPC_STUB IRTCClientProvisioning_get_SessionCapabilities_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClientProvisioning_INTERFACE_DEFINED__ */ #ifndef __IRTCClientProvisioning2_INTERFACE_DEFINED__ #define __IRTCClientProvisioning2_INTERFACE_DEFINED__ /* interface IRTCClientProvisioning2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClientProvisioning2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("A70909B5-F40E-4587-BB75-E6BC0845023E") IRTCClientProvisioning2 : public IRTCClientProvisioning { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnableProfileEx( /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags, /* [in] */ long lRoamingFlags) = 0; }; #else /* C style interface */ typedef struct IRTCClientProvisioning2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClientProvisioning2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClientProvisioning2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClientProvisioning2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateProfile )( IRTCClientProvisioning2 * This, /* [in] */ BSTR bstrProfileXML, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableProfile )( IRTCClientProvisioning2 * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *DisableProfile )( IRTCClientProvisioning2 * This, /* [in] */ IRTCProfile *pProfile); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateProfiles )( IRTCClientProvisioning2 * This, /* [retval][out] */ IRTCEnumProfiles **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profiles )( IRTCClientProvisioning2 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetProfile )( IRTCClientProvisioning2 * This, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrUserPassword, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrServer, /* [in] */ long lTransport, /* [in] */ LONG_PTR lCookie); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SessionCapabilities )( IRTCClientProvisioning2 * This, /* [retval][out] */ long *plSupportedSessions); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableProfileEx )( IRTCClientProvisioning2 * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags, /* [in] */ long lRoamingFlags); END_INTERFACE } IRTCClientProvisioning2Vtbl; interface IRTCClientProvisioning2 { CONST_VTBL struct IRTCClientProvisioning2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClientProvisioning2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClientProvisioning2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClientProvisioning2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClientProvisioning2_CreateProfile(This,bstrProfileXML,ppProfile) \ (This)->lpVtbl -> CreateProfile(This,bstrProfileXML,ppProfile) #define IRTCClientProvisioning2_EnableProfile(This,pProfile,lRegisterFlags) \ (This)->lpVtbl -> EnableProfile(This,pProfile,lRegisterFlags) #define IRTCClientProvisioning2_DisableProfile(This,pProfile) \ (This)->lpVtbl -> DisableProfile(This,pProfile) #define IRTCClientProvisioning2_EnumerateProfiles(This,ppEnum) \ (This)->lpVtbl -> EnumerateProfiles(This,ppEnum) #define IRTCClientProvisioning2_get_Profiles(This,ppCollection) \ (This)->lpVtbl -> get_Profiles(This,ppCollection) #define IRTCClientProvisioning2_GetProfile(This,bstrUserAccount,bstrUserPassword,bstrUserURI,bstrServer,lTransport,lCookie) \ (This)->lpVtbl -> GetProfile(This,bstrUserAccount,bstrUserPassword,bstrUserURI,bstrServer,lTransport,lCookie) #define IRTCClientProvisioning2_get_SessionCapabilities(This,plSupportedSessions) \ (This)->lpVtbl -> get_SessionCapabilities(This,plSupportedSessions) #define IRTCClientProvisioning2_EnableProfileEx(This,pProfile,lRegisterFlags,lRoamingFlags) \ (This)->lpVtbl -> EnableProfileEx(This,pProfile,lRegisterFlags,lRoamingFlags) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientProvisioning2_EnableProfileEx_Proxy( IRTCClientProvisioning2 * This, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lRegisterFlags, /* [in] */ long lRoamingFlags); void __RPC_STUB IRTCClientProvisioning2_EnableProfileEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClientProvisioning2_INTERFACE_DEFINED__ */ #ifndef __IRTCProfile_INTERFACE_DEFINED__ #define __IRTCProfile_INTERFACE_DEFINED__ /* interface IRTCProfile */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCProfile; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("d07eca9e-4062-4dd4-9e7d-722a49ba7303") IRTCProfile : public IUnknown { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Key( /* [retval][out] */ BSTR *pbstrKey) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ BSTR *pbstrName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_XML( /* [retval][out] */ BSTR *pbstrXML) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ProviderName( /* [retval][out] */ BSTR *pbstrName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ProviderURI( /* [in] */ RTC_PROVIDER_URI enURI, /* [retval][out] */ BSTR *pbstrURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ProviderData( /* [retval][out] */ BSTR *pbstrData) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClientName( /* [retval][out] */ BSTR *pbstrName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClientBanner( /* [retval][out] */ VARIANT_BOOL *pfBanner) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClientMinVer( /* [retval][out] */ BSTR *pbstrMinVer) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClientCurVer( /* [retval][out] */ BSTR *pbstrCurVer) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClientUpdateURI( /* [retval][out] */ BSTR *pbstrUpdateURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClientData( /* [retval][out] */ BSTR *pbstrData) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_UserURI( /* [retval][out] */ BSTR *pbstrUserURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_UserName( /* [retval][out] */ BSTR *pbstrUserName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_UserAccount( /* [retval][out] */ BSTR *pbstrUserAccount) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCredentials( /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrPassword) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SessionCapabilities( /* [retval][out] */ long *plSupportedSessions) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_REGISTRATION_STATE *penState) = 0; }; #else /* C style interface */ typedef struct IRTCProfileVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCProfile * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCProfile * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCProfile * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Key )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrKey); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_XML )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrXML); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderName )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderURI )( IRTCProfile * This, /* [in] */ RTC_PROVIDER_URI enURI, /* [retval][out] */ BSTR *pbstrURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderData )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientName )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientBanner )( IRTCProfile * This, /* [retval][out] */ VARIANT_BOOL *pfBanner); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientMinVer )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrMinVer); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientCurVer )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrCurVer); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientUpdateURI )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUpdateURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientData )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserURI )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserName )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserAccount )( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUserAccount); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCredentials )( IRTCProfile * This, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrPassword); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SessionCapabilities )( IRTCProfile * This, /* [retval][out] */ long *plSupportedSessions); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCProfile * This, /* [retval][out] */ RTC_REGISTRATION_STATE *penState); END_INTERFACE } IRTCProfileVtbl; interface IRTCProfile { CONST_VTBL struct IRTCProfileVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCProfile_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCProfile_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCProfile_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCProfile_get_Key(This,pbstrKey) \ (This)->lpVtbl -> get_Key(This,pbstrKey) #define IRTCProfile_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCProfile_get_XML(This,pbstrXML) \ (This)->lpVtbl -> get_XML(This,pbstrXML) #define IRTCProfile_get_ProviderName(This,pbstrName) \ (This)->lpVtbl -> get_ProviderName(This,pbstrName) #define IRTCProfile_get_ProviderURI(This,enURI,pbstrURI) \ (This)->lpVtbl -> get_ProviderURI(This,enURI,pbstrURI) #define IRTCProfile_get_ProviderData(This,pbstrData) \ (This)->lpVtbl -> get_ProviderData(This,pbstrData) #define IRTCProfile_get_ClientName(This,pbstrName) \ (This)->lpVtbl -> get_ClientName(This,pbstrName) #define IRTCProfile_get_ClientBanner(This,pfBanner) \ (This)->lpVtbl -> get_ClientBanner(This,pfBanner) #define IRTCProfile_get_ClientMinVer(This,pbstrMinVer) \ (This)->lpVtbl -> get_ClientMinVer(This,pbstrMinVer) #define IRTCProfile_get_ClientCurVer(This,pbstrCurVer) \ (This)->lpVtbl -> get_ClientCurVer(This,pbstrCurVer) #define IRTCProfile_get_ClientUpdateURI(This,pbstrUpdateURI) \ (This)->lpVtbl -> get_ClientUpdateURI(This,pbstrUpdateURI) #define IRTCProfile_get_ClientData(This,pbstrData) \ (This)->lpVtbl -> get_ClientData(This,pbstrData) #define IRTCProfile_get_UserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_UserURI(This,pbstrUserURI) #define IRTCProfile_get_UserName(This,pbstrUserName) \ (This)->lpVtbl -> get_UserName(This,pbstrUserName) #define IRTCProfile_get_UserAccount(This,pbstrUserAccount) \ (This)->lpVtbl -> get_UserAccount(This,pbstrUserAccount) #define IRTCProfile_SetCredentials(This,bstrUserURI,bstrUserAccount,bstrPassword) \ (This)->lpVtbl -> SetCredentials(This,bstrUserURI,bstrUserAccount,bstrPassword) #define IRTCProfile_get_SessionCapabilities(This,plSupportedSessions) \ (This)->lpVtbl -> get_SessionCapabilities(This,plSupportedSessions) #define IRTCProfile_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_Key_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrKey); void __RPC_STUB IRTCProfile_get_Key_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_Name_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrName); void __RPC_STUB IRTCProfile_get_Name_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_XML_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrXML); void __RPC_STUB IRTCProfile_get_XML_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ProviderName_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrName); void __RPC_STUB IRTCProfile_get_ProviderName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ProviderURI_Proxy( IRTCProfile * This, /* [in] */ RTC_PROVIDER_URI enURI, /* [retval][out] */ BSTR *pbstrURI); void __RPC_STUB IRTCProfile_get_ProviderURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ProviderData_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrData); void __RPC_STUB IRTCProfile_get_ProviderData_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ClientName_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrName); void __RPC_STUB IRTCProfile_get_ClientName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ClientBanner_Proxy( IRTCProfile * This, /* [retval][out] */ VARIANT_BOOL *pfBanner); void __RPC_STUB IRTCProfile_get_ClientBanner_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ClientMinVer_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrMinVer); void __RPC_STUB IRTCProfile_get_ClientMinVer_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ClientCurVer_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrCurVer); void __RPC_STUB IRTCProfile_get_ClientCurVer_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ClientUpdateURI_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUpdateURI); void __RPC_STUB IRTCProfile_get_ClientUpdateURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_ClientData_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrData); void __RPC_STUB IRTCProfile_get_ClientData_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_UserURI_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUserURI); void __RPC_STUB IRTCProfile_get_UserURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_UserName_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUserName); void __RPC_STUB IRTCProfile_get_UserName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_UserAccount_Proxy( IRTCProfile * This, /* [retval][out] */ BSTR *pbstrUserAccount); void __RPC_STUB IRTCProfile_get_UserAccount_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCProfile_SetCredentials_Proxy( IRTCProfile * This, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrPassword); void __RPC_STUB IRTCProfile_SetCredentials_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_SessionCapabilities_Proxy( IRTCProfile * This, /* [retval][out] */ long *plSupportedSessions); void __RPC_STUB IRTCProfile_get_SessionCapabilities_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile_get_State_Proxy( IRTCProfile * This, /* [retval][out] */ RTC_REGISTRATION_STATE *penState); void __RPC_STUB IRTCProfile_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCProfile_INTERFACE_DEFINED__ */ #ifndef __IRTCProfile2_INTERFACE_DEFINED__ #define __IRTCProfile2_INTERFACE_DEFINED__ /* interface IRTCProfile2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCProfile2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("4B81F84E-BDC7-4184-9154-3CB2DD7917FB") IRTCProfile2 : public IRTCProfile { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Realm( /* [retval][out] */ BSTR *pbstrRealm) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Realm( /* [in] */ BSTR bstrRealm) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AllowedAuth( /* [retval][out] */ long *plAllowedAuth) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_AllowedAuth( /* [in] */ long lAllowedAuth) = 0; }; #else /* C style interface */ typedef struct IRTCProfile2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCProfile2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCProfile2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCProfile2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Key )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrKey); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_XML )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrXML); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderName )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderURI )( IRTCProfile2 * This, /* [in] */ RTC_PROVIDER_URI enURI, /* [retval][out] */ BSTR *pbstrURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderData )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientName )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientBanner )( IRTCProfile2 * This, /* [retval][out] */ VARIANT_BOOL *pfBanner); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientMinVer )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrMinVer); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientCurVer )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrCurVer); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientUpdateURI )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrUpdateURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientData )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserURI )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserName )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserAccount )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrUserAccount); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCredentials )( IRTCProfile2 * This, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrPassword); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SessionCapabilities )( IRTCProfile2 * This, /* [retval][out] */ long *plSupportedSessions); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCProfile2 * This, /* [retval][out] */ RTC_REGISTRATION_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Realm )( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrRealm); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Realm )( IRTCProfile2 * This, /* [in] */ BSTR bstrRealm); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowedAuth )( IRTCProfile2 * This, /* [retval][out] */ long *plAllowedAuth); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowedAuth )( IRTCProfile2 * This, /* [in] */ long lAllowedAuth); END_INTERFACE } IRTCProfile2Vtbl; interface IRTCProfile2 { CONST_VTBL struct IRTCProfile2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCProfile2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCProfile2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCProfile2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCProfile2_get_Key(This,pbstrKey) \ (This)->lpVtbl -> get_Key(This,pbstrKey) #define IRTCProfile2_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCProfile2_get_XML(This,pbstrXML) \ (This)->lpVtbl -> get_XML(This,pbstrXML) #define IRTCProfile2_get_ProviderName(This,pbstrName) \ (This)->lpVtbl -> get_ProviderName(This,pbstrName) #define IRTCProfile2_get_ProviderURI(This,enURI,pbstrURI) \ (This)->lpVtbl -> get_ProviderURI(This,enURI,pbstrURI) #define IRTCProfile2_get_ProviderData(This,pbstrData) \ (This)->lpVtbl -> get_ProviderData(This,pbstrData) #define IRTCProfile2_get_ClientName(This,pbstrName) \ (This)->lpVtbl -> get_ClientName(This,pbstrName) #define IRTCProfile2_get_ClientBanner(This,pfBanner) \ (This)->lpVtbl -> get_ClientBanner(This,pfBanner) #define IRTCProfile2_get_ClientMinVer(This,pbstrMinVer) \ (This)->lpVtbl -> get_ClientMinVer(This,pbstrMinVer) #define IRTCProfile2_get_ClientCurVer(This,pbstrCurVer) \ (This)->lpVtbl -> get_ClientCurVer(This,pbstrCurVer) #define IRTCProfile2_get_ClientUpdateURI(This,pbstrUpdateURI) \ (This)->lpVtbl -> get_ClientUpdateURI(This,pbstrUpdateURI) #define IRTCProfile2_get_ClientData(This,pbstrData) \ (This)->lpVtbl -> get_ClientData(This,pbstrData) #define IRTCProfile2_get_UserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_UserURI(This,pbstrUserURI) #define IRTCProfile2_get_UserName(This,pbstrUserName) \ (This)->lpVtbl -> get_UserName(This,pbstrUserName) #define IRTCProfile2_get_UserAccount(This,pbstrUserAccount) \ (This)->lpVtbl -> get_UserAccount(This,pbstrUserAccount) #define IRTCProfile2_SetCredentials(This,bstrUserURI,bstrUserAccount,bstrPassword) \ (This)->lpVtbl -> SetCredentials(This,bstrUserURI,bstrUserAccount,bstrPassword) #define IRTCProfile2_get_SessionCapabilities(This,plSupportedSessions) \ (This)->lpVtbl -> get_SessionCapabilities(This,plSupportedSessions) #define IRTCProfile2_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCProfile2_get_Realm(This,pbstrRealm) \ (This)->lpVtbl -> get_Realm(This,pbstrRealm) #define IRTCProfile2_put_Realm(This,bstrRealm) \ (This)->lpVtbl -> put_Realm(This,bstrRealm) #define IRTCProfile2_get_AllowedAuth(This,plAllowedAuth) \ (This)->lpVtbl -> get_AllowedAuth(This,plAllowedAuth) #define IRTCProfile2_put_AllowedAuth(This,lAllowedAuth) \ (This)->lpVtbl -> put_AllowedAuth(This,lAllowedAuth) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile2_get_Realm_Proxy( IRTCProfile2 * This, /* [retval][out] */ BSTR *pbstrRealm); void __RPC_STUB IRTCProfile2_get_Realm_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCProfile2_put_Realm_Proxy( IRTCProfile2 * This, /* [in] */ BSTR bstrRealm); void __RPC_STUB IRTCProfile2_put_Realm_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfile2_get_AllowedAuth_Proxy( IRTCProfile2 * This, /* [retval][out] */ long *plAllowedAuth); void __RPC_STUB IRTCProfile2_get_AllowedAuth_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCProfile2_put_AllowedAuth_Proxy( IRTCProfile2 * This, /* [in] */ long lAllowedAuth); void __RPC_STUB IRTCProfile2_put_AllowedAuth_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCProfile2_INTERFACE_DEFINED__ */ #ifndef __IRTCProfile3_INTERFACE_DEFINED__ #define __IRTCProfile3_INTERFACE_DEFINED__ /* interface IRTCProfile3 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCProfile3; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("051caa1d-2e4e-4187-b947-69a0c99ba70b") IRTCProfile3 : public IRTCProfile2 { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetServer( /* [out] */ BSTR *pbstrServer, /* [out] */ long *plTransport) = 0; }; #else /* C style interface */ typedef struct IRTCProfile3Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCProfile3 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCProfile3 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCProfile3 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Key )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrKey); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_XML )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrXML); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderName )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderURI )( IRTCProfile3 * This, /* [in] */ RTC_PROVIDER_URI enURI, /* [retval][out] */ BSTR *pbstrURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProviderData )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientName )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientBanner )( IRTCProfile3 * This, /* [retval][out] */ VARIANT_BOOL *pfBanner); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientMinVer )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrMinVer); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientCurVer )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrCurVer); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientUpdateURI )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrUpdateURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClientData )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserURI )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserName )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserAccount )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrUserAccount); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCredentials )( IRTCProfile3 * This, /* [in] */ BSTR bstrUserURI, /* [in] */ BSTR bstrUserAccount, /* [in] */ BSTR bstrPassword); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SessionCapabilities )( IRTCProfile3 * This, /* [retval][out] */ long *plSupportedSessions); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCProfile3 * This, /* [retval][out] */ RTC_REGISTRATION_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Realm )( IRTCProfile3 * This, /* [retval][out] */ BSTR *pbstrRealm); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Realm )( IRTCProfile3 * This, /* [in] */ BSTR bstrRealm); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowedAuth )( IRTCProfile3 * This, /* [retval][out] */ long *plAllowedAuth); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowedAuth )( IRTCProfile3 * This, /* [in] */ long lAllowedAuth); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetServer )( IRTCProfile3 * This, /* [out] */ BSTR *pbstrServer, /* [out] */ long *plTransport); END_INTERFACE } IRTCProfile3Vtbl; interface IRTCProfile3 { CONST_VTBL struct IRTCProfile3Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCProfile3_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCProfile3_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCProfile3_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCProfile3_get_Key(This,pbstrKey) \ (This)->lpVtbl -> get_Key(This,pbstrKey) #define IRTCProfile3_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCProfile3_get_XML(This,pbstrXML) \ (This)->lpVtbl -> get_XML(This,pbstrXML) #define IRTCProfile3_get_ProviderName(This,pbstrName) \ (This)->lpVtbl -> get_ProviderName(This,pbstrName) #define IRTCProfile3_get_ProviderURI(This,enURI,pbstrURI) \ (This)->lpVtbl -> get_ProviderURI(This,enURI,pbstrURI) #define IRTCProfile3_get_ProviderData(This,pbstrData) \ (This)->lpVtbl -> get_ProviderData(This,pbstrData) #define IRTCProfile3_get_ClientName(This,pbstrName) \ (This)->lpVtbl -> get_ClientName(This,pbstrName) #define IRTCProfile3_get_ClientBanner(This,pfBanner) \ (This)->lpVtbl -> get_ClientBanner(This,pfBanner) #define IRTCProfile3_get_ClientMinVer(This,pbstrMinVer) \ (This)->lpVtbl -> get_ClientMinVer(This,pbstrMinVer) #define IRTCProfile3_get_ClientCurVer(This,pbstrCurVer) \ (This)->lpVtbl -> get_ClientCurVer(This,pbstrCurVer) #define IRTCProfile3_get_ClientUpdateURI(This,pbstrUpdateURI) \ (This)->lpVtbl -> get_ClientUpdateURI(This,pbstrUpdateURI) #define IRTCProfile3_get_ClientData(This,pbstrData) \ (This)->lpVtbl -> get_ClientData(This,pbstrData) #define IRTCProfile3_get_UserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_UserURI(This,pbstrUserURI) #define IRTCProfile3_get_UserName(This,pbstrUserName) \ (This)->lpVtbl -> get_UserName(This,pbstrUserName) #define IRTCProfile3_get_UserAccount(This,pbstrUserAccount) \ (This)->lpVtbl -> get_UserAccount(This,pbstrUserAccount) #define IRTCProfile3_SetCredentials(This,bstrUserURI,bstrUserAccount,bstrPassword) \ (This)->lpVtbl -> SetCredentials(This,bstrUserURI,bstrUserAccount,bstrPassword) #define IRTCProfile3_get_SessionCapabilities(This,plSupportedSessions) \ (This)->lpVtbl -> get_SessionCapabilities(This,plSupportedSessions) #define IRTCProfile3_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCProfile3_get_Realm(This,pbstrRealm) \ (This)->lpVtbl -> get_Realm(This,pbstrRealm) #define IRTCProfile3_put_Realm(This,bstrRealm) \ (This)->lpVtbl -> put_Realm(This,bstrRealm) #define IRTCProfile3_get_AllowedAuth(This,plAllowedAuth) \ (This)->lpVtbl -> get_AllowedAuth(This,plAllowedAuth) #define IRTCProfile3_put_AllowedAuth(This,lAllowedAuth) \ (This)->lpVtbl -> put_AllowedAuth(This,lAllowedAuth) #define IRTCProfile3_GetServer(This,pbstrServer,plTransport) \ (This)->lpVtbl -> GetServer(This,pbstrServer,plTransport) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCProfile3_GetServer_Proxy( IRTCProfile3 * This, /* [out] */ BSTR *pbstrServer, /* [out] */ long *plTransport); void __RPC_STUB IRTCProfile3_GetServer_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCProfile3_INTERFACE_DEFINED__ */ #ifndef __IRTCSession_INTERFACE_DEFINED__ #define __IRTCSession_INTERFACE_DEFINED__ /* interface IRTCSession */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCSession; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("387c8086-99be-42fb-9973-7c0fc0ca9fa8") IRTCSession : public IUnknown { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Client( /* [retval][out] */ IRTCClient **ppClient) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_SESSION_STATE *penState) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Type( /* [retval][out] */ RTC_SESSION_TYPE *penType) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile **ppProfile) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Participants( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Answer( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Terminate( /* [in] */ RTC_TERMINATE_REASON enReason) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Redirect( /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddParticipant( /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [retval][out] */ IRTCParticipant **ppParticipant) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveParticipant( /* [in] */ IRTCParticipant *pParticipant) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateParticipants( /* [retval][out] */ IRTCEnumParticipants **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CanAddParticipants( /* [retval][out] */ VARIANT_BOOL *pfCanAdd) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RedirectedUserURI( /* [retval][out] */ BSTR *pbstrUserURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RedirectedUserName( /* [retval][out] */ BSTR *pbstrUserName) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE NextRedirectedUser( void) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SendMessage( /* [in] */ BSTR bstrMessageHeader, /* [in] */ BSTR bstrMessage, /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SendMessageStatus( /* [in] */ RTC_MESSAGING_USER_STATUS enUserStatus, /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddStream( /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveStream( /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_EncryptionKey( /* [in] */ long lMediaType, /* [in] */ BSTR EncryptionKey) = 0; }; #else /* C style interface */ typedef struct IRTCSessionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSession * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSession * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSession * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Client )( IRTCSession * This, /* [retval][out] */ IRTCClient **ppClient); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCSession * This, /* [retval][out] */ RTC_SESSION_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( IRTCSession * This, /* [retval][out] */ RTC_SESSION_TYPE *penType); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCSession * This, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participants )( IRTCSession * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Answer )( IRTCSession * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Terminate )( IRTCSession * This, /* [in] */ RTC_TERMINATE_REASON enReason); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Redirect )( IRTCSession * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddParticipant )( IRTCSession * This, /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveParticipant )( IRTCSession * This, /* [in] */ IRTCParticipant *pParticipant); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateParticipants )( IRTCSession * This, /* [retval][out] */ IRTCEnumParticipants **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanAddParticipants )( IRTCSession * This, /* [retval][out] */ VARIANT_BOOL *pfCanAdd); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RedirectedUserURI )( IRTCSession * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RedirectedUserName )( IRTCSession * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *NextRedirectedUser )( IRTCSession * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendMessage )( IRTCSession * This, /* [in] */ BSTR bstrMessageHeader, /* [in] */ BSTR bstrMessage, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendMessageStatus )( IRTCSession * This, /* [in] */ RTC_MESSAGING_USER_STATUS enUserStatus, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddStream )( IRTCSession * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveStream )( IRTCSession * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EncryptionKey )( IRTCSession * This, /* [in] */ long lMediaType, /* [in] */ BSTR EncryptionKey); END_INTERFACE } IRTCSessionVtbl; interface IRTCSession { CONST_VTBL struct IRTCSessionVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSession_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSession_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSession_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSession_get_Client(This,ppClient) \ (This)->lpVtbl -> get_Client(This,ppClient) #define IRTCSession_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCSession_get_Type(This,penType) \ (This)->lpVtbl -> get_Type(This,penType) #define IRTCSession_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCSession_get_Participants(This,ppCollection) \ (This)->lpVtbl -> get_Participants(This,ppCollection) #define IRTCSession_Answer(This) \ (This)->lpVtbl -> Answer(This) #define IRTCSession_Terminate(This,enReason) \ (This)->lpVtbl -> Terminate(This,enReason) #define IRTCSession_Redirect(This,enType,bstrLocalPhoneURI,pProfile,lFlags) \ (This)->lpVtbl -> Redirect(This,enType,bstrLocalPhoneURI,pProfile,lFlags) #define IRTCSession_AddParticipant(This,bstrAddress,bstrName,ppParticipant) \ (This)->lpVtbl -> AddParticipant(This,bstrAddress,bstrName,ppParticipant) #define IRTCSession_RemoveParticipant(This,pParticipant) \ (This)->lpVtbl -> RemoveParticipant(This,pParticipant) #define IRTCSession_EnumerateParticipants(This,ppEnum) \ (This)->lpVtbl -> EnumerateParticipants(This,ppEnum) #define IRTCSession_get_CanAddParticipants(This,pfCanAdd) \ (This)->lpVtbl -> get_CanAddParticipants(This,pfCanAdd) #define IRTCSession_get_RedirectedUserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_RedirectedUserURI(This,pbstrUserURI) #define IRTCSession_get_RedirectedUserName(This,pbstrUserName) \ (This)->lpVtbl -> get_RedirectedUserName(This,pbstrUserName) #define IRTCSession_NextRedirectedUser(This) \ (This)->lpVtbl -> NextRedirectedUser(This) #define IRTCSession_SendMessage(This,bstrMessageHeader,bstrMessage,lCookie) \ (This)->lpVtbl -> SendMessage(This,bstrMessageHeader,bstrMessage,lCookie) #define IRTCSession_SendMessageStatus(This,enUserStatus,lCookie) \ (This)->lpVtbl -> SendMessageStatus(This,enUserStatus,lCookie) #define IRTCSession_AddStream(This,lMediaType,lCookie) \ (This)->lpVtbl -> AddStream(This,lMediaType,lCookie) #define IRTCSession_RemoveStream(This,lMediaType,lCookie) \ (This)->lpVtbl -> RemoveStream(This,lMediaType,lCookie) #define IRTCSession_put_EncryptionKey(This,lMediaType,EncryptionKey) \ (This)->lpVtbl -> put_EncryptionKey(This,lMediaType,EncryptionKey) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_Client_Proxy( IRTCSession * This, /* [retval][out] */ IRTCClient **ppClient); void __RPC_STUB IRTCSession_get_Client_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_State_Proxy( IRTCSession * This, /* [retval][out] */ RTC_SESSION_STATE *penState); void __RPC_STUB IRTCSession_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_Type_Proxy( IRTCSession * This, /* [retval][out] */ RTC_SESSION_TYPE *penType); void __RPC_STUB IRTCSession_get_Type_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_Profile_Proxy( IRTCSession * This, /* [retval][out] */ IRTCProfile **ppProfile); void __RPC_STUB IRTCSession_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_Participants_Proxy( IRTCSession * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCSession_get_Participants_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_Answer_Proxy( IRTCSession * This); void __RPC_STUB IRTCSession_Answer_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_Terminate_Proxy( IRTCSession * This, /* [in] */ RTC_TERMINATE_REASON enReason); void __RPC_STUB IRTCSession_Terminate_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_Redirect_Proxy( IRTCSession * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags); void __RPC_STUB IRTCSession_Redirect_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_AddParticipant_Proxy( IRTCSession * This, /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [retval][out] */ IRTCParticipant **ppParticipant); void __RPC_STUB IRTCSession_AddParticipant_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_RemoveParticipant_Proxy( IRTCSession * This, /* [in] */ IRTCParticipant *pParticipant); void __RPC_STUB IRTCSession_RemoveParticipant_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCSession_EnumerateParticipants_Proxy( IRTCSession * This, /* [retval][out] */ IRTCEnumParticipants **ppEnum); void __RPC_STUB IRTCSession_EnumerateParticipants_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_CanAddParticipants_Proxy( IRTCSession * This, /* [retval][out] */ VARIANT_BOOL *pfCanAdd); void __RPC_STUB IRTCSession_get_CanAddParticipants_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_RedirectedUserURI_Proxy( IRTCSession * This, /* [retval][out] */ BSTR *pbstrUserURI); void __RPC_STUB IRTCSession_get_RedirectedUserURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession_get_RedirectedUserName_Proxy( IRTCSession * This, /* [retval][out] */ BSTR *pbstrUserName); void __RPC_STUB IRTCSession_get_RedirectedUserName_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_NextRedirectedUser_Proxy( IRTCSession * This); void __RPC_STUB IRTCSession_NextRedirectedUser_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_SendMessage_Proxy( IRTCSession * This, /* [in] */ BSTR bstrMessageHeader, /* [in] */ BSTR bstrMessage, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSession_SendMessage_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_SendMessageStatus_Proxy( IRTCSession * This, /* [in] */ RTC_MESSAGING_USER_STATUS enUserStatus, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSession_SendMessageStatus_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_AddStream_Proxy( IRTCSession * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSession_AddStream_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession_RemoveStream_Proxy( IRTCSession * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSession_RemoveStream_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCSession_put_EncryptionKey_Proxy( IRTCSession * This, /* [in] */ long lMediaType, /* [in] */ BSTR EncryptionKey); void __RPC_STUB IRTCSession_put_EncryptionKey_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSession_INTERFACE_DEFINED__ */ #ifndef __IRTCSession2_INTERFACE_DEFINED__ #define __IRTCSession2_INTERFACE_DEFINED__ /* interface IRTCSession2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCSession2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("17D7CDFC-B007-484c-99D2-86A8A820991D") IRTCSession2 : public IRTCSession { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SendInfo( /* [in] */ BSTR bstrInfoHeader, /* [in] */ BSTR bstrInfo, /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredSecurityLevel( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredSecurityLevel( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE IsSecurityEnabled( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ VARIANT_BOOL *pfSecurityEnabled) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AnswerWithSessionDescription( /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ReInviteWithSessionDescription( /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ LONG_PTR lCookie) = 0; }; #else /* C style interface */ typedef struct IRTCSession2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSession2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSession2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSession2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Client )( IRTCSession2 * This, /* [retval][out] */ IRTCClient **ppClient); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCSession2 * This, /* [retval][out] */ RTC_SESSION_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( IRTCSession2 * This, /* [retval][out] */ RTC_SESSION_TYPE *penType); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCSession2 * This, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participants )( IRTCSession2 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Answer )( IRTCSession2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Terminate )( IRTCSession2 * This, /* [in] */ RTC_TERMINATE_REASON enReason); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Redirect )( IRTCSession2 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddParticipant )( IRTCSession2 * This, /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveParticipant )( IRTCSession2 * This, /* [in] */ IRTCParticipant *pParticipant); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateParticipants )( IRTCSession2 * This, /* [retval][out] */ IRTCEnumParticipants **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanAddParticipants )( IRTCSession2 * This, /* [retval][out] */ VARIANT_BOOL *pfCanAdd); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RedirectedUserURI )( IRTCSession2 * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RedirectedUserName )( IRTCSession2 * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *NextRedirectedUser )( IRTCSession2 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendMessage )( IRTCSession2 * This, /* [in] */ BSTR bstrMessageHeader, /* [in] */ BSTR bstrMessage, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendMessageStatus )( IRTCSession2 * This, /* [in] */ RTC_MESSAGING_USER_STATUS enUserStatus, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddStream )( IRTCSession2 * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveStream )( IRTCSession2 * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EncryptionKey )( IRTCSession2 * This, /* [in] */ long lMediaType, /* [in] */ BSTR EncryptionKey); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendInfo )( IRTCSession2 * This, /* [in] */ BSTR bstrInfoHeader, /* [in] */ BSTR bstrInfo, /* [in] */ LONG_PTR lCookie); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredSecurityLevel )( IRTCSession2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredSecurityLevel )( IRTCSession2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsSecurityEnabled )( IRTCSession2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ VARIANT_BOOL *pfSecurityEnabled); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AnswerWithSessionDescription )( IRTCSession2 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ReInviteWithSessionDescription )( IRTCSession2 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ LONG_PTR lCookie); END_INTERFACE } IRTCSession2Vtbl; interface IRTCSession2 { CONST_VTBL struct IRTCSession2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSession2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSession2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSession2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSession2_get_Client(This,ppClient) \ (This)->lpVtbl -> get_Client(This,ppClient) #define IRTCSession2_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCSession2_get_Type(This,penType) \ (This)->lpVtbl -> get_Type(This,penType) #define IRTCSession2_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCSession2_get_Participants(This,ppCollection) \ (This)->lpVtbl -> get_Participants(This,ppCollection) #define IRTCSession2_Answer(This) \ (This)->lpVtbl -> Answer(This) #define IRTCSession2_Terminate(This,enReason) \ (This)->lpVtbl -> Terminate(This,enReason) #define IRTCSession2_Redirect(This,enType,bstrLocalPhoneURI,pProfile,lFlags) \ (This)->lpVtbl -> Redirect(This,enType,bstrLocalPhoneURI,pProfile,lFlags) #define IRTCSession2_AddParticipant(This,bstrAddress,bstrName,ppParticipant) \ (This)->lpVtbl -> AddParticipant(This,bstrAddress,bstrName,ppParticipant) #define IRTCSession2_RemoveParticipant(This,pParticipant) \ (This)->lpVtbl -> RemoveParticipant(This,pParticipant) #define IRTCSession2_EnumerateParticipants(This,ppEnum) \ (This)->lpVtbl -> EnumerateParticipants(This,ppEnum) #define IRTCSession2_get_CanAddParticipants(This,pfCanAdd) \ (This)->lpVtbl -> get_CanAddParticipants(This,pfCanAdd) #define IRTCSession2_get_RedirectedUserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_RedirectedUserURI(This,pbstrUserURI) #define IRTCSession2_get_RedirectedUserName(This,pbstrUserName) \ (This)->lpVtbl -> get_RedirectedUserName(This,pbstrUserName) #define IRTCSession2_NextRedirectedUser(This) \ (This)->lpVtbl -> NextRedirectedUser(This) #define IRTCSession2_SendMessage(This,bstrMessageHeader,bstrMessage,lCookie) \ (This)->lpVtbl -> SendMessage(This,bstrMessageHeader,bstrMessage,lCookie) #define IRTCSession2_SendMessageStatus(This,enUserStatus,lCookie) \ (This)->lpVtbl -> SendMessageStatus(This,enUserStatus,lCookie) #define IRTCSession2_AddStream(This,lMediaType,lCookie) \ (This)->lpVtbl -> AddStream(This,lMediaType,lCookie) #define IRTCSession2_RemoveStream(This,lMediaType,lCookie) \ (This)->lpVtbl -> RemoveStream(This,lMediaType,lCookie) #define IRTCSession2_put_EncryptionKey(This,lMediaType,EncryptionKey) \ (This)->lpVtbl -> put_EncryptionKey(This,lMediaType,EncryptionKey) #define IRTCSession2_SendInfo(This,bstrInfoHeader,bstrInfo,lCookie) \ (This)->lpVtbl -> SendInfo(This,bstrInfoHeader,bstrInfo,lCookie) #define IRTCSession2_put_PreferredSecurityLevel(This,enSecurityType,enSecurityLevel) \ (This)->lpVtbl -> put_PreferredSecurityLevel(This,enSecurityType,enSecurityLevel) #define IRTCSession2_get_PreferredSecurityLevel(This,enSecurityType,penSecurityLevel) \ (This)->lpVtbl -> get_PreferredSecurityLevel(This,enSecurityType,penSecurityLevel) #define IRTCSession2_IsSecurityEnabled(This,enSecurityType,pfSecurityEnabled) \ (This)->lpVtbl -> IsSecurityEnabled(This,enSecurityType,pfSecurityEnabled) #define IRTCSession2_AnswerWithSessionDescription(This,bstrContentType,bstrSessionDescription) \ (This)->lpVtbl -> AnswerWithSessionDescription(This,bstrContentType,bstrSessionDescription) #define IRTCSession2_ReInviteWithSessionDescription(This,bstrContentType,bstrSessionDescription,lCookie) \ (This)->lpVtbl -> ReInviteWithSessionDescription(This,bstrContentType,bstrSessionDescription,lCookie) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession2_SendInfo_Proxy( IRTCSession2 * This, /* [in] */ BSTR bstrInfoHeader, /* [in] */ BSTR bstrInfo, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSession2_SendInfo_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCSession2_put_PreferredSecurityLevel_Proxy( IRTCSession2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel); void __RPC_STUB IRTCSession2_put_PreferredSecurityLevel_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSession2_get_PreferredSecurityLevel_Proxy( IRTCSession2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); void __RPC_STUB IRTCSession2_get_PreferredSecurityLevel_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession2_IsSecurityEnabled_Proxy( IRTCSession2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ VARIANT_BOOL *pfSecurityEnabled); void __RPC_STUB IRTCSession2_IsSecurityEnabled_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession2_AnswerWithSessionDescription_Proxy( IRTCSession2 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription); void __RPC_STUB IRTCSession2_AnswerWithSessionDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession2_ReInviteWithSessionDescription_Proxy( IRTCSession2 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSession2_ReInviteWithSessionDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSession2_INTERFACE_DEFINED__ */ #ifndef __IRTCSession3_INTERFACE_DEFINED__ #define __IRTCSession3_INTERFACE_DEFINED__ /* interface IRTCSession3 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCSession3; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("A46E81AD-1D5A-4063-9521-62E1FA85DF5C") IRTCSession3 : public IRTCSession2 { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddParticipantEx( /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [in] */ BSTR bstrDeviceID, /* [retval][out] */ IRTCParticipant2 **ppParticipant) = 0; }; #else /* C style interface */ typedef struct IRTCSession3Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSession3 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSession3 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSession3 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Client )( IRTCSession3 * This, /* [retval][out] */ IRTCClient **ppClient); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCSession3 * This, /* [retval][out] */ RTC_SESSION_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( IRTCSession3 * This, /* [retval][out] */ RTC_SESSION_TYPE *penType); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCSession3 * This, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participants )( IRTCSession3 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Answer )( IRTCSession3 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Terminate )( IRTCSession3 * This, /* [in] */ RTC_TERMINATE_REASON enReason); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Redirect )( IRTCSession3 * This, /* [in] */ RTC_SESSION_TYPE enType, /* [in] */ BSTR bstrLocalPhoneURI, /* [in] */ IRTCProfile *pProfile, /* [in] */ long lFlags); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddParticipant )( IRTCSession3 * This, /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveParticipant )( IRTCSession3 * This, /* [in] */ IRTCParticipant *pParticipant); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateParticipants )( IRTCSession3 * This, /* [retval][out] */ IRTCEnumParticipants **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CanAddParticipants )( IRTCSession3 * This, /* [retval][out] */ VARIANT_BOOL *pfCanAdd); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RedirectedUserURI )( IRTCSession3 * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RedirectedUserName )( IRTCSession3 * This, /* [retval][out] */ BSTR *pbstrUserName); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *NextRedirectedUser )( IRTCSession3 * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendMessage )( IRTCSession3 * This, /* [in] */ BSTR bstrMessageHeader, /* [in] */ BSTR bstrMessage, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendMessageStatus )( IRTCSession3 * This, /* [in] */ RTC_MESSAGING_USER_STATUS enUserStatus, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddStream )( IRTCSession3 * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveStream )( IRTCSession3 * This, /* [in] */ long lMediaType, /* [in] */ LONG_PTR lCookie); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EncryptionKey )( IRTCSession3 * This, /* [in] */ long lMediaType, /* [in] */ BSTR EncryptionKey); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SendInfo )( IRTCSession3 * This, /* [in] */ BSTR bstrInfoHeader, /* [in] */ BSTR bstrInfo, /* [in] */ LONG_PTR lCookie); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredSecurityLevel )( IRTCSession3 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [in] */ RTC_SECURITY_LEVEL enSecurityLevel); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredSecurityLevel )( IRTCSession3 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsSecurityEnabled )( IRTCSession3 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ VARIANT_BOOL *pfSecurityEnabled); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AnswerWithSessionDescription )( IRTCSession3 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ReInviteWithSessionDescription )( IRTCSession3 * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddParticipantEx )( IRTCSession3 * This, /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [in] */ BSTR bstrDeviceID, /* [retval][out] */ IRTCParticipant2 **ppParticipant); END_INTERFACE } IRTCSession3Vtbl; interface IRTCSession3 { CONST_VTBL struct IRTCSession3Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSession3_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSession3_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSession3_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSession3_get_Client(This,ppClient) \ (This)->lpVtbl -> get_Client(This,ppClient) #define IRTCSession3_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCSession3_get_Type(This,penType) \ (This)->lpVtbl -> get_Type(This,penType) #define IRTCSession3_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCSession3_get_Participants(This,ppCollection) \ (This)->lpVtbl -> get_Participants(This,ppCollection) #define IRTCSession3_Answer(This) \ (This)->lpVtbl -> Answer(This) #define IRTCSession3_Terminate(This,enReason) \ (This)->lpVtbl -> Terminate(This,enReason) #define IRTCSession3_Redirect(This,enType,bstrLocalPhoneURI,pProfile,lFlags) \ (This)->lpVtbl -> Redirect(This,enType,bstrLocalPhoneURI,pProfile,lFlags) #define IRTCSession3_AddParticipant(This,bstrAddress,bstrName,ppParticipant) \ (This)->lpVtbl -> AddParticipant(This,bstrAddress,bstrName,ppParticipant) #define IRTCSession3_RemoveParticipant(This,pParticipant) \ (This)->lpVtbl -> RemoveParticipant(This,pParticipant) #define IRTCSession3_EnumerateParticipants(This,ppEnum) \ (This)->lpVtbl -> EnumerateParticipants(This,ppEnum) #define IRTCSession3_get_CanAddParticipants(This,pfCanAdd) \ (This)->lpVtbl -> get_CanAddParticipants(This,pfCanAdd) #define IRTCSession3_get_RedirectedUserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_RedirectedUserURI(This,pbstrUserURI) #define IRTCSession3_get_RedirectedUserName(This,pbstrUserName) \ (This)->lpVtbl -> get_RedirectedUserName(This,pbstrUserName) #define IRTCSession3_NextRedirectedUser(This) \ (This)->lpVtbl -> NextRedirectedUser(This) #define IRTCSession3_SendMessage(This,bstrMessageHeader,bstrMessage,lCookie) \ (This)->lpVtbl -> SendMessage(This,bstrMessageHeader,bstrMessage,lCookie) #define IRTCSession3_SendMessageStatus(This,enUserStatus,lCookie) \ (This)->lpVtbl -> SendMessageStatus(This,enUserStatus,lCookie) #define IRTCSession3_AddStream(This,lMediaType,lCookie) \ (This)->lpVtbl -> AddStream(This,lMediaType,lCookie) #define IRTCSession3_RemoveStream(This,lMediaType,lCookie) \ (This)->lpVtbl -> RemoveStream(This,lMediaType,lCookie) #define IRTCSession3_put_EncryptionKey(This,lMediaType,EncryptionKey) \ (This)->lpVtbl -> put_EncryptionKey(This,lMediaType,EncryptionKey) #define IRTCSession3_SendInfo(This,bstrInfoHeader,bstrInfo,lCookie) \ (This)->lpVtbl -> SendInfo(This,bstrInfoHeader,bstrInfo,lCookie) #define IRTCSession3_put_PreferredSecurityLevel(This,enSecurityType,enSecurityLevel) \ (This)->lpVtbl -> put_PreferredSecurityLevel(This,enSecurityType,enSecurityLevel) #define IRTCSession3_get_PreferredSecurityLevel(This,enSecurityType,penSecurityLevel) \ (This)->lpVtbl -> get_PreferredSecurityLevel(This,enSecurityType,penSecurityLevel) #define IRTCSession3_IsSecurityEnabled(This,enSecurityType,pfSecurityEnabled) \ (This)->lpVtbl -> IsSecurityEnabled(This,enSecurityType,pfSecurityEnabled) #define IRTCSession3_AnswerWithSessionDescription(This,bstrContentType,bstrSessionDescription) \ (This)->lpVtbl -> AnswerWithSessionDescription(This,bstrContentType,bstrSessionDescription) #define IRTCSession3_ReInviteWithSessionDescription(This,bstrContentType,bstrSessionDescription,lCookie) \ (This)->lpVtbl -> ReInviteWithSessionDescription(This,bstrContentType,bstrSessionDescription,lCookie) #define IRTCSession3_AddParticipantEx(This,bstrAddress,bstrName,bstrDeviceID,ppParticipant) \ (This)->lpVtbl -> AddParticipantEx(This,bstrAddress,bstrName,bstrDeviceID,ppParticipant) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSession3_AddParticipantEx_Proxy( IRTCSession3 * This, /* [in] */ BSTR bstrAddress, /* [in] */ BSTR bstrName, /* [in] */ BSTR bstrDeviceID, /* [retval][out] */ IRTCParticipant2 **ppParticipant); void __RPC_STUB IRTCSession3_AddParticipantEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSession3_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionCallControl_INTERFACE_DEFINED__ #define __IRTCSessionCallControl_INTERFACE_DEFINED__ /* interface IRTCSessionCallControl */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCSessionCallControl; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("E9A50D94-190B-4F82-9530-3B8EBF60758A") IRTCSessionCallControl : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Hold( /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnHold( /* [in] */ LONG_PTR lCookie) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Forward( /* [in] */ BSTR bstrForwardToURI) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Refer( /* [in] */ BSTR bstrReferToURI, /* [in] */ BSTR bstrReferCookie) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ReferredByURI( /* [in] */ BSTR bstrReferredByURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ReferredByURI( /* [retval][out] */ BSTR *pbstrReferredByURI) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ReferCookie( /* [in] */ BSTR bstrReferCookie) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ReferCookie( /* [retval][out] */ BSTR *pbstrReferCookie) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_IsReferred( /* [retval][out] */ VARIANT_BOOL *pfIsReferred) = 0; }; #else /* C style interface */ typedef struct IRTCSessionCallControlVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionCallControl * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionCallControl * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionCallControl * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Hold )( IRTCSessionCallControl * This, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *UnHold )( IRTCSessionCallControl * This, /* [in] */ LONG_PTR lCookie); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Forward )( IRTCSessionCallControl * This, /* [in] */ BSTR bstrForwardToURI); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Refer )( IRTCSessionCallControl * This, /* [in] */ BSTR bstrReferToURI, /* [in] */ BSTR bstrReferCookie); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReferredByURI )( IRTCSessionCallControl * This, /* [in] */ BSTR bstrReferredByURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReferredByURI )( IRTCSessionCallControl * This, /* [retval][out] */ BSTR *pbstrReferredByURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReferCookie )( IRTCSessionCallControl * This, /* [in] */ BSTR bstrReferCookie); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReferCookie )( IRTCSessionCallControl * This, /* [retval][out] */ BSTR *pbstrReferCookie); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsReferred )( IRTCSessionCallControl * This, /* [retval][out] */ VARIANT_BOOL *pfIsReferred); END_INTERFACE } IRTCSessionCallControlVtbl; interface IRTCSessionCallControl { CONST_VTBL struct IRTCSessionCallControlVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionCallControl_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionCallControl_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionCallControl_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionCallControl_Hold(This,lCookie) \ (This)->lpVtbl -> Hold(This,lCookie) #define IRTCSessionCallControl_UnHold(This,lCookie) \ (This)->lpVtbl -> UnHold(This,lCookie) #define IRTCSessionCallControl_Forward(This,bstrForwardToURI) \ (This)->lpVtbl -> Forward(This,bstrForwardToURI) #define IRTCSessionCallControl_Refer(This,bstrReferToURI,bstrReferCookie) \ (This)->lpVtbl -> Refer(This,bstrReferToURI,bstrReferCookie) #define IRTCSessionCallControl_put_ReferredByURI(This,bstrReferredByURI) \ (This)->lpVtbl -> put_ReferredByURI(This,bstrReferredByURI) #define IRTCSessionCallControl_get_ReferredByURI(This,pbstrReferredByURI) \ (This)->lpVtbl -> get_ReferredByURI(This,pbstrReferredByURI) #define IRTCSessionCallControl_put_ReferCookie(This,bstrReferCookie) \ (This)->lpVtbl -> put_ReferCookie(This,bstrReferCookie) #define IRTCSessionCallControl_get_ReferCookie(This,pbstrReferCookie) \ (This)->lpVtbl -> get_ReferCookie(This,pbstrReferCookie) #define IRTCSessionCallControl_get_IsReferred(This,pfIsReferred) \ (This)->lpVtbl -> get_IsReferred(This,pfIsReferred) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_Hold_Proxy( IRTCSessionCallControl * This, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSessionCallControl_Hold_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_UnHold_Proxy( IRTCSessionCallControl * This, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCSessionCallControl_UnHold_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_Forward_Proxy( IRTCSessionCallControl * This, /* [in] */ BSTR bstrForwardToURI); void __RPC_STUB IRTCSessionCallControl_Forward_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_Refer_Proxy( IRTCSessionCallControl * This, /* [in] */ BSTR bstrReferToURI, /* [in] */ BSTR bstrReferCookie); void __RPC_STUB IRTCSessionCallControl_Refer_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_put_ReferredByURI_Proxy( IRTCSessionCallControl * This, /* [in] */ BSTR bstrReferredByURI); void __RPC_STUB IRTCSessionCallControl_put_ReferredByURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_get_ReferredByURI_Proxy( IRTCSessionCallControl * This, /* [retval][out] */ BSTR *pbstrReferredByURI); void __RPC_STUB IRTCSessionCallControl_get_ReferredByURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_put_ReferCookie_Proxy( IRTCSessionCallControl * This, /* [in] */ BSTR bstrReferCookie); void __RPC_STUB IRTCSessionCallControl_put_ReferCookie_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_get_ReferCookie_Proxy( IRTCSessionCallControl * This, /* [retval][out] */ BSTR *pbstrReferCookie); void __RPC_STUB IRTCSessionCallControl_get_ReferCookie_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionCallControl_get_IsReferred_Proxy( IRTCSessionCallControl * This, /* [retval][out] */ VARIANT_BOOL *pfIsReferred); void __RPC_STUB IRTCSessionCallControl_get_IsReferred_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionCallControl_INTERFACE_DEFINED__ */ #ifndef __IRTCParticipant_INTERFACE_DEFINED__ #define __IRTCParticipant_INTERFACE_DEFINED__ /* interface IRTCParticipant */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCParticipant; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("ae86add5-26b1-4414-af1d-b94cd938d739") IRTCParticipant : public IUnknown { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_UserURI( /* [retval][out] */ BSTR *pbstrUserURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ BSTR *pbstrName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Removable( /* [retval][out] */ VARIANT_BOOL *pfRemovable) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_PARTICIPANT_STATE *penState) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession **ppSession) = 0; }; #else /* C style interface */ typedef struct IRTCParticipantVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCParticipant * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCParticipant * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCParticipant * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserURI )( IRTCParticipant * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCParticipant * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Removable )( IRTCParticipant * This, /* [retval][out] */ VARIANT_BOOL *pfRemovable); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCParticipant * This, /* [retval][out] */ RTC_PARTICIPANT_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCParticipant * This, /* [retval][out] */ IRTCSession **ppSession); END_INTERFACE } IRTCParticipantVtbl; interface IRTCParticipant { CONST_VTBL struct IRTCParticipantVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCParticipant_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCParticipant_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCParticipant_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCParticipant_get_UserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_UserURI(This,pbstrUserURI) #define IRTCParticipant_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCParticipant_get_Removable(This,pfRemovable) \ (This)->lpVtbl -> get_Removable(This,pfRemovable) #define IRTCParticipant_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCParticipant_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant_get_UserURI_Proxy( IRTCParticipant * This, /* [retval][out] */ BSTR *pbstrUserURI); void __RPC_STUB IRTCParticipant_get_UserURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant_get_Name_Proxy( IRTCParticipant * This, /* [retval][out] */ BSTR *pbstrName); void __RPC_STUB IRTCParticipant_get_Name_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant_get_Removable_Proxy( IRTCParticipant * This, /* [retval][out] */ VARIANT_BOOL *pfRemovable); void __RPC_STUB IRTCParticipant_get_Removable_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant_get_State_Proxy( IRTCParticipant * This, /* [retval][out] */ RTC_PARTICIPANT_STATE *penState); void __RPC_STUB IRTCParticipant_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant_get_Session_Proxy( IRTCParticipant * This, /* [retval][out] */ IRTCSession **ppSession); void __RPC_STUB IRTCParticipant_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCParticipant_INTERFACE_DEFINED__ */ #ifndef __IRTCParticipant2_INTERFACE_DEFINED__ #define __IRTCParticipant2_INTERFACE_DEFINED__ /* interface IRTCParticipant2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCParticipant2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("B492D4B4-42DF-430a-848F-36FB39FD005F") IRTCParticipant2 : public IRTCParticipant { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DeviceID( /* [retval][out] */ BSTR *pbstrDeviceID) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_FederationFlag( /* [retval][out] */ long *plFederationFlag) = 0; }; #else /* C style interface */ typedef struct IRTCParticipant2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCParticipant2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCParticipant2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCParticipant2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserURI )( IRTCParticipant2 * This, /* [retval][out] */ BSTR *pbstrUserURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCParticipant2 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Removable )( IRTCParticipant2 * This, /* [retval][out] */ VARIANT_BOOL *pfRemovable); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCParticipant2 * This, /* [retval][out] */ RTC_PARTICIPANT_STATE *penState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCParticipant2 * This, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DeviceID )( IRTCParticipant2 * This, /* [retval][out] */ BSTR *pbstrDeviceID); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FederationFlag )( IRTCParticipant2 * This, /* [retval][out] */ long *plFederationFlag); END_INTERFACE } IRTCParticipant2Vtbl; interface IRTCParticipant2 { CONST_VTBL struct IRTCParticipant2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCParticipant2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCParticipant2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCParticipant2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCParticipant2_get_UserURI(This,pbstrUserURI) \ (This)->lpVtbl -> get_UserURI(This,pbstrUserURI) #define IRTCParticipant2_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCParticipant2_get_Removable(This,pfRemovable) \ (This)->lpVtbl -> get_Removable(This,pfRemovable) #define IRTCParticipant2_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCParticipant2_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCParticipant2_get_DeviceID(This,pbstrDeviceID) \ (This)->lpVtbl -> get_DeviceID(This,pbstrDeviceID) #define IRTCParticipant2_get_FederationFlag(This,plFederationFlag) \ (This)->lpVtbl -> get_FederationFlag(This,plFederationFlag) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant2_get_DeviceID_Proxy( IRTCParticipant2 * This, /* [retval][out] */ BSTR *pbstrDeviceID); void __RPC_STUB IRTCParticipant2_get_DeviceID_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipant2_get_FederationFlag_Proxy( IRTCParticipant2 * This, /* [retval][out] */ long *plFederationFlag); void __RPC_STUB IRTCParticipant2_get_FederationFlag_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCParticipant2_INTERFACE_DEFINED__ */ #ifndef __IRTCRoamingEvent_INTERFACE_DEFINED__ #define __IRTCRoamingEvent_INTERFACE_DEFINED__ /* interface IRTCRoamingEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCRoamingEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("79960a6b-0cb1-4dc8-a805-7318e99902e8") IRTCRoamingEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_ROAMING_EVENT_TYPE *pEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile2 **ppProfile) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; }; #else /* C style interface */ typedef struct IRTCRoamingEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCRoamingEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCRoamingEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCRoamingEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCRoamingEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCRoamingEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCRoamingEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCRoamingEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCRoamingEvent * This, /* [retval][out] */ RTC_ROAMING_EVENT_TYPE *pEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCRoamingEvent * This, /* [retval][out] */ IRTCProfile2 **ppProfile); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCRoamingEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCRoamingEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); END_INTERFACE } IRTCRoamingEventVtbl; interface IRTCRoamingEvent { CONST_VTBL struct IRTCRoamingEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCRoamingEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCRoamingEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCRoamingEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCRoamingEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCRoamingEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCRoamingEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCRoamingEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCRoamingEvent_get_EventType(This,pEventType) \ (This)->lpVtbl -> get_EventType(This,pEventType) #define IRTCRoamingEvent_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCRoamingEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCRoamingEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRoamingEvent_get_EventType_Proxy( IRTCRoamingEvent * This, /* [retval][out] */ RTC_ROAMING_EVENT_TYPE *pEventType); void __RPC_STUB IRTCRoamingEvent_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRoamingEvent_get_Profile_Proxy( IRTCRoamingEvent * This, /* [retval][out] */ IRTCProfile2 **ppProfile); void __RPC_STUB IRTCRoamingEvent_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRoamingEvent_get_StatusCode_Proxy( IRTCRoamingEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCRoamingEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRoamingEvent_get_StatusText_Proxy( IRTCRoamingEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCRoamingEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCRoamingEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCProfileEvent_INTERFACE_DEFINED__ #define __IRTCProfileEvent_INTERFACE_DEFINED__ /* interface IRTCProfileEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCProfileEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("D6D5AB3B-770E-43e8-800A-79B062395FCA") IRTCProfileEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile **ppProfile) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Cookie( /* [retval][out] */ LONG_PTR *plCookie) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; }; #else /* C style interface */ typedef struct IRTCProfileEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCProfileEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCProfileEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCProfileEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCProfileEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCProfileEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCProfileEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCProfileEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCProfileEvent * This, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cookie )( IRTCProfileEvent * This, /* [retval][out] */ LONG_PTR *plCookie); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCProfileEvent * This, /* [retval][out] */ long *plStatusCode); END_INTERFACE } IRTCProfileEventVtbl; interface IRTCProfileEvent { CONST_VTBL struct IRTCProfileEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCProfileEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCProfileEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCProfileEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCProfileEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCProfileEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCProfileEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCProfileEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCProfileEvent_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCProfileEvent_get_Cookie(This,plCookie) \ (This)->lpVtbl -> get_Cookie(This,plCookie) #define IRTCProfileEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfileEvent_get_Profile_Proxy( IRTCProfileEvent * This, /* [retval][out] */ IRTCProfile **ppProfile); void __RPC_STUB IRTCProfileEvent_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfileEvent_get_Cookie_Proxy( IRTCProfileEvent * This, /* [retval][out] */ LONG_PTR *plCookie); void __RPC_STUB IRTCProfileEvent_get_Cookie_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfileEvent_get_StatusCode_Proxy( IRTCProfileEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCProfileEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCProfileEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCProfileEvent2_INTERFACE_DEFINED__ #define __IRTCProfileEvent2_INTERFACE_DEFINED__ /* interface IRTCProfileEvent2 */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCProfileEvent2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("62E56EDC-03FA-4121-94FB-23493FD0AE64") IRTCProfileEvent2 : public IRTCProfileEvent { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_PROFILE_EVENT_TYPE *pEventType) = 0; }; #else /* C style interface */ typedef struct IRTCProfileEvent2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCProfileEvent2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCProfileEvent2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCProfileEvent2 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCProfileEvent2 * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCProfileEvent2 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCProfileEvent2 * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCProfileEvent2 * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCProfileEvent2 * This, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cookie )( IRTCProfileEvent2 * This, /* [retval][out] */ LONG_PTR *plCookie); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCProfileEvent2 * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCProfileEvent2 * This, /* [retval][out] */ RTC_PROFILE_EVENT_TYPE *pEventType); END_INTERFACE } IRTCProfileEvent2Vtbl; interface IRTCProfileEvent2 { CONST_VTBL struct IRTCProfileEvent2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCProfileEvent2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCProfileEvent2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCProfileEvent2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCProfileEvent2_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCProfileEvent2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCProfileEvent2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCProfileEvent2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCProfileEvent2_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCProfileEvent2_get_Cookie(This,plCookie) \ (This)->lpVtbl -> get_Cookie(This,plCookie) #define IRTCProfileEvent2_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCProfileEvent2_get_EventType(This,pEventType) \ (This)->lpVtbl -> get_EventType(This,pEventType) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCProfileEvent2_get_EventType_Proxy( IRTCProfileEvent2 * This, /* [retval][out] */ RTC_PROFILE_EVENT_TYPE *pEventType); void __RPC_STUB IRTCProfileEvent2_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCProfileEvent2_INTERFACE_DEFINED__ */ #ifndef __IRTCClientEvent_INTERFACE_DEFINED__ #define __IRTCClientEvent_INTERFACE_DEFINED__ /* interface IRTCClientEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCClientEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("2b493b7a-3cba-4170-9c8b-76a9dacdd644") IRTCClientEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_CLIENT_EVENT_TYPE *penEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Client( /* [retval][out] */ IRTCClient **ppClient) = 0; }; #else /* C style interface */ typedef struct IRTCClientEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClientEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClientEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClientEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCClientEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCClientEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCClientEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCClientEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCClientEvent * This, /* [retval][out] */ RTC_CLIENT_EVENT_TYPE *penEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Client )( IRTCClientEvent * This, /* [retval][out] */ IRTCClient **ppClient); END_INTERFACE } IRTCClientEventVtbl; interface IRTCClientEvent { CONST_VTBL struct IRTCClientEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClientEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClientEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClientEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClientEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCClientEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCClientEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCClientEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCClientEvent_get_EventType(This,penEventType) \ (This)->lpVtbl -> get_EventType(This,penEventType) #define IRTCClientEvent_get_Client(This,ppClient) \ (This)->lpVtbl -> get_Client(This,ppClient) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientEvent_get_EventType_Proxy( IRTCClientEvent * This, /* [retval][out] */ RTC_CLIENT_EVENT_TYPE *penEventType); void __RPC_STUB IRTCClientEvent_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCClientEvent_get_Client_Proxy( IRTCClientEvent * This, /* [retval][out] */ IRTCClient **ppClient); void __RPC_STUB IRTCClientEvent_get_Client_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClientEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCRegistrationStateChangeEvent_INTERFACE_DEFINED__ #define __IRTCRegistrationStateChangeEvent_INTERFACE_DEFINED__ /* interface IRTCRegistrationStateChangeEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCRegistrationStateChangeEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("62d0991b-50ab-4f02-b948-ca94f26f8f95") IRTCRegistrationStateChangeEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile **ppProfile) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_REGISTRATION_STATE *penState) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; }; #else /* C style interface */ typedef struct IRTCRegistrationStateChangeEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCRegistrationStateChangeEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCRegistrationStateChangeEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCRegistrationStateChangeEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCRegistrationStateChangeEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCRegistrationStateChangeEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCRegistrationStateChangeEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCRegistrationStateChangeEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ IRTCProfile **ppProfile); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ RTC_REGISTRATION_STATE *penState); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); END_INTERFACE } IRTCRegistrationStateChangeEventVtbl; interface IRTCRegistrationStateChangeEvent { CONST_VTBL struct IRTCRegistrationStateChangeEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCRegistrationStateChangeEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCRegistrationStateChangeEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCRegistrationStateChangeEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCRegistrationStateChangeEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCRegistrationStateChangeEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCRegistrationStateChangeEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCRegistrationStateChangeEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCRegistrationStateChangeEvent_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCRegistrationStateChangeEvent_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCRegistrationStateChangeEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCRegistrationStateChangeEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRegistrationStateChangeEvent_get_Profile_Proxy( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ IRTCProfile **ppProfile); void __RPC_STUB IRTCRegistrationStateChangeEvent_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRegistrationStateChangeEvent_get_State_Proxy( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ RTC_REGISTRATION_STATE *penState); void __RPC_STUB IRTCRegistrationStateChangeEvent_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRegistrationStateChangeEvent_get_StatusCode_Proxy( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCRegistrationStateChangeEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCRegistrationStateChangeEvent_get_StatusText_Proxy( IRTCRegistrationStateChangeEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCRegistrationStateChangeEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCRegistrationStateChangeEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionStateChangeEvent_INTERFACE_DEFINED__ #define __IRTCSessionStateChangeEvent_INTERFACE_DEFINED__ /* interface IRTCSessionStateChangeEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCSessionStateChangeEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("b5bad703-5952-48b3-9321-7f4500521506") IRTCSessionStateChangeEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_SESSION_STATE *penState) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; }; #else /* C style interface */ typedef struct IRTCSessionStateChangeEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionStateChangeEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionStateChangeEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionStateChangeEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCSessionStateChangeEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCSessionStateChangeEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCSessionStateChangeEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCSessionStateChangeEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCSessionStateChangeEvent * This, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCSessionStateChangeEvent * This, /* [retval][out] */ RTC_SESSION_STATE *penState); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCSessionStateChangeEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCSessionStateChangeEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); END_INTERFACE } IRTCSessionStateChangeEventVtbl; interface IRTCSessionStateChangeEvent { CONST_VTBL struct IRTCSessionStateChangeEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionStateChangeEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionStateChangeEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionStateChangeEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionStateChangeEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCSessionStateChangeEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCSessionStateChangeEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCSessionStateChangeEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCSessionStateChangeEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCSessionStateChangeEvent_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCSessionStateChangeEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCSessionStateChangeEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent_get_Session_Proxy( IRTCSessionStateChangeEvent * This, /* [retval][out] */ IRTCSession **ppSession); void __RPC_STUB IRTCSessionStateChangeEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent_get_State_Proxy( IRTCSessionStateChangeEvent * This, /* [retval][out] */ RTC_SESSION_STATE *penState); void __RPC_STUB IRTCSessionStateChangeEvent_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent_get_StatusCode_Proxy( IRTCSessionStateChangeEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCSessionStateChangeEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent_get_StatusText_Proxy( IRTCSessionStateChangeEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCSessionStateChangeEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionStateChangeEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionStateChangeEvent2_INTERFACE_DEFINED__ #define __IRTCSessionStateChangeEvent2_INTERFACE_DEFINED__ /* interface IRTCSessionStateChangeEvent2 */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCSessionStateChangeEvent2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("4F933171-6F95-4880-80D9-2EC8D495D261") IRTCSessionStateChangeEvent2 : public IRTCSessionStateChangeEvent { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MediaTypes( /* [retval][out] */ long *pMediaTypes) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_RemotePreferredSecurityLevel( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_IsForked( /* [retval][out] */ VARIANT_BOOL *pfIsForked) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetRemoteSessionDescription( /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription) = 0; }; #else /* C style interface */ typedef struct IRTCSessionStateChangeEvent2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionStateChangeEvent2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionStateChangeEvent2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionStateChangeEvent2 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCSessionStateChangeEvent2 * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCSessionStateChangeEvent2 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCSessionStateChangeEvent2 * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCSessionStateChangeEvent2 * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ RTC_SESSION_STATE *penState); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ BSTR *pbstrStatusText); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaTypes )( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ long *pMediaTypes); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RemotePreferredSecurityLevel )( IRTCSessionStateChangeEvent2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsForked )( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ VARIANT_BOOL *pfIsForked); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetRemoteSessionDescription )( IRTCSessionStateChangeEvent2 * This, /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription); END_INTERFACE } IRTCSessionStateChangeEvent2Vtbl; interface IRTCSessionStateChangeEvent2 { CONST_VTBL struct IRTCSessionStateChangeEvent2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionStateChangeEvent2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionStateChangeEvent2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionStateChangeEvent2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionStateChangeEvent2_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCSessionStateChangeEvent2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCSessionStateChangeEvent2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCSessionStateChangeEvent2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCSessionStateChangeEvent2_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCSessionStateChangeEvent2_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCSessionStateChangeEvent2_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCSessionStateChangeEvent2_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #define IRTCSessionStateChangeEvent2_get_MediaTypes(This,pMediaTypes) \ (This)->lpVtbl -> get_MediaTypes(This,pMediaTypes) #define IRTCSessionStateChangeEvent2_get_RemotePreferredSecurityLevel(This,enSecurityType,penSecurityLevel) \ (This)->lpVtbl -> get_RemotePreferredSecurityLevel(This,enSecurityType,penSecurityLevel) #define IRTCSessionStateChangeEvent2_get_IsForked(This,pfIsForked) \ (This)->lpVtbl -> get_IsForked(This,pfIsForked) #define IRTCSessionStateChangeEvent2_GetRemoteSessionDescription(This,pbstrContentType,pbstrSessionDescription) \ (This)->lpVtbl -> GetRemoteSessionDescription(This,pbstrContentType,pbstrSessionDescription) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent2_get_MediaTypes_Proxy( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ long *pMediaTypes); void __RPC_STUB IRTCSessionStateChangeEvent2_get_MediaTypes_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent2_get_RemotePreferredSecurityLevel_Proxy( IRTCSessionStateChangeEvent2 * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); void __RPC_STUB IRTCSessionStateChangeEvent2_get_RemotePreferredSecurityLevel_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent2_get_IsForked_Proxy( IRTCSessionStateChangeEvent2 * This, /* [retval][out] */ VARIANT_BOOL *pfIsForked); void __RPC_STUB IRTCSessionStateChangeEvent2_get_IsForked_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCSessionStateChangeEvent2_GetRemoteSessionDescription_Proxy( IRTCSessionStateChangeEvent2 * This, /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription); void __RPC_STUB IRTCSessionStateChangeEvent2_GetRemoteSessionDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionStateChangeEvent2_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionOperationCompleteEvent_INTERFACE_DEFINED__ #define __IRTCSessionOperationCompleteEvent_INTERFACE_DEFINED__ /* interface IRTCSessionOperationCompleteEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCSessionOperationCompleteEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("a6bff4c0-f7c8-4d3c-9a41-3550f78a95b0") IRTCSessionOperationCompleteEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Cookie( /* [retval][out] */ LONG_PTR *plCookie) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; }; #else /* C style interface */ typedef struct IRTCSessionOperationCompleteEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionOperationCompleteEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionOperationCompleteEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionOperationCompleteEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCSessionOperationCompleteEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCSessionOperationCompleteEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCSessionOperationCompleteEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCSessionOperationCompleteEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cookie )( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ LONG_PTR *plCookie); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); END_INTERFACE } IRTCSessionOperationCompleteEventVtbl; interface IRTCSessionOperationCompleteEvent { CONST_VTBL struct IRTCSessionOperationCompleteEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionOperationCompleteEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionOperationCompleteEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionOperationCompleteEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionOperationCompleteEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCSessionOperationCompleteEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCSessionOperationCompleteEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCSessionOperationCompleteEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCSessionOperationCompleteEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCSessionOperationCompleteEvent_get_Cookie(This,plCookie) \ (This)->lpVtbl -> get_Cookie(This,plCookie) #define IRTCSessionOperationCompleteEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCSessionOperationCompleteEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionOperationCompleteEvent_get_Session_Proxy( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ IRTCSession **ppSession); void __RPC_STUB IRTCSessionOperationCompleteEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionOperationCompleteEvent_get_Cookie_Proxy( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ LONG_PTR *plCookie); void __RPC_STUB IRTCSessionOperationCompleteEvent_get_Cookie_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionOperationCompleteEvent_get_StatusCode_Proxy( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCSessionOperationCompleteEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionOperationCompleteEvent_get_StatusText_Proxy( IRTCSessionOperationCompleteEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCSessionOperationCompleteEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionOperationCompleteEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionOperationCompleteEvent2_INTERFACE_DEFINED__ #define __IRTCSessionOperationCompleteEvent2_INTERFACE_DEFINED__ /* interface IRTCSessionOperationCompleteEvent2 */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCSessionOperationCompleteEvent2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("f6fc2a9b-d5bc-4241-b436-1b8460c13832") IRTCSessionOperationCompleteEvent2 : public IRTCSessionOperationCompleteEvent { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Participant( /* [retval][out] */ IRTCParticipant **ppParticipant) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetRemoteSessionDescription( /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription) = 0; }; #else /* C style interface */ typedef struct IRTCSessionOperationCompleteEvent2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionOperationCompleteEvent2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionOperationCompleteEvent2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionOperationCompleteEvent2 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCSessionOperationCompleteEvent2 * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCSessionOperationCompleteEvent2 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCSessionOperationCompleteEvent2 * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCSessionOperationCompleteEvent2 * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCSessionOperationCompleteEvent2 * This, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cookie )( IRTCSessionOperationCompleteEvent2 * This, /* [retval][out] */ LONG_PTR *plCookie); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCSessionOperationCompleteEvent2 * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCSessionOperationCompleteEvent2 * This, /* [retval][out] */ BSTR *pbstrStatusText); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participant )( IRTCSessionOperationCompleteEvent2 * This, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetRemoteSessionDescription )( IRTCSessionOperationCompleteEvent2 * This, /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription); END_INTERFACE } IRTCSessionOperationCompleteEvent2Vtbl; interface IRTCSessionOperationCompleteEvent2 { CONST_VTBL struct IRTCSessionOperationCompleteEvent2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionOperationCompleteEvent2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionOperationCompleteEvent2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionOperationCompleteEvent2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionOperationCompleteEvent2_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCSessionOperationCompleteEvent2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCSessionOperationCompleteEvent2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCSessionOperationCompleteEvent2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCSessionOperationCompleteEvent2_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCSessionOperationCompleteEvent2_get_Cookie(This,plCookie) \ (This)->lpVtbl -> get_Cookie(This,plCookie) #define IRTCSessionOperationCompleteEvent2_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCSessionOperationCompleteEvent2_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #define IRTCSessionOperationCompleteEvent2_get_Participant(This,ppParticipant) \ (This)->lpVtbl -> get_Participant(This,ppParticipant) #define IRTCSessionOperationCompleteEvent2_GetRemoteSessionDescription(This,pbstrContentType,pbstrSessionDescription) \ (This)->lpVtbl -> GetRemoteSessionDescription(This,pbstrContentType,pbstrSessionDescription) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionOperationCompleteEvent2_get_Participant_Proxy( IRTCSessionOperationCompleteEvent2 * This, /* [retval][out] */ IRTCParticipant **ppParticipant); void __RPC_STUB IRTCSessionOperationCompleteEvent2_get_Participant_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCSessionOperationCompleteEvent2_GetRemoteSessionDescription_Proxy( IRTCSessionOperationCompleteEvent2 * This, /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription); void __RPC_STUB IRTCSessionOperationCompleteEvent2_GetRemoteSessionDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionOperationCompleteEvent2_INTERFACE_DEFINED__ */ #ifndef __IRTCParticipantStateChangeEvent_INTERFACE_DEFINED__ #define __IRTCParticipantStateChangeEvent_INTERFACE_DEFINED__ /* interface IRTCParticipantStateChangeEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCParticipantStateChangeEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("09bcb597-f0fa-48f9-b420-468cea7fde04") IRTCParticipantStateChangeEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Participant( /* [retval][out] */ IRTCParticipant **ppParticipant) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_PARTICIPANT_STATE *penState) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; }; #else /* C style interface */ typedef struct IRTCParticipantStateChangeEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCParticipantStateChangeEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCParticipantStateChangeEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCParticipantStateChangeEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCParticipantStateChangeEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCParticipantStateChangeEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCParticipantStateChangeEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCParticipantStateChangeEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participant )( IRTCParticipantStateChangeEvent * This, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCParticipantStateChangeEvent * This, /* [retval][out] */ RTC_PARTICIPANT_STATE *penState); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCParticipantStateChangeEvent * This, /* [retval][out] */ long *plStatusCode); END_INTERFACE } IRTCParticipantStateChangeEventVtbl; interface IRTCParticipantStateChangeEvent { CONST_VTBL struct IRTCParticipantStateChangeEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCParticipantStateChangeEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCParticipantStateChangeEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCParticipantStateChangeEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCParticipantStateChangeEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCParticipantStateChangeEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCParticipantStateChangeEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCParticipantStateChangeEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCParticipantStateChangeEvent_get_Participant(This,ppParticipant) \ (This)->lpVtbl -> get_Participant(This,ppParticipant) #define IRTCParticipantStateChangeEvent_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCParticipantStateChangeEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipantStateChangeEvent_get_Participant_Proxy( IRTCParticipantStateChangeEvent * This, /* [retval][out] */ IRTCParticipant **ppParticipant); void __RPC_STUB IRTCParticipantStateChangeEvent_get_Participant_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipantStateChangeEvent_get_State_Proxy( IRTCParticipantStateChangeEvent * This, /* [retval][out] */ RTC_PARTICIPANT_STATE *penState); void __RPC_STUB IRTCParticipantStateChangeEvent_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCParticipantStateChangeEvent_get_StatusCode_Proxy( IRTCParticipantStateChangeEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCParticipantStateChangeEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCParticipantStateChangeEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCMediaEvent_INTERFACE_DEFINED__ #define __IRTCMediaEvent_INTERFACE_DEFINED__ /* interface IRTCMediaEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCMediaEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("099944fb-bcda-453e-8c41-e13da2adf7f3") IRTCMediaEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MediaType( /* [retval][out] */ long *pMediaType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_MEDIA_EVENT_TYPE *penEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventReason( /* [retval][out] */ RTC_MEDIA_EVENT_REASON *penEventReason) = 0; }; #else /* C style interface */ typedef struct IRTCMediaEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCMediaEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCMediaEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCMediaEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCMediaEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCMediaEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCMediaEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCMediaEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaType )( IRTCMediaEvent * This, /* [retval][out] */ long *pMediaType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCMediaEvent * This, /* [retval][out] */ RTC_MEDIA_EVENT_TYPE *penEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventReason )( IRTCMediaEvent * This, /* [retval][out] */ RTC_MEDIA_EVENT_REASON *penEventReason); END_INTERFACE } IRTCMediaEventVtbl; interface IRTCMediaEvent { CONST_VTBL struct IRTCMediaEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCMediaEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCMediaEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCMediaEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCMediaEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCMediaEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCMediaEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCMediaEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCMediaEvent_get_MediaType(This,pMediaType) \ (This)->lpVtbl -> get_MediaType(This,pMediaType) #define IRTCMediaEvent_get_EventType(This,penEventType) \ (This)->lpVtbl -> get_EventType(This,penEventType) #define IRTCMediaEvent_get_EventReason(This,penEventReason) \ (This)->lpVtbl -> get_EventReason(This,penEventReason) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaEvent_get_MediaType_Proxy( IRTCMediaEvent * This, /* [retval][out] */ long *pMediaType); void __RPC_STUB IRTCMediaEvent_get_MediaType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaEvent_get_EventType_Proxy( IRTCMediaEvent * This, /* [retval][out] */ RTC_MEDIA_EVENT_TYPE *penEventType); void __RPC_STUB IRTCMediaEvent_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaEvent_get_EventReason_Proxy( IRTCMediaEvent * This, /* [retval][out] */ RTC_MEDIA_EVENT_REASON *penEventReason); void __RPC_STUB IRTCMediaEvent_get_EventReason_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCMediaEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCIntensityEvent_INTERFACE_DEFINED__ #define __IRTCIntensityEvent_INTERFACE_DEFINED__ /* interface IRTCIntensityEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCIntensityEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("4c23bf51-390c-4992-a41d-41eec05b2a4b") IRTCIntensityEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Level( /* [retval][out] */ long *plLevel) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Min( /* [retval][out] */ long *plMin) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Max( /* [retval][out] */ long *plMax) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Direction( /* [retval][out] */ RTC_AUDIO_DEVICE *penDirection) = 0; }; #else /* C style interface */ typedef struct IRTCIntensityEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCIntensityEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCIntensityEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCIntensityEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCIntensityEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCIntensityEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCIntensityEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCIntensityEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Level )( IRTCIntensityEvent * This, /* [retval][out] */ long *plLevel); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Min )( IRTCIntensityEvent * This, /* [retval][out] */ long *plMin); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Max )( IRTCIntensityEvent * This, /* [retval][out] */ long *plMax); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Direction )( IRTCIntensityEvent * This, /* [retval][out] */ RTC_AUDIO_DEVICE *penDirection); END_INTERFACE } IRTCIntensityEventVtbl; interface IRTCIntensityEvent { CONST_VTBL struct IRTCIntensityEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCIntensityEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCIntensityEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCIntensityEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCIntensityEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCIntensityEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCIntensityEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCIntensityEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCIntensityEvent_get_Level(This,plLevel) \ (This)->lpVtbl -> get_Level(This,plLevel) #define IRTCIntensityEvent_get_Min(This,plMin) \ (This)->lpVtbl -> get_Min(This,plMin) #define IRTCIntensityEvent_get_Max(This,plMax) \ (This)->lpVtbl -> get_Max(This,plMax) #define IRTCIntensityEvent_get_Direction(This,penDirection) \ (This)->lpVtbl -> get_Direction(This,penDirection) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCIntensityEvent_get_Level_Proxy( IRTCIntensityEvent * This, /* [retval][out] */ long *plLevel); void __RPC_STUB IRTCIntensityEvent_get_Level_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCIntensityEvent_get_Min_Proxy( IRTCIntensityEvent * This, /* [retval][out] */ long *plMin); void __RPC_STUB IRTCIntensityEvent_get_Min_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCIntensityEvent_get_Max_Proxy( IRTCIntensityEvent * This, /* [retval][out] */ long *plMax); void __RPC_STUB IRTCIntensityEvent_get_Max_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCIntensityEvent_get_Direction_Proxy( IRTCIntensityEvent * This, /* [retval][out] */ RTC_AUDIO_DEVICE *penDirection); void __RPC_STUB IRTCIntensityEvent_get_Direction_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCIntensityEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCMessagingEvent_INTERFACE_DEFINED__ #define __IRTCMessagingEvent_INTERFACE_DEFINED__ /* interface IRTCMessagingEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCMessagingEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("d3609541-1b29-4de5-a4ad-5aebaf319512") IRTCMessagingEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Participant( /* [retval][out] */ IRTCParticipant **ppParticipant) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_MESSAGING_EVENT_TYPE *penEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Message( /* [retval][out] */ BSTR *pbstrMessage) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MessageHeader( /* [retval][out] */ BSTR *pbstrMessageHeader) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_UserStatus( /* [retval][out] */ RTC_MESSAGING_USER_STATUS *penUserStatus) = 0; }; #else /* C style interface */ typedef struct IRTCMessagingEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCMessagingEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCMessagingEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCMessagingEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCMessagingEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCMessagingEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCMessagingEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCMessagingEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCMessagingEvent * This, /* [retval][out] */ IRTCSession **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participant )( IRTCMessagingEvent * This, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCMessagingEvent * This, /* [retval][out] */ RTC_MESSAGING_EVENT_TYPE *penEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Message )( IRTCMessagingEvent * This, /* [retval][out] */ BSTR *pbstrMessage); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MessageHeader )( IRTCMessagingEvent * This, /* [retval][out] */ BSTR *pbstrMessageHeader); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UserStatus )( IRTCMessagingEvent * This, /* [retval][out] */ RTC_MESSAGING_USER_STATUS *penUserStatus); END_INTERFACE } IRTCMessagingEventVtbl; interface IRTCMessagingEvent { CONST_VTBL struct IRTCMessagingEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCMessagingEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCMessagingEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCMessagingEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCMessagingEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCMessagingEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCMessagingEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCMessagingEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCMessagingEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCMessagingEvent_get_Participant(This,ppParticipant) \ (This)->lpVtbl -> get_Participant(This,ppParticipant) #define IRTCMessagingEvent_get_EventType(This,penEventType) \ (This)->lpVtbl -> get_EventType(This,penEventType) #define IRTCMessagingEvent_get_Message(This,pbstrMessage) \ (This)->lpVtbl -> get_Message(This,pbstrMessage) #define IRTCMessagingEvent_get_MessageHeader(This,pbstrMessageHeader) \ (This)->lpVtbl -> get_MessageHeader(This,pbstrMessageHeader) #define IRTCMessagingEvent_get_UserStatus(This,penUserStatus) \ (This)->lpVtbl -> get_UserStatus(This,penUserStatus) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMessagingEvent_get_Session_Proxy( IRTCMessagingEvent * This, /* [retval][out] */ IRTCSession **ppSession); void __RPC_STUB IRTCMessagingEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMessagingEvent_get_Participant_Proxy( IRTCMessagingEvent * This, /* [retval][out] */ IRTCParticipant **ppParticipant); void __RPC_STUB IRTCMessagingEvent_get_Participant_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMessagingEvent_get_EventType_Proxy( IRTCMessagingEvent * This, /* [retval][out] */ RTC_MESSAGING_EVENT_TYPE *penEventType); void __RPC_STUB IRTCMessagingEvent_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMessagingEvent_get_Message_Proxy( IRTCMessagingEvent * This, /* [retval][out] */ BSTR *pbstrMessage); void __RPC_STUB IRTCMessagingEvent_get_Message_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMessagingEvent_get_MessageHeader_Proxy( IRTCMessagingEvent * This, /* [retval][out] */ BSTR *pbstrMessageHeader); void __RPC_STUB IRTCMessagingEvent_get_MessageHeader_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMessagingEvent_get_UserStatus_Proxy( IRTCMessagingEvent * This, /* [retval][out] */ RTC_MESSAGING_USER_STATUS *penUserStatus); void __RPC_STUB IRTCMessagingEvent_get_UserStatus_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCMessagingEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCBuddyEvent_INTERFACE_DEFINED__ #define __IRTCBuddyEvent_INTERFACE_DEFINED__ /* interface IRTCBuddyEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCBuddyEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("f36d755d-17e6-404e-954f-0fc07574c78d") IRTCBuddyEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Buddy( /* [retval][out] */ IRTCBuddy **ppBuddy) = 0; }; #else /* C style interface */ typedef struct IRTCBuddyEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCBuddyEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCBuddyEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCBuddyEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCBuddyEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCBuddyEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCBuddyEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCBuddyEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddy )( IRTCBuddyEvent * This, /* [retval][out] */ IRTCBuddy **ppBuddy); END_INTERFACE } IRTCBuddyEventVtbl; interface IRTCBuddyEvent { CONST_VTBL struct IRTCBuddyEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCBuddyEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCBuddyEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCBuddyEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCBuddyEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCBuddyEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCBuddyEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCBuddyEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCBuddyEvent_get_Buddy(This,ppBuddy) \ (This)->lpVtbl -> get_Buddy(This,ppBuddy) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyEvent_get_Buddy_Proxy( IRTCBuddyEvent * This, /* [retval][out] */ IRTCBuddy **ppBuddy); void __RPC_STUB IRTCBuddyEvent_get_Buddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCBuddyEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCBuddyEvent2_INTERFACE_DEFINED__ #define __IRTCBuddyEvent2_INTERFACE_DEFINED__ /* interface IRTCBuddyEvent2 */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCBuddyEvent2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("484A7F1E-73F0-4990-BFC2-60BC3978A720") IRTCBuddyEvent2 : public IRTCBuddyEvent { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_BUDDY_EVENT_TYPE *pEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; }; #else /* C style interface */ typedef struct IRTCBuddyEvent2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCBuddyEvent2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCBuddyEvent2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCBuddyEvent2 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCBuddyEvent2 * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCBuddyEvent2 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCBuddyEvent2 * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCBuddyEvent2 * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddy )( IRTCBuddyEvent2 * This, /* [retval][out] */ IRTCBuddy **ppBuddy); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCBuddyEvent2 * This, /* [retval][out] */ RTC_BUDDY_EVENT_TYPE *pEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCBuddyEvent2 * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCBuddyEvent2 * This, /* [retval][out] */ BSTR *pbstrStatusText); END_INTERFACE } IRTCBuddyEvent2Vtbl; interface IRTCBuddyEvent2 { CONST_VTBL struct IRTCBuddyEvent2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCBuddyEvent2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCBuddyEvent2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCBuddyEvent2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCBuddyEvent2_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCBuddyEvent2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCBuddyEvent2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCBuddyEvent2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCBuddyEvent2_get_Buddy(This,ppBuddy) \ (This)->lpVtbl -> get_Buddy(This,ppBuddy) #define IRTCBuddyEvent2_get_EventType(This,pEventType) \ (This)->lpVtbl -> get_EventType(This,pEventType) #define IRTCBuddyEvent2_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCBuddyEvent2_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyEvent2_get_EventType_Proxy( IRTCBuddyEvent2 * This, /* [retval][out] */ RTC_BUDDY_EVENT_TYPE *pEventType); void __RPC_STUB IRTCBuddyEvent2_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyEvent2_get_StatusCode_Proxy( IRTCBuddyEvent2 * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCBuddyEvent2_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyEvent2_get_StatusText_Proxy( IRTCBuddyEvent2 * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCBuddyEvent2_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCBuddyEvent2_INTERFACE_DEFINED__ */ #ifndef __IRTCWatcherEvent_INTERFACE_DEFINED__ #define __IRTCWatcherEvent_INTERFACE_DEFINED__ /* interface IRTCWatcherEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCWatcherEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("f30d7261-587a-424f-822c-312788f43548") IRTCWatcherEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Watcher( /* [retval][out] */ IRTCWatcher **ppWatcher) = 0; }; #else /* C style interface */ typedef struct IRTCWatcherEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCWatcherEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCWatcherEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCWatcherEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCWatcherEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCWatcherEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCWatcherEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCWatcherEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Watcher )( IRTCWatcherEvent * This, /* [retval][out] */ IRTCWatcher **ppWatcher); END_INTERFACE } IRTCWatcherEventVtbl; interface IRTCWatcherEvent { CONST_VTBL struct IRTCWatcherEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCWatcherEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCWatcherEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCWatcherEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCWatcherEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCWatcherEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCWatcherEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCWatcherEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCWatcherEvent_get_Watcher(This,ppWatcher) \ (This)->lpVtbl -> get_Watcher(This,ppWatcher) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCWatcherEvent_get_Watcher_Proxy( IRTCWatcherEvent * This, /* [retval][out] */ IRTCWatcher **ppWatcher); void __RPC_STUB IRTCWatcherEvent_get_Watcher_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCWatcherEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCWatcherEvent2_INTERFACE_DEFINED__ #define __IRTCWatcherEvent2_INTERFACE_DEFINED__ /* interface IRTCWatcherEvent2 */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCWatcherEvent2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("E52891E8-188C-49AF-B005-98ED13F83F9C") IRTCWatcherEvent2 : public IRTCWatcherEvent { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_WATCHER_EVENT_TYPE *pEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; }; #else /* C style interface */ typedef struct IRTCWatcherEvent2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCWatcherEvent2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCWatcherEvent2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCWatcherEvent2 * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCWatcherEvent2 * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCWatcherEvent2 * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCWatcherEvent2 * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCWatcherEvent2 * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Watcher )( IRTCWatcherEvent2 * This, /* [retval][out] */ IRTCWatcher **ppWatcher); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCWatcherEvent2 * This, /* [retval][out] */ RTC_WATCHER_EVENT_TYPE *pEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCWatcherEvent2 * This, /* [retval][out] */ long *plStatusCode); END_INTERFACE } IRTCWatcherEvent2Vtbl; interface IRTCWatcherEvent2 { CONST_VTBL struct IRTCWatcherEvent2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCWatcherEvent2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCWatcherEvent2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCWatcherEvent2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCWatcherEvent2_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCWatcherEvent2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCWatcherEvent2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCWatcherEvent2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCWatcherEvent2_get_Watcher(This,ppWatcher) \ (This)->lpVtbl -> get_Watcher(This,ppWatcher) #define IRTCWatcherEvent2_get_EventType(This,pEventType) \ (This)->lpVtbl -> get_EventType(This,pEventType) #define IRTCWatcherEvent2_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCWatcherEvent2_get_EventType_Proxy( IRTCWatcherEvent2 * This, /* [retval][out] */ RTC_WATCHER_EVENT_TYPE *pEventType); void __RPC_STUB IRTCWatcherEvent2_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCWatcherEvent2_get_StatusCode_Proxy( IRTCWatcherEvent2 * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCWatcherEvent2_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCWatcherEvent2_INTERFACE_DEFINED__ */ #ifndef __IRTCBuddyGroupEvent_INTERFACE_DEFINED__ #define __IRTCBuddyGroupEvent_INTERFACE_DEFINED__ /* interface IRTCBuddyGroupEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCBuddyGroupEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("3A79E1D1-B736-4414-96F8-BBC7F08863E4") IRTCBuddyGroupEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_EventType( /* [retval][out] */ RTC_GROUP_EVENT_TYPE *pEventType) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Group( /* [retval][out] */ IRTCBuddyGroup **ppGroup) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Buddy( /* [retval][out] */ IRTCBuddy2 **ppBuddy) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; }; #else /* C style interface */ typedef struct IRTCBuddyGroupEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCBuddyGroupEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCBuddyGroupEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCBuddyGroupEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCBuddyGroupEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCBuddyGroupEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCBuddyGroupEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCBuddyGroupEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventType )( IRTCBuddyGroupEvent * This, /* [retval][out] */ RTC_GROUP_EVENT_TYPE *pEventType); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Group )( IRTCBuddyGroupEvent * This, /* [retval][out] */ IRTCBuddyGroup **ppGroup); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddy )( IRTCBuddyGroupEvent * This, /* [retval][out] */ IRTCBuddy2 **ppBuddy); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCBuddyGroupEvent * This, /* [retval][out] */ long *plStatusCode); END_INTERFACE } IRTCBuddyGroupEventVtbl; interface IRTCBuddyGroupEvent { CONST_VTBL struct IRTCBuddyGroupEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCBuddyGroupEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCBuddyGroupEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCBuddyGroupEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCBuddyGroupEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCBuddyGroupEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCBuddyGroupEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCBuddyGroupEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCBuddyGroupEvent_get_EventType(This,pEventType) \ (This)->lpVtbl -> get_EventType(This,pEventType) #define IRTCBuddyGroupEvent_get_Group(This,ppGroup) \ (This)->lpVtbl -> get_Group(This,ppGroup) #define IRTCBuddyGroupEvent_get_Buddy(This,ppBuddy) \ (This)->lpVtbl -> get_Buddy(This,ppBuddy) #define IRTCBuddyGroupEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroupEvent_get_EventType_Proxy( IRTCBuddyGroupEvent * This, /* [retval][out] */ RTC_GROUP_EVENT_TYPE *pEventType); void __RPC_STUB IRTCBuddyGroupEvent_get_EventType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroupEvent_get_Group_Proxy( IRTCBuddyGroupEvent * This, /* [retval][out] */ IRTCBuddyGroup **ppGroup); void __RPC_STUB IRTCBuddyGroupEvent_get_Group_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroupEvent_get_Buddy_Proxy( IRTCBuddyGroupEvent * This, /* [retval][out] */ IRTCBuddy2 **ppBuddy); void __RPC_STUB IRTCBuddyGroupEvent_get_Buddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroupEvent_get_StatusCode_Proxy( IRTCBuddyGroupEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCBuddyGroupEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCBuddyGroupEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCInfoEvent_INTERFACE_DEFINED__ #define __IRTCInfoEvent_INTERFACE_DEFINED__ /* interface IRTCInfoEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCInfoEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("4E1D68AE-1912-4f49-B2C3-594FADFD425F") IRTCInfoEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession2 **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Participant( /* [retval][out] */ IRTCParticipant **ppParticipant) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( /* [retval][out] */ BSTR *pbstrInfo) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InfoHeader( /* [retval][out] */ BSTR *pbstrInfoHeader) = 0; }; #else /* C style interface */ typedef struct IRTCInfoEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCInfoEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCInfoEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCInfoEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCInfoEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCInfoEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCInfoEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCInfoEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCInfoEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Participant )( IRTCInfoEvent * This, /* [retval][out] */ IRTCParticipant **ppParticipant); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Info )( IRTCInfoEvent * This, /* [retval][out] */ BSTR *pbstrInfo); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InfoHeader )( IRTCInfoEvent * This, /* [retval][out] */ BSTR *pbstrInfoHeader); END_INTERFACE } IRTCInfoEventVtbl; interface IRTCInfoEvent { CONST_VTBL struct IRTCInfoEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCInfoEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCInfoEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCInfoEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCInfoEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCInfoEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCInfoEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCInfoEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCInfoEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCInfoEvent_get_Participant(This,ppParticipant) \ (This)->lpVtbl -> get_Participant(This,ppParticipant) #define IRTCInfoEvent_get_Info(This,pbstrInfo) \ (This)->lpVtbl -> get_Info(This,pbstrInfo) #define IRTCInfoEvent_get_InfoHeader(This,pbstrInfoHeader) \ (This)->lpVtbl -> get_InfoHeader(This,pbstrInfoHeader) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCInfoEvent_get_Session_Proxy( IRTCInfoEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); void __RPC_STUB IRTCInfoEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCInfoEvent_get_Participant_Proxy( IRTCInfoEvent * This, /* [retval][out] */ IRTCParticipant **ppParticipant); void __RPC_STUB IRTCInfoEvent_get_Participant_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCInfoEvent_get_Info_Proxy( IRTCInfoEvent * This, /* [retval][out] */ BSTR *pbstrInfo); void __RPC_STUB IRTCInfoEvent_get_Info_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCInfoEvent_get_InfoHeader_Proxy( IRTCInfoEvent * This, /* [retval][out] */ BSTR *pbstrInfoHeader); void __RPC_STUB IRTCInfoEvent_get_InfoHeader_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCInfoEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCMediaRequestEvent_INTERFACE_DEFINED__ #define __IRTCMediaRequestEvent_INTERFACE_DEFINED__ /* interface IRTCMediaRequestEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCMediaRequestEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("52572D15-148C-4d97-A36C-2DA55C289D63") IRTCMediaRequestEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession2 **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ProposedMedia( /* [retval][out] */ long *plMediaTypes) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentMedia( /* [retval][out] */ long *plMediaTypes) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Accept( /* [in] */ long lMediaTypes) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_RemotePreferredSecurityLevel( /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Reject( void) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_REINVITE_STATE *pState) = 0; }; #else /* C style interface */ typedef struct IRTCMediaRequestEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCMediaRequestEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCMediaRequestEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCMediaRequestEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCMediaRequestEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCMediaRequestEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCMediaRequestEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCMediaRequestEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCMediaRequestEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProposedMedia )( IRTCMediaRequestEvent * This, /* [retval][out] */ long *plMediaTypes); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentMedia )( IRTCMediaRequestEvent * This, /* [retval][out] */ long *plMediaTypes); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Accept )( IRTCMediaRequestEvent * This, /* [in] */ long lMediaTypes); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RemotePreferredSecurityLevel )( IRTCMediaRequestEvent * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Reject )( IRTCMediaRequestEvent * This); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCMediaRequestEvent * This, /* [retval][out] */ RTC_REINVITE_STATE *pState); END_INTERFACE } IRTCMediaRequestEventVtbl; interface IRTCMediaRequestEvent { CONST_VTBL struct IRTCMediaRequestEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCMediaRequestEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCMediaRequestEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCMediaRequestEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCMediaRequestEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCMediaRequestEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCMediaRequestEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCMediaRequestEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCMediaRequestEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCMediaRequestEvent_get_ProposedMedia(This,plMediaTypes) \ (This)->lpVtbl -> get_ProposedMedia(This,plMediaTypes) #define IRTCMediaRequestEvent_get_CurrentMedia(This,plMediaTypes) \ (This)->lpVtbl -> get_CurrentMedia(This,plMediaTypes) #define IRTCMediaRequestEvent_Accept(This,lMediaTypes) \ (This)->lpVtbl -> Accept(This,lMediaTypes) #define IRTCMediaRequestEvent_get_RemotePreferredSecurityLevel(This,enSecurityType,penSecurityLevel) \ (This)->lpVtbl -> get_RemotePreferredSecurityLevel(This,enSecurityType,penSecurityLevel) #define IRTCMediaRequestEvent_Reject(This) \ (This)->lpVtbl -> Reject(This) #define IRTCMediaRequestEvent_get_State(This,pState) \ (This)->lpVtbl -> get_State(This,pState) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_get_Session_Proxy( IRTCMediaRequestEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); void __RPC_STUB IRTCMediaRequestEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_get_ProposedMedia_Proxy( IRTCMediaRequestEvent * This, /* [retval][out] */ long *plMediaTypes); void __RPC_STUB IRTCMediaRequestEvent_get_ProposedMedia_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_get_CurrentMedia_Proxy( IRTCMediaRequestEvent * This, /* [retval][out] */ long *plMediaTypes); void __RPC_STUB IRTCMediaRequestEvent_get_CurrentMedia_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_Accept_Proxy( IRTCMediaRequestEvent * This, /* [in] */ long lMediaTypes); void __RPC_STUB IRTCMediaRequestEvent_Accept_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_get_RemotePreferredSecurityLevel_Proxy( IRTCMediaRequestEvent * This, /* [in] */ RTC_SECURITY_TYPE enSecurityType, /* [retval][out] */ RTC_SECURITY_LEVEL *penSecurityLevel); void __RPC_STUB IRTCMediaRequestEvent_get_RemotePreferredSecurityLevel_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_Reject_Proxy( IRTCMediaRequestEvent * This); void __RPC_STUB IRTCMediaRequestEvent_Reject_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCMediaRequestEvent_get_State_Proxy( IRTCMediaRequestEvent * This, /* [retval][out] */ RTC_REINVITE_STATE *pState); void __RPC_STUB IRTCMediaRequestEvent_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCMediaRequestEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCReInviteEvent_INTERFACE_DEFINED__ #define __IRTCReInviteEvent_INTERFACE_DEFINED__ /* interface IRTCReInviteEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCReInviteEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("11558D84-204C-43e7-99B0-2034E9417F7D") IRTCReInviteEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession2 **ppSession2) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Accept( /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Reject( void) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_REINVITE_STATE *pState) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetRemoteSessionDescription( /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription) = 0; }; #else /* C style interface */ typedef struct IRTCReInviteEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCReInviteEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCReInviteEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCReInviteEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCReInviteEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCReInviteEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCReInviteEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCReInviteEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCReInviteEvent * This, /* [retval][out] */ IRTCSession2 **ppSession2); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Accept )( IRTCReInviteEvent * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Reject )( IRTCReInviteEvent * This); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCReInviteEvent * This, /* [retval][out] */ RTC_REINVITE_STATE *pState); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetRemoteSessionDescription )( IRTCReInviteEvent * This, /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription); END_INTERFACE } IRTCReInviteEventVtbl; interface IRTCReInviteEvent { CONST_VTBL struct IRTCReInviteEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCReInviteEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCReInviteEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCReInviteEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCReInviteEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCReInviteEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCReInviteEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCReInviteEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCReInviteEvent_get_Session(This,ppSession2) \ (This)->lpVtbl -> get_Session(This,ppSession2) #define IRTCReInviteEvent_Accept(This,bstrContentType,bstrSessionDescription) \ (This)->lpVtbl -> Accept(This,bstrContentType,bstrSessionDescription) #define IRTCReInviteEvent_Reject(This) \ (This)->lpVtbl -> Reject(This) #define IRTCReInviteEvent_get_State(This,pState) \ (This)->lpVtbl -> get_State(This,pState) #define IRTCReInviteEvent_GetRemoteSessionDescription(This,pbstrContentType,pbstrSessionDescription) \ (This)->lpVtbl -> GetRemoteSessionDescription(This,pbstrContentType,pbstrSessionDescription) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCReInviteEvent_get_Session_Proxy( IRTCReInviteEvent * This, /* [retval][out] */ IRTCSession2 **ppSession2); void __RPC_STUB IRTCReInviteEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCReInviteEvent_Accept_Proxy( IRTCReInviteEvent * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription); void __RPC_STUB IRTCReInviteEvent_Accept_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCReInviteEvent_Reject_Proxy( IRTCReInviteEvent * This); void __RPC_STUB IRTCReInviteEvent_Reject_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCReInviteEvent_get_State_Proxy( IRTCReInviteEvent * This, /* [retval][out] */ RTC_REINVITE_STATE *pState); void __RPC_STUB IRTCReInviteEvent_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCReInviteEvent_GetRemoteSessionDescription_Proxy( IRTCReInviteEvent * This, /* [out] */ BSTR *pbstrContentType, /* [out] */ BSTR *pbstrSessionDescription); void __RPC_STUB IRTCReInviteEvent_GetRemoteSessionDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCReInviteEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCPresencePropertyEvent_INTERFACE_DEFINED__ #define __IRTCPresencePropertyEvent_INTERFACE_DEFINED__ /* interface IRTCPresencePropertyEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCPresencePropertyEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("F777F570-A820-49d5-86BD-E099493F1518") IRTCPresencePropertyEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PresenceProperty( /* [retval][out] */ RTC_PRESENCE_PROPERTY *penPresProp) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Value( /* [retval][out] */ BSTR *pbstrValue) = 0; }; #else /* C style interface */ typedef struct IRTCPresencePropertyEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPresencePropertyEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPresencePropertyEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPresencePropertyEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCPresencePropertyEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCPresencePropertyEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCPresencePropertyEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCPresencePropertyEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCPresencePropertyEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCPresencePropertyEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresenceProperty )( IRTCPresencePropertyEvent * This, /* [retval][out] */ RTC_PRESENCE_PROPERTY *penPresProp); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( IRTCPresencePropertyEvent * This, /* [retval][out] */ BSTR *pbstrValue); END_INTERFACE } IRTCPresencePropertyEventVtbl; interface IRTCPresencePropertyEvent { CONST_VTBL struct IRTCPresencePropertyEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPresencePropertyEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPresencePropertyEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPresencePropertyEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPresencePropertyEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCPresencePropertyEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCPresencePropertyEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCPresencePropertyEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCPresencePropertyEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCPresencePropertyEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #define IRTCPresencePropertyEvent_get_PresenceProperty(This,penPresProp) \ (This)->lpVtbl -> get_PresenceProperty(This,penPresProp) #define IRTCPresencePropertyEvent_get_Value(This,pbstrValue) \ (This)->lpVtbl -> get_Value(This,pbstrValue) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresencePropertyEvent_get_StatusCode_Proxy( IRTCPresencePropertyEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCPresencePropertyEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresencePropertyEvent_get_StatusText_Proxy( IRTCPresencePropertyEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCPresencePropertyEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresencePropertyEvent_get_PresenceProperty_Proxy( IRTCPresencePropertyEvent * This, /* [retval][out] */ RTC_PRESENCE_PROPERTY *penPresProp); void __RPC_STUB IRTCPresencePropertyEvent_get_PresenceProperty_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresencePropertyEvent_get_Value_Proxy( IRTCPresencePropertyEvent * This, /* [retval][out] */ BSTR *pbstrValue); void __RPC_STUB IRTCPresencePropertyEvent_get_Value_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPresencePropertyEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCPresenceDataEvent_INTERFACE_DEFINED__ #define __IRTCPresenceDataEvent_INTERFACE_DEFINED__ /* interface IRTCPresenceDataEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCPresenceDataEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("38F0E78C-8B87-4c04-A82D-AEDD83C909BB") IRTCPresenceDataEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetPresenceData( /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData) = 0; }; #else /* C style interface */ typedef struct IRTCPresenceDataEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPresenceDataEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPresenceDataEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPresenceDataEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCPresenceDataEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCPresenceDataEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCPresenceDataEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCPresenceDataEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCPresenceDataEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCPresenceDataEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetPresenceData )( IRTCPresenceDataEvent * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); END_INTERFACE } IRTCPresenceDataEventVtbl; interface IRTCPresenceDataEvent { CONST_VTBL struct IRTCPresenceDataEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPresenceDataEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPresenceDataEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPresenceDataEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPresenceDataEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCPresenceDataEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCPresenceDataEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCPresenceDataEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCPresenceDataEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCPresenceDataEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #define IRTCPresenceDataEvent_GetPresenceData(This,pbstrNamespace,pbstrData) \ (This)->lpVtbl -> GetPresenceData(This,pbstrNamespace,pbstrData) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDataEvent_get_StatusCode_Proxy( IRTCPresenceDataEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCPresenceDataEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDataEvent_get_StatusText_Proxy( IRTCPresenceDataEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCPresenceDataEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDataEvent_GetPresenceData_Proxy( IRTCPresenceDataEvent * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); void __RPC_STUB IRTCPresenceDataEvent_GetPresenceData_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPresenceDataEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCPresenceStatusEvent_INTERFACE_DEFINED__ #define __IRTCPresenceStatusEvent_INTERFACE_DEFINED__ /* interface IRTCPresenceStatusEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCPresenceStatusEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("78673F32-4A0F-462c-89AA-EE7706707678") IRTCPresenceStatusEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetLocalPresenceInfo( /* [out] */ RTC_PRESENCE_STATUS *penStatus, /* [out] */ BSTR *pbstrNotes) = 0; }; #else /* C style interface */ typedef struct IRTCPresenceStatusEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPresenceStatusEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPresenceStatusEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPresenceStatusEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCPresenceStatusEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCPresenceStatusEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCPresenceStatusEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCPresenceStatusEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCPresenceStatusEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCPresenceStatusEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetLocalPresenceInfo )( IRTCPresenceStatusEvent * This, /* [out] */ RTC_PRESENCE_STATUS *penStatus, /* [out] */ BSTR *pbstrNotes); END_INTERFACE } IRTCPresenceStatusEventVtbl; interface IRTCPresenceStatusEvent { CONST_VTBL struct IRTCPresenceStatusEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPresenceStatusEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPresenceStatusEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPresenceStatusEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPresenceStatusEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCPresenceStatusEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCPresenceStatusEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCPresenceStatusEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCPresenceStatusEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCPresenceStatusEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #define IRTCPresenceStatusEvent_GetLocalPresenceInfo(This,penStatus,pbstrNotes) \ (This)->lpVtbl -> GetLocalPresenceInfo(This,penStatus,pbstrNotes) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceStatusEvent_get_StatusCode_Proxy( IRTCPresenceStatusEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCPresenceStatusEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceStatusEvent_get_StatusText_Proxy( IRTCPresenceStatusEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCPresenceStatusEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCPresenceStatusEvent_GetLocalPresenceInfo_Proxy( IRTCPresenceStatusEvent * This, /* [out] */ RTC_PRESENCE_STATUS *penStatus, /* [out] */ BSTR *pbstrNotes); void __RPC_STUB IRTCPresenceStatusEvent_GetLocalPresenceInfo_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPresenceStatusEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCCollection_INTERFACE_DEFINED__ #define __IRTCCollection_INTERFACE_DEFINED__ /* interface IRTCCollection */ /* [dual][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCCollection; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("EC7C8096-B918-4044-94F1-E4FBA0361D5C") IRTCCollection : public IDispatch { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( /* [retval][out] */ long *lCount) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Item( /* [in] */ long Index, /* [retval][out] */ VARIANT *pVariant) = 0; virtual /* [helpstring][id][restricted][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( /* [retval][out] */ IUnknown **ppNewEnum) = 0; }; #else /* C style interface */ typedef struct IRTCCollectionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCCollection * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCCollection * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCCollection * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCCollection * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCCollection * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCCollection * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCCollection * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( IRTCCollection * This, /* [retval][out] */ long *lCount); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( IRTCCollection * This, /* [in] */ long Index, /* [retval][out] */ VARIANT *pVariant); /* [helpstring][id][restricted][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( IRTCCollection * This, /* [retval][out] */ IUnknown **ppNewEnum); END_INTERFACE } IRTCCollectionVtbl; interface IRTCCollection { CONST_VTBL struct IRTCCollectionVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCCollection_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCCollection_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCCollection_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCCollection_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCCollection_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCCollection_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCCollection_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCCollection_get_Count(This,lCount) \ (This)->lpVtbl -> get_Count(This,lCount) #define IRTCCollection_get_Item(This,Index,pVariant) \ (This)->lpVtbl -> get_Item(This,Index,pVariant) #define IRTCCollection_get__NewEnum(This,ppNewEnum) \ (This)->lpVtbl -> get__NewEnum(This,ppNewEnum) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCCollection_get_Count_Proxy( IRTCCollection * This, /* [retval][out] */ long *lCount); void __RPC_STUB IRTCCollection_get_Count_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCCollection_get_Item_Proxy( IRTCCollection * This, /* [in] */ long Index, /* [retval][out] */ VARIANT *pVariant); void __RPC_STUB IRTCCollection_get_Item_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][restricted][propget] */ HRESULT STDMETHODCALLTYPE IRTCCollection_get__NewEnum_Proxy( IRTCCollection * This, /* [retval][out] */ IUnknown **ppNewEnum); void __RPC_STUB IRTCCollection_get__NewEnum_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCCollection_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumParticipants_INTERFACE_DEFINED__ #define __IRTCEnumParticipants_INTERFACE_DEFINED__ /* interface IRTCEnumParticipants */ /* [unique][helpstring][hidden][uuid][object] */ EXTERN_C const IID IID_IRTCEnumParticipants; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("fcd56f29-4a4f-41b2-ba5c-f5bccc060bf6") IRTCEnumParticipants : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCParticipant **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumParticipants **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumParticipantsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumParticipants * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumParticipants * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumParticipants * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumParticipants * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCParticipant **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumParticipants * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumParticipants * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumParticipants * This, /* [retval][out] */ IRTCEnumParticipants **ppEnum); END_INTERFACE } IRTCEnumParticipantsVtbl; interface IRTCEnumParticipants { CONST_VTBL struct IRTCEnumParticipantsVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumParticipants_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumParticipants_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumParticipants_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumParticipants_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumParticipants_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumParticipants_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumParticipants_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumParticipants_Next_Proxy( IRTCEnumParticipants * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCParticipant **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumParticipants_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumParticipants_Reset_Proxy( IRTCEnumParticipants * This); void __RPC_STUB IRTCEnumParticipants_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumParticipants_Skip_Proxy( IRTCEnumParticipants * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumParticipants_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumParticipants_Clone_Proxy( IRTCEnumParticipants * This, /* [retval][out] */ IRTCEnumParticipants **ppEnum); void __RPC_STUB IRTCEnumParticipants_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumParticipants_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumProfiles_INTERFACE_DEFINED__ #define __IRTCEnumProfiles_INTERFACE_DEFINED__ /* interface IRTCEnumProfiles */ /* [unique][helpstring][hidden][uuid][object] */ EXTERN_C const IID IID_IRTCEnumProfiles; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("29b7c41c-ed82-4bca-84ad-39d5101b58e3") IRTCEnumProfiles : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCProfile **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumProfiles **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumProfilesVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumProfiles * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumProfiles * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumProfiles * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumProfiles * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCProfile **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumProfiles * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumProfiles * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumProfiles * This, /* [retval][out] */ IRTCEnumProfiles **ppEnum); END_INTERFACE } IRTCEnumProfilesVtbl; interface IRTCEnumProfiles { CONST_VTBL struct IRTCEnumProfilesVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumProfiles_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumProfiles_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumProfiles_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumProfiles_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumProfiles_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumProfiles_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumProfiles_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumProfiles_Next_Proxy( IRTCEnumProfiles * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCProfile **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumProfiles_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumProfiles_Reset_Proxy( IRTCEnumProfiles * This); void __RPC_STUB IRTCEnumProfiles_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumProfiles_Skip_Proxy( IRTCEnumProfiles * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumProfiles_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumProfiles_Clone_Proxy( IRTCEnumProfiles * This, /* [retval][out] */ IRTCEnumProfiles **ppEnum); void __RPC_STUB IRTCEnumProfiles_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumProfiles_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumBuddies_INTERFACE_DEFINED__ #define __IRTCEnumBuddies_INTERFACE_DEFINED__ /* interface IRTCEnumBuddies */ /* [unique][helpstring][hidden][uuid][object] */ EXTERN_C const IID IID_IRTCEnumBuddies; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("f7296917-5569-4b3b-b3af-98d1144b2b87") IRTCEnumBuddies : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCBuddy **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumBuddies **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumBuddiesVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumBuddies * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumBuddies * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumBuddies * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumBuddies * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCBuddy **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumBuddies * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumBuddies * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumBuddies * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); END_INTERFACE } IRTCEnumBuddiesVtbl; interface IRTCEnumBuddies { CONST_VTBL struct IRTCEnumBuddiesVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumBuddies_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumBuddies_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumBuddies_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumBuddies_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumBuddies_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumBuddies_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumBuddies_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumBuddies_Next_Proxy( IRTCEnumBuddies * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCBuddy **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumBuddies_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumBuddies_Reset_Proxy( IRTCEnumBuddies * This); void __RPC_STUB IRTCEnumBuddies_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumBuddies_Skip_Proxy( IRTCEnumBuddies * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumBuddies_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumBuddies_Clone_Proxy( IRTCEnumBuddies * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); void __RPC_STUB IRTCEnumBuddies_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumBuddies_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumWatchers_INTERFACE_DEFINED__ #define __IRTCEnumWatchers_INTERFACE_DEFINED__ /* interface IRTCEnumWatchers */ /* [unique][helpstring][hidden][uuid][object] */ EXTERN_C const IID IID_IRTCEnumWatchers; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("a87d55d7-db74-4ed1-9ca4-77a0e41b413e") IRTCEnumWatchers : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCWatcher **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumWatchers **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumWatchersVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumWatchers * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumWatchers * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumWatchers * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumWatchers * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCWatcher **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumWatchers * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumWatchers * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumWatchers * This, /* [retval][out] */ IRTCEnumWatchers **ppEnum); END_INTERFACE } IRTCEnumWatchersVtbl; interface IRTCEnumWatchers { CONST_VTBL struct IRTCEnumWatchersVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumWatchers_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumWatchers_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumWatchers_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumWatchers_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumWatchers_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumWatchers_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumWatchers_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumWatchers_Next_Proxy( IRTCEnumWatchers * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCWatcher **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumWatchers_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumWatchers_Reset_Proxy( IRTCEnumWatchers * This); void __RPC_STUB IRTCEnumWatchers_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumWatchers_Skip_Proxy( IRTCEnumWatchers * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumWatchers_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumWatchers_Clone_Proxy( IRTCEnumWatchers * This, /* [retval][out] */ IRTCEnumWatchers **ppEnum); void __RPC_STUB IRTCEnumWatchers_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumWatchers_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumGroups_INTERFACE_DEFINED__ #define __IRTCEnumGroups_INTERFACE_DEFINED__ /* interface IRTCEnumGroups */ /* [unique][helpstring][hidden][uuid][object] */ EXTERN_C const IID IID_IRTCEnumGroups; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("742378D6-A141-4415-8F27-35D99076CF5D") IRTCEnumGroups : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCBuddyGroup **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumGroups **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumGroupsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumGroups * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumGroups * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumGroups * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumGroups * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCBuddyGroup **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumGroups * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumGroups * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumGroups * This, /* [retval][out] */ IRTCEnumGroups **ppEnum); END_INTERFACE } IRTCEnumGroupsVtbl; interface IRTCEnumGroups { CONST_VTBL struct IRTCEnumGroupsVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumGroups_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumGroups_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumGroups_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumGroups_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumGroups_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumGroups_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumGroups_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumGroups_Next_Proxy( IRTCEnumGroups * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCBuddyGroup **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumGroups_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumGroups_Reset_Proxy( IRTCEnumGroups * This); void __RPC_STUB IRTCEnumGroups_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumGroups_Skip_Proxy( IRTCEnumGroups * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumGroups_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumGroups_Clone_Proxy( IRTCEnumGroups * This, /* [retval][out] */ IRTCEnumGroups **ppEnum); void __RPC_STUB IRTCEnumGroups_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumGroups_INTERFACE_DEFINED__ */ #ifndef __IRTCPresenceContact_INTERFACE_DEFINED__ #define __IRTCPresenceContact_INTERFACE_DEFINED__ /* interface IRTCPresenceContact */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCPresenceContact; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("8b22f92c-cd90-42db-a733-212205c3e3df") IRTCPresenceContact : public IUnknown { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PresentityURI( /* [retval][out] */ BSTR *pbstrPresentityURI) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PresentityURI( /* [in] */ BSTR bstrPresentityURI) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ BSTR *pbstrName) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Name( /* [in] */ BSTR bstrName) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Data( /* [retval][out] */ BSTR *pbstrData) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Data( /* [in] */ BSTR bstrData) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Persistent( /* [retval][out] */ VARIANT_BOOL *pfPersistent) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Persistent( /* [in] */ VARIANT_BOOL fPersistent) = 0; }; #else /* C style interface */ typedef struct IRTCPresenceContactVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPresenceContact * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPresenceContact * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPresenceContact * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresentityURI )( IRTCPresenceContact * This, /* [retval][out] */ BSTR *pbstrPresentityURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PresentityURI )( IRTCPresenceContact * This, /* [in] */ BSTR bstrPresentityURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCPresenceContact * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( IRTCPresenceContact * This, /* [in] */ BSTR bstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Data )( IRTCPresenceContact * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Data )( IRTCPresenceContact * This, /* [in] */ BSTR bstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Persistent )( IRTCPresenceContact * This, /* [retval][out] */ VARIANT_BOOL *pfPersistent); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Persistent )( IRTCPresenceContact * This, /* [in] */ VARIANT_BOOL fPersistent); END_INTERFACE } IRTCPresenceContactVtbl; interface IRTCPresenceContact { CONST_VTBL struct IRTCPresenceContactVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPresenceContact_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPresenceContact_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPresenceContact_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPresenceContact_get_PresentityURI(This,pbstrPresentityURI) \ (This)->lpVtbl -> get_PresentityURI(This,pbstrPresentityURI) #define IRTCPresenceContact_put_PresentityURI(This,bstrPresentityURI) \ (This)->lpVtbl -> put_PresentityURI(This,bstrPresentityURI) #define IRTCPresenceContact_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCPresenceContact_put_Name(This,bstrName) \ (This)->lpVtbl -> put_Name(This,bstrName) #define IRTCPresenceContact_get_Data(This,pbstrData) \ (This)->lpVtbl -> get_Data(This,pbstrData) #define IRTCPresenceContact_put_Data(This,bstrData) \ (This)->lpVtbl -> put_Data(This,bstrData) #define IRTCPresenceContact_get_Persistent(This,pfPersistent) \ (This)->lpVtbl -> get_Persistent(This,pfPersistent) #define IRTCPresenceContact_put_Persistent(This,fPersistent) \ (This)->lpVtbl -> put_Persistent(This,fPersistent) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_get_PresentityURI_Proxy( IRTCPresenceContact * This, /* [retval][out] */ BSTR *pbstrPresentityURI); void __RPC_STUB IRTCPresenceContact_get_PresentityURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_put_PresentityURI_Proxy( IRTCPresenceContact * This, /* [in] */ BSTR bstrPresentityURI); void __RPC_STUB IRTCPresenceContact_put_PresentityURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_get_Name_Proxy( IRTCPresenceContact * This, /* [retval][out] */ BSTR *pbstrName); void __RPC_STUB IRTCPresenceContact_get_Name_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_put_Name_Proxy( IRTCPresenceContact * This, /* [in] */ BSTR bstrName); void __RPC_STUB IRTCPresenceContact_put_Name_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_get_Data_Proxy( IRTCPresenceContact * This, /* [retval][out] */ BSTR *pbstrData); void __RPC_STUB IRTCPresenceContact_get_Data_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_put_Data_Proxy( IRTCPresenceContact * This, /* [in] */ BSTR bstrData); void __RPC_STUB IRTCPresenceContact_put_Data_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_get_Persistent_Proxy( IRTCPresenceContact * This, /* [retval][out] */ VARIANT_BOOL *pfPersistent); void __RPC_STUB IRTCPresenceContact_get_Persistent_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCPresenceContact_put_Persistent_Proxy( IRTCPresenceContact * This, /* [in] */ VARIANT_BOOL fPersistent); void __RPC_STUB IRTCPresenceContact_put_Persistent_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPresenceContact_INTERFACE_DEFINED__ */ #ifndef __IRTCBuddy_INTERFACE_DEFINED__ #define __IRTCBuddy_INTERFACE_DEFINED__ /* interface IRTCBuddy */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCBuddy; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("fcb136c8-7b90-4e0c-befe-56edf0ba6f1c") IRTCBuddy : public IRTCPresenceContact { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Status( /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Notes( /* [retval][out] */ BSTR *pbstrNotes) = 0; }; #else /* C style interface */ typedef struct IRTCBuddyVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCBuddy * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCBuddy * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCBuddy * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresentityURI )( IRTCBuddy * This, /* [retval][out] */ BSTR *pbstrPresentityURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PresentityURI )( IRTCBuddy * This, /* [in] */ BSTR bstrPresentityURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCBuddy * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( IRTCBuddy * This, /* [in] */ BSTR bstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Data )( IRTCBuddy * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Data )( IRTCBuddy * This, /* [in] */ BSTR bstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Persistent )( IRTCBuddy * This, /* [retval][out] */ VARIANT_BOOL *pfPersistent); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Persistent )( IRTCBuddy * This, /* [in] */ VARIANT_BOOL fPersistent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( IRTCBuddy * This, /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Notes )( IRTCBuddy * This, /* [retval][out] */ BSTR *pbstrNotes); END_INTERFACE } IRTCBuddyVtbl; interface IRTCBuddy { CONST_VTBL struct IRTCBuddyVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCBuddy_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCBuddy_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCBuddy_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCBuddy_get_PresentityURI(This,pbstrPresentityURI) \ (This)->lpVtbl -> get_PresentityURI(This,pbstrPresentityURI) #define IRTCBuddy_put_PresentityURI(This,bstrPresentityURI) \ (This)->lpVtbl -> put_PresentityURI(This,bstrPresentityURI) #define IRTCBuddy_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCBuddy_put_Name(This,bstrName) \ (This)->lpVtbl -> put_Name(This,bstrName) #define IRTCBuddy_get_Data(This,pbstrData) \ (This)->lpVtbl -> get_Data(This,pbstrData) #define IRTCBuddy_put_Data(This,bstrData) \ (This)->lpVtbl -> put_Data(This,bstrData) #define IRTCBuddy_get_Persistent(This,pfPersistent) \ (This)->lpVtbl -> get_Persistent(This,pfPersistent) #define IRTCBuddy_put_Persistent(This,fPersistent) \ (This)->lpVtbl -> put_Persistent(This,fPersistent) #define IRTCBuddy_get_Status(This,penStatus) \ (This)->lpVtbl -> get_Status(This,penStatus) #define IRTCBuddy_get_Notes(This,pbstrNotes) \ (This)->lpVtbl -> get_Notes(This,pbstrNotes) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy_get_Status_Proxy( IRTCBuddy * This, /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus); void __RPC_STUB IRTCBuddy_get_Status_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy_get_Notes_Proxy( IRTCBuddy * This, /* [retval][out] */ BSTR *pbstrNotes); void __RPC_STUB IRTCBuddy_get_Notes_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCBuddy_INTERFACE_DEFINED__ */ #ifndef __IRTCBuddy2_INTERFACE_DEFINED__ #define __IRTCBuddy2_INTERFACE_DEFINED__ /* interface IRTCBuddy2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCBuddy2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("102F9588-23E7-40e3-954D-CD7A1D5C0361") IRTCBuddy2 : public IRTCBuddy { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile2 **ppProfile) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Refresh( void) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateGroups( /* [retval][out] */ IRTCEnumGroups **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Groups( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PresenceProperty( /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnumeratePresenceDevices( /* [retval][out] */ IRTCEnumPresenceDevices **ppEnumDevices) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PresenceDevices( /* [retval][out] */ IRTCCollection **ppDevicesCollection) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SubscriptionType( /* [retval][out] */ RTC_BUDDY_SUBSCRIPTION_TYPE *penSubscriptionType) = 0; }; #else /* C style interface */ typedef struct IRTCBuddy2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCBuddy2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCBuddy2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCBuddy2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresentityURI )( IRTCBuddy2 * This, /* [retval][out] */ BSTR *pbstrPresentityURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PresentityURI )( IRTCBuddy2 * This, /* [in] */ BSTR bstrPresentityURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCBuddy2 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( IRTCBuddy2 * This, /* [in] */ BSTR bstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Data )( IRTCBuddy2 * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Data )( IRTCBuddy2 * This, /* [in] */ BSTR bstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Persistent )( IRTCBuddy2 * This, /* [retval][out] */ VARIANT_BOOL *pfPersistent); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Persistent )( IRTCBuddy2 * This, /* [in] */ VARIANT_BOOL fPersistent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( IRTCBuddy2 * This, /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Notes )( IRTCBuddy2 * This, /* [retval][out] */ BSTR *pbstrNotes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCBuddy2 * This, /* [retval][out] */ IRTCProfile2 **ppProfile); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Refresh )( IRTCBuddy2 * This); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateGroups )( IRTCBuddy2 * This, /* [retval][out] */ IRTCEnumGroups **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Groups )( IRTCBuddy2 * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresenceProperty )( IRTCBuddy2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnumeratePresenceDevices )( IRTCBuddy2 * This, /* [retval][out] */ IRTCEnumPresenceDevices **ppEnumDevices); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresenceDevices )( IRTCBuddy2 * This, /* [retval][out] */ IRTCCollection **ppDevicesCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SubscriptionType )( IRTCBuddy2 * This, /* [retval][out] */ RTC_BUDDY_SUBSCRIPTION_TYPE *penSubscriptionType); END_INTERFACE } IRTCBuddy2Vtbl; interface IRTCBuddy2 { CONST_VTBL struct IRTCBuddy2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCBuddy2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCBuddy2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCBuddy2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCBuddy2_get_PresentityURI(This,pbstrPresentityURI) \ (This)->lpVtbl -> get_PresentityURI(This,pbstrPresentityURI) #define IRTCBuddy2_put_PresentityURI(This,bstrPresentityURI) \ (This)->lpVtbl -> put_PresentityURI(This,bstrPresentityURI) #define IRTCBuddy2_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCBuddy2_put_Name(This,bstrName) \ (This)->lpVtbl -> put_Name(This,bstrName) #define IRTCBuddy2_get_Data(This,pbstrData) \ (This)->lpVtbl -> get_Data(This,pbstrData) #define IRTCBuddy2_put_Data(This,bstrData) \ (This)->lpVtbl -> put_Data(This,bstrData) #define IRTCBuddy2_get_Persistent(This,pfPersistent) \ (This)->lpVtbl -> get_Persistent(This,pfPersistent) #define IRTCBuddy2_put_Persistent(This,fPersistent) \ (This)->lpVtbl -> put_Persistent(This,fPersistent) #define IRTCBuddy2_get_Status(This,penStatus) \ (This)->lpVtbl -> get_Status(This,penStatus) #define IRTCBuddy2_get_Notes(This,pbstrNotes) \ (This)->lpVtbl -> get_Notes(This,pbstrNotes) #define IRTCBuddy2_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCBuddy2_Refresh(This) \ (This)->lpVtbl -> Refresh(This) #define IRTCBuddy2_EnumerateGroups(This,ppEnum) \ (This)->lpVtbl -> EnumerateGroups(This,ppEnum) #define IRTCBuddy2_get_Groups(This,ppCollection) \ (This)->lpVtbl -> get_Groups(This,ppCollection) #define IRTCBuddy2_get_PresenceProperty(This,enProperty,pbstrProperty) \ (This)->lpVtbl -> get_PresenceProperty(This,enProperty,pbstrProperty) #define IRTCBuddy2_EnumeratePresenceDevices(This,ppEnumDevices) \ (This)->lpVtbl -> EnumeratePresenceDevices(This,ppEnumDevices) #define IRTCBuddy2_get_PresenceDevices(This,ppDevicesCollection) \ (This)->lpVtbl -> get_PresenceDevices(This,ppDevicesCollection) #define IRTCBuddy2_get_SubscriptionType(This,penSubscriptionType) \ (This)->lpVtbl -> get_SubscriptionType(This,penSubscriptionType) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_get_Profile_Proxy( IRTCBuddy2 * This, /* [retval][out] */ IRTCProfile2 **ppProfile); void __RPC_STUB IRTCBuddy2_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_Refresh_Proxy( IRTCBuddy2 * This); void __RPC_STUB IRTCBuddy2_Refresh_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_EnumerateGroups_Proxy( IRTCBuddy2 * This, /* [retval][out] */ IRTCEnumGroups **ppEnum); void __RPC_STUB IRTCBuddy2_EnumerateGroups_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_get_Groups_Proxy( IRTCBuddy2 * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCBuddy2_get_Groups_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_get_PresenceProperty_Proxy( IRTCBuddy2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); void __RPC_STUB IRTCBuddy2_get_PresenceProperty_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_EnumeratePresenceDevices_Proxy( IRTCBuddy2 * This, /* [retval][out] */ IRTCEnumPresenceDevices **ppEnumDevices); void __RPC_STUB IRTCBuddy2_EnumeratePresenceDevices_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_get_PresenceDevices_Proxy( IRTCBuddy2 * This, /* [retval][out] */ IRTCCollection **ppDevicesCollection); void __RPC_STUB IRTCBuddy2_get_PresenceDevices_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddy2_get_SubscriptionType_Proxy( IRTCBuddy2 * This, /* [retval][out] */ RTC_BUDDY_SUBSCRIPTION_TYPE *penSubscriptionType); void __RPC_STUB IRTCBuddy2_get_SubscriptionType_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCBuddy2_INTERFACE_DEFINED__ */ #ifndef __IRTCWatcher_INTERFACE_DEFINED__ #define __IRTCWatcher_INTERFACE_DEFINED__ /* interface IRTCWatcher */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCWatcher; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("c7cedad8-346b-4d1b-ac02-a2088df9be4f") IRTCWatcher : public IRTCPresenceContact { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( /* [retval][out] */ RTC_WATCHER_STATE *penState) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_State( /* [in] */ RTC_WATCHER_STATE enState) = 0; }; #else /* C style interface */ typedef struct IRTCWatcherVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCWatcher * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCWatcher * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCWatcher * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresentityURI )( IRTCWatcher * This, /* [retval][out] */ BSTR *pbstrPresentityURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PresentityURI )( IRTCWatcher * This, /* [in] */ BSTR bstrPresentityURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCWatcher * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( IRTCWatcher * This, /* [in] */ BSTR bstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Data )( IRTCWatcher * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Data )( IRTCWatcher * This, /* [in] */ BSTR bstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Persistent )( IRTCWatcher * This, /* [retval][out] */ VARIANT_BOOL *pfPersistent); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Persistent )( IRTCWatcher * This, /* [in] */ VARIANT_BOOL fPersistent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCWatcher * This, /* [retval][out] */ RTC_WATCHER_STATE *penState); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_State )( IRTCWatcher * This, /* [in] */ RTC_WATCHER_STATE enState); END_INTERFACE } IRTCWatcherVtbl; interface IRTCWatcher { CONST_VTBL struct IRTCWatcherVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCWatcher_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCWatcher_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCWatcher_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCWatcher_get_PresentityURI(This,pbstrPresentityURI) \ (This)->lpVtbl -> get_PresentityURI(This,pbstrPresentityURI) #define IRTCWatcher_put_PresentityURI(This,bstrPresentityURI) \ (This)->lpVtbl -> put_PresentityURI(This,bstrPresentityURI) #define IRTCWatcher_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCWatcher_put_Name(This,bstrName) \ (This)->lpVtbl -> put_Name(This,bstrName) #define IRTCWatcher_get_Data(This,pbstrData) \ (This)->lpVtbl -> get_Data(This,pbstrData) #define IRTCWatcher_put_Data(This,bstrData) \ (This)->lpVtbl -> put_Data(This,bstrData) #define IRTCWatcher_get_Persistent(This,pfPersistent) \ (This)->lpVtbl -> get_Persistent(This,pfPersistent) #define IRTCWatcher_put_Persistent(This,fPersistent) \ (This)->lpVtbl -> put_Persistent(This,fPersistent) #define IRTCWatcher_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCWatcher_put_State(This,enState) \ (This)->lpVtbl -> put_State(This,enState) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCWatcher_get_State_Proxy( IRTCWatcher * This, /* [retval][out] */ RTC_WATCHER_STATE *penState); void __RPC_STUB IRTCWatcher_get_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCWatcher_put_State_Proxy( IRTCWatcher * This, /* [in] */ RTC_WATCHER_STATE enState); void __RPC_STUB IRTCWatcher_put_State_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCWatcher_INTERFACE_DEFINED__ */ #ifndef __IRTCWatcher2_INTERFACE_DEFINED__ #define __IRTCWatcher2_INTERFACE_DEFINED__ /* interface IRTCWatcher2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCWatcher2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("D4D9967F-D011-4b1d-91E3-ABA78F96393D") IRTCWatcher2 : public IRTCWatcher { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile2 **ppProfile) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Scope( /* [retval][out] */ RTC_ACE_SCOPE *penScope) = 0; }; #else /* C style interface */ typedef struct IRTCWatcher2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCWatcher2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCWatcher2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCWatcher2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresentityURI )( IRTCWatcher2 * This, /* [retval][out] */ BSTR *pbstrPresentityURI); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PresentityURI )( IRTCWatcher2 * This, /* [in] */ BSTR bstrPresentityURI); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCWatcher2 * This, /* [retval][out] */ BSTR *pbstrName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( IRTCWatcher2 * This, /* [in] */ BSTR bstrName); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Data )( IRTCWatcher2 * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Data )( IRTCWatcher2 * This, /* [in] */ BSTR bstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Persistent )( IRTCWatcher2 * This, /* [retval][out] */ VARIANT_BOOL *pfPersistent); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Persistent )( IRTCWatcher2 * This, /* [in] */ VARIANT_BOOL fPersistent); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( IRTCWatcher2 * This, /* [retval][out] */ RTC_WATCHER_STATE *penState); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_State )( IRTCWatcher2 * This, /* [in] */ RTC_WATCHER_STATE enState); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCWatcher2 * This, /* [retval][out] */ IRTCProfile2 **ppProfile); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Scope )( IRTCWatcher2 * This, /* [retval][out] */ RTC_ACE_SCOPE *penScope); END_INTERFACE } IRTCWatcher2Vtbl; interface IRTCWatcher2 { CONST_VTBL struct IRTCWatcher2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCWatcher2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCWatcher2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCWatcher2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCWatcher2_get_PresentityURI(This,pbstrPresentityURI) \ (This)->lpVtbl -> get_PresentityURI(This,pbstrPresentityURI) #define IRTCWatcher2_put_PresentityURI(This,bstrPresentityURI) \ (This)->lpVtbl -> put_PresentityURI(This,bstrPresentityURI) #define IRTCWatcher2_get_Name(This,pbstrName) \ (This)->lpVtbl -> get_Name(This,pbstrName) #define IRTCWatcher2_put_Name(This,bstrName) \ (This)->lpVtbl -> put_Name(This,bstrName) #define IRTCWatcher2_get_Data(This,pbstrData) \ (This)->lpVtbl -> get_Data(This,pbstrData) #define IRTCWatcher2_put_Data(This,bstrData) \ (This)->lpVtbl -> put_Data(This,bstrData) #define IRTCWatcher2_get_Persistent(This,pfPersistent) \ (This)->lpVtbl -> get_Persistent(This,pfPersistent) #define IRTCWatcher2_put_Persistent(This,fPersistent) \ (This)->lpVtbl -> put_Persistent(This,fPersistent) #define IRTCWatcher2_get_State(This,penState) \ (This)->lpVtbl -> get_State(This,penState) #define IRTCWatcher2_put_State(This,enState) \ (This)->lpVtbl -> put_State(This,enState) #define IRTCWatcher2_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCWatcher2_get_Scope(This,penScope) \ (This)->lpVtbl -> get_Scope(This,penScope) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCWatcher2_get_Profile_Proxy( IRTCWatcher2 * This, /* [retval][out] */ IRTCProfile2 **ppProfile); void __RPC_STUB IRTCWatcher2_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCWatcher2_get_Scope_Proxy( IRTCWatcher2 * This, /* [retval][out] */ RTC_ACE_SCOPE *penScope); void __RPC_STUB IRTCWatcher2_get_Scope_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCWatcher2_INTERFACE_DEFINED__ */ #ifndef __IRTCBuddyGroup_INTERFACE_DEFINED__ #define __IRTCBuddyGroup_INTERFACE_DEFINED__ /* interface IRTCBuddyGroup */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCBuddyGroup; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("60361E68-9164-4389-A4C6-D0B3925BDA5E") IRTCBuddyGroup : public IUnknown { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( /* [retval][out] */ BSTR *pbstrGroupName) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Name( /* [in] */ BSTR bstrGroupName) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddBuddy( /* [in] */ IRTCBuddy *pBuddy) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveBuddy( /* [in] */ IRTCBuddy *pBuddy) = 0; virtual /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateBuddies( /* [retval][out] */ IRTCEnumBuddies **ppEnum) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Buddies( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Data( /* [retval][out] */ BSTR *pbstrData) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Data( /* [in] */ BSTR bstrData) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile2 **ppProfile) = 0; }; #else /* C style interface */ typedef struct IRTCBuddyGroupVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCBuddyGroup * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCBuddyGroup * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCBuddyGroup * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( IRTCBuddyGroup * This, /* [retval][out] */ BSTR *pbstrGroupName); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Name )( IRTCBuddyGroup * This, /* [in] */ BSTR bstrGroupName); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddBuddy )( IRTCBuddyGroup * This, /* [in] */ IRTCBuddy *pBuddy); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveBuddy )( IRTCBuddyGroup * This, /* [in] */ IRTCBuddy *pBuddy); /* [helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateBuddies )( IRTCBuddyGroup * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Buddies )( IRTCBuddyGroup * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Data )( IRTCBuddyGroup * This, /* [retval][out] */ BSTR *pbstrData); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Data )( IRTCBuddyGroup * This, /* [in] */ BSTR bstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCBuddyGroup * This, /* [retval][out] */ IRTCProfile2 **ppProfile); END_INTERFACE } IRTCBuddyGroupVtbl; interface IRTCBuddyGroup { CONST_VTBL struct IRTCBuddyGroupVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCBuddyGroup_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCBuddyGroup_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCBuddyGroup_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCBuddyGroup_get_Name(This,pbstrGroupName) \ (This)->lpVtbl -> get_Name(This,pbstrGroupName) #define IRTCBuddyGroup_put_Name(This,bstrGroupName) \ (This)->lpVtbl -> put_Name(This,bstrGroupName) #define IRTCBuddyGroup_AddBuddy(This,pBuddy) \ (This)->lpVtbl -> AddBuddy(This,pBuddy) #define IRTCBuddyGroup_RemoveBuddy(This,pBuddy) \ (This)->lpVtbl -> RemoveBuddy(This,pBuddy) #define IRTCBuddyGroup_EnumerateBuddies(This,ppEnum) \ (This)->lpVtbl -> EnumerateBuddies(This,ppEnum) #define IRTCBuddyGroup_get_Buddies(This,ppCollection) \ (This)->lpVtbl -> get_Buddies(This,ppCollection) #define IRTCBuddyGroup_get_Data(This,pbstrData) \ (This)->lpVtbl -> get_Data(This,pbstrData) #define IRTCBuddyGroup_put_Data(This,bstrData) \ (This)->lpVtbl -> put_Data(This,bstrData) #define IRTCBuddyGroup_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_get_Name_Proxy( IRTCBuddyGroup * This, /* [retval][out] */ BSTR *pbstrGroupName); void __RPC_STUB IRTCBuddyGroup_get_Name_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_put_Name_Proxy( IRTCBuddyGroup * This, /* [in] */ BSTR bstrGroupName); void __RPC_STUB IRTCBuddyGroup_put_Name_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_AddBuddy_Proxy( IRTCBuddyGroup * This, /* [in] */ IRTCBuddy *pBuddy); void __RPC_STUB IRTCBuddyGroup_AddBuddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_RemoveBuddy_Proxy( IRTCBuddyGroup * This, /* [in] */ IRTCBuddy *pBuddy); void __RPC_STUB IRTCBuddyGroup_RemoveBuddy_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][hidden] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_EnumerateBuddies_Proxy( IRTCBuddyGroup * This, /* [retval][out] */ IRTCEnumBuddies **ppEnum); void __RPC_STUB IRTCBuddyGroup_EnumerateBuddies_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_get_Buddies_Proxy( IRTCBuddyGroup * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCBuddyGroup_get_Buddies_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_get_Data_Proxy( IRTCBuddyGroup * This, /* [retval][out] */ BSTR *pbstrData); void __RPC_STUB IRTCBuddyGroup_get_Data_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_put_Data_Proxy( IRTCBuddyGroup * This, /* [in] */ BSTR bstrData); void __RPC_STUB IRTCBuddyGroup_put_Data_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCBuddyGroup_get_Profile_Proxy( IRTCBuddyGroup * This, /* [retval][out] */ IRTCProfile2 **ppProfile); void __RPC_STUB IRTCBuddyGroup_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCBuddyGroup_INTERFACE_DEFINED__ */ #ifndef __IRTCEventNotification_INTERFACE_DEFINED__ #define __IRTCEventNotification_INTERFACE_DEFINED__ /* interface IRTCEventNotification */ /* [unique][oleautomation][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCEventNotification; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("13fa24c7-5748-4b21-91f5-7397609ce747") IRTCEventNotification : public IUnknown { public: virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Event( /* [in] */ RTC_EVENT RTCEvent, /* [in] */ IDispatch *pEvent) = 0; }; #else /* C style interface */ typedef struct IRTCEventNotificationVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEventNotification * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEventNotification * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEventNotification * This); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Event )( IRTCEventNotification * This, /* [in] */ RTC_EVENT RTCEvent, /* [in] */ IDispatch *pEvent); END_INTERFACE } IRTCEventNotificationVtbl; interface IRTCEventNotification { CONST_VTBL struct IRTCEventNotificationVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEventNotification_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEventNotification_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEventNotification_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEventNotification_Event(This,RTCEvent,pEvent) \ (This)->lpVtbl -> Event(This,RTCEvent,pEvent) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCEventNotification_Event_Proxy( IRTCEventNotification * This, /* [in] */ RTC_EVENT RTCEvent, /* [in] */ IDispatch *pEvent); void __RPC_STUB IRTCEventNotification_Event_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEventNotification_INTERFACE_DEFINED__ */ #ifndef __IRTCPortManager_INTERFACE_DEFINED__ #define __IRTCPortManager_INTERFACE_DEFINED__ /* interface IRTCPortManager */ /* [unique][oleautomation][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCPortManager; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("DA77C14B-6208-43ca-8DDF-5B60A0A69FAC") IRTCPortManager : public IUnknown { public: virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetMapping( /* [in] */ BSTR bstrRemoteAddress, /* [in] */ RTC_PORT_TYPE enPortType, /* [out][in] */ BSTR *pbstrInternalLocalAddress, /* [out][in] */ long *plInternalLocalPort, /* [out][in] */ BSTR *pbstrExternalLocalAddress, /* [out][in] */ long *plExternalLocalPort) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UpdateRemoteAddress( /* [in] */ BSTR bstrRemoteAddress, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ReleaseMapping( /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalAddress) = 0; }; #else /* C style interface */ typedef struct IRTCPortManagerVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPortManager * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPortManager * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPortManager * This); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMapping )( IRTCPortManager * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ RTC_PORT_TYPE enPortType, /* [out][in] */ BSTR *pbstrInternalLocalAddress, /* [out][in] */ long *plInternalLocalPort, /* [out][in] */ BSTR *pbstrExternalLocalAddress, /* [out][in] */ long *plExternalLocalPort); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateRemoteAddress )( IRTCPortManager * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ReleaseMapping )( IRTCPortManager * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalAddress); END_INTERFACE } IRTCPortManagerVtbl; interface IRTCPortManager { CONST_VTBL struct IRTCPortManagerVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPortManager_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPortManager_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPortManager_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPortManager_GetMapping(This,bstrRemoteAddress,enPortType,pbstrInternalLocalAddress,plInternalLocalPort,pbstrExternalLocalAddress,plExternalLocalPort) \ (This)->lpVtbl -> GetMapping(This,bstrRemoteAddress,enPortType,pbstrInternalLocalAddress,plInternalLocalPort,pbstrExternalLocalAddress,plExternalLocalPort) #define IRTCPortManager_UpdateRemoteAddress(This,bstrRemoteAddress,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalPort) \ (This)->lpVtbl -> UpdateRemoteAddress(This,bstrRemoteAddress,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalPort) #define IRTCPortManager_ReleaseMapping(This,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalAddress) \ (This)->lpVtbl -> ReleaseMapping(This,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalAddress) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCPortManager_GetMapping_Proxy( IRTCPortManager * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ RTC_PORT_TYPE enPortType, /* [out][in] */ BSTR *pbstrInternalLocalAddress, /* [out][in] */ long *plInternalLocalPort, /* [out][in] */ BSTR *pbstrExternalLocalAddress, /* [out][in] */ long *plExternalLocalPort); void __RPC_STUB IRTCPortManager_GetMapping_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCPortManager_UpdateRemoteAddress_Proxy( IRTCPortManager * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort); void __RPC_STUB IRTCPortManager_UpdateRemoteAddress_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCPortManager_ReleaseMapping_Proxy( IRTCPortManager * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalAddress); void __RPC_STUB IRTCPortManager_ReleaseMapping_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPortManager_INTERFACE_DEFINED__ */ #ifndef __IRTCPortManager2_INTERFACE_DEFINED__ #define __IRTCPortManager2_INTERFACE_DEFINED__ /* interface IRTCPortManager2 */ /* [unique][oleautomation][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCPortManager2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("269F36EF-334C-43f7-B6E2-367E8D307AEB") IRTCPortManager2 : public IRTCPortManager { public: virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE UpdateRemoteAddressEx( /* [in] */ BSTR bstrRemoteAddress, /* [in] */ long lRemotePort, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort) = 0; }; #else /* C style interface */ typedef struct IRTCPortManager2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPortManager2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPortManager2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPortManager2 * This); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetMapping )( IRTCPortManager2 * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ RTC_PORT_TYPE enPortType, /* [out][in] */ BSTR *pbstrInternalLocalAddress, /* [out][in] */ long *plInternalLocalPort, /* [out][in] */ BSTR *pbstrExternalLocalAddress, /* [out][in] */ long *plExternalLocalPort); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateRemoteAddress )( IRTCPortManager2 * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ReleaseMapping )( IRTCPortManager2 * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalAddress); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *UpdateRemoteAddressEx )( IRTCPortManager2 * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ long lRemotePort, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort); END_INTERFACE } IRTCPortManager2Vtbl; interface IRTCPortManager2 { CONST_VTBL struct IRTCPortManager2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPortManager2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPortManager2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPortManager2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPortManager2_GetMapping(This,bstrRemoteAddress,enPortType,pbstrInternalLocalAddress,plInternalLocalPort,pbstrExternalLocalAddress,plExternalLocalPort) \ (This)->lpVtbl -> GetMapping(This,bstrRemoteAddress,enPortType,pbstrInternalLocalAddress,plInternalLocalPort,pbstrExternalLocalAddress,plExternalLocalPort) #define IRTCPortManager2_UpdateRemoteAddress(This,bstrRemoteAddress,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalPort) \ (This)->lpVtbl -> UpdateRemoteAddress(This,bstrRemoteAddress,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalPort) #define IRTCPortManager2_ReleaseMapping(This,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalAddress) \ (This)->lpVtbl -> ReleaseMapping(This,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalAddress) #define IRTCPortManager2_UpdateRemoteAddressEx(This,bstrRemoteAddress,lRemotePort,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalPort) \ (This)->lpVtbl -> UpdateRemoteAddressEx(This,bstrRemoteAddress,lRemotePort,bstrInternalLocalAddress,lInternalLocalPort,bstrExternalLocalAddress,lExternalLocalPort) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCPortManager2_UpdateRemoteAddressEx_Proxy( IRTCPortManager2 * This, /* [in] */ BSTR bstrRemoteAddress, /* [in] */ long lRemotePort, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort, /* [in] */ BSTR bstrExternalLocalAddress, /* [in] */ long lExternalLocalPort); void __RPC_STUB IRTCPortManager2_UpdateRemoteAddressEx_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPortManager2_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionPortManagement_INTERFACE_DEFINED__ #define __IRTCSessionPortManagement_INTERFACE_DEFINED__ /* interface IRTCSessionPortManagement */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCSessionPortManagement; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("a072f1d6-0286-4e1f-85f2-17a2948456ec") IRTCSessionPortManagement : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE SetPortManager( /* [in] */ IRTCPortManager *pPortManager) = 0; }; #else /* C style interface */ typedef struct IRTCSessionPortManagementVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionPortManagement * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionPortManagement * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionPortManagement * This); HRESULT ( STDMETHODCALLTYPE *SetPortManager )( IRTCSessionPortManagement * This, /* [in] */ IRTCPortManager *pPortManager); END_INTERFACE } IRTCSessionPortManagementVtbl; interface IRTCSessionPortManagement { CONST_VTBL struct IRTCSessionPortManagementVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionPortManagement_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionPortManagement_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionPortManagement_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionPortManagement_SetPortManager(This,pPortManager) \ (This)->lpVtbl -> SetPortManager(This,pPortManager) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCSessionPortManagement_SetPortManager_Proxy( IRTCSessionPortManagement * This, /* [in] */ IRTCPortManager *pPortManager); void __RPC_STUB IRTCSessionPortManagement_SetPortManager_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionPortManagement_INTERFACE_DEFINED__ */ #ifndef __IRTCClientPortManagement_INTERFACE_DEFINED__ #define __IRTCClientPortManagement_INTERFACE_DEFINED__ /* interface IRTCClientPortManagement */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCClientPortManagement; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("d5df3f03-4bde-4417-aefe-71177bdaea66") IRTCClientPortManagement : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE StartListenAddressAndPort( /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort) = 0; virtual HRESULT STDMETHODCALLTYPE StopListenAddressAndPort( /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPortRange( /* [in] */ RTC_PORT_TYPE enPortType, /* [out] */ long *plMinValue, /* [out] */ long *plMaxValue) = 0; }; #else /* C style interface */ typedef struct IRTCClientPortManagementVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCClientPortManagement * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCClientPortManagement * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCClientPortManagement * This); HRESULT ( STDMETHODCALLTYPE *StartListenAddressAndPort )( IRTCClientPortManagement * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort); HRESULT ( STDMETHODCALLTYPE *StopListenAddressAndPort )( IRTCClientPortManagement * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPortRange )( IRTCClientPortManagement * This, /* [in] */ RTC_PORT_TYPE enPortType, /* [out] */ long *plMinValue, /* [out] */ long *plMaxValue); END_INTERFACE } IRTCClientPortManagementVtbl; interface IRTCClientPortManagement { CONST_VTBL struct IRTCClientPortManagementVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCClientPortManagement_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCClientPortManagement_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCClientPortManagement_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCClientPortManagement_StartListenAddressAndPort(This,bstrInternalLocalAddress,lInternalLocalPort) \ (This)->lpVtbl -> StartListenAddressAndPort(This,bstrInternalLocalAddress,lInternalLocalPort) #define IRTCClientPortManagement_StopListenAddressAndPort(This,bstrInternalLocalAddress,lInternalLocalPort) \ (This)->lpVtbl -> StopListenAddressAndPort(This,bstrInternalLocalAddress,lInternalLocalPort) #define IRTCClientPortManagement_GetPortRange(This,enPortType,plMinValue,plMaxValue) \ (This)->lpVtbl -> GetPortRange(This,enPortType,plMinValue,plMaxValue) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCClientPortManagement_StartListenAddressAndPort_Proxy( IRTCClientPortManagement * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort); void __RPC_STUB IRTCClientPortManagement_StartListenAddressAndPort_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCClientPortManagement_StopListenAddressAndPort_Proxy( IRTCClientPortManagement * This, /* [in] */ BSTR bstrInternalLocalAddress, /* [in] */ long lInternalLocalPort); void __RPC_STUB IRTCClientPortManagement_StopListenAddressAndPort_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCClientPortManagement_GetPortRange_Proxy( IRTCClientPortManagement * This, /* [in] */ RTC_PORT_TYPE enPortType, /* [out] */ long *plMinValue, /* [out] */ long *plMaxValue); void __RPC_STUB IRTCClientPortManagement_GetPortRange_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCClientPortManagement_INTERFACE_DEFINED__ */ #ifndef __IRTCUserSearch_INTERFACE_DEFINED__ #define __IRTCUserSearch_INTERFACE_DEFINED__ /* interface IRTCUserSearch */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCUserSearch; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("B619882B-860C-4db4-BE1B-693B6505BBE5") IRTCUserSearch : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateQuery( /* [retval][out] */ IRTCUserSearchQuery **ppQuery) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ExecuteSearch( /* [in] */ IRTCUserSearchQuery *pQuery, /* [in] */ IRTCProfile *pProfile, /* [in] */ LONG_PTR lCookie) = 0; }; #else /* C style interface */ typedef struct IRTCUserSearchVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCUserSearch * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCUserSearch * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCUserSearch * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateQuery )( IRTCUserSearch * This, /* [retval][out] */ IRTCUserSearchQuery **ppQuery); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ExecuteSearch )( IRTCUserSearch * This, /* [in] */ IRTCUserSearchQuery *pQuery, /* [in] */ IRTCProfile *pProfile, /* [in] */ LONG_PTR lCookie); END_INTERFACE } IRTCUserSearchVtbl; interface IRTCUserSearch { CONST_VTBL struct IRTCUserSearchVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCUserSearch_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCUserSearch_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCUserSearch_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCUserSearch_CreateQuery(This,ppQuery) \ (This)->lpVtbl -> CreateQuery(This,ppQuery) #define IRTCUserSearch_ExecuteSearch(This,pQuery,pProfile,lCookie) \ (This)->lpVtbl -> ExecuteSearch(This,pQuery,pProfile,lCookie) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCUserSearch_CreateQuery_Proxy( IRTCUserSearch * This, /* [retval][out] */ IRTCUserSearchQuery **ppQuery); void __RPC_STUB IRTCUserSearch_CreateQuery_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCUserSearch_ExecuteSearch_Proxy( IRTCUserSearch * This, /* [in] */ IRTCUserSearchQuery *pQuery, /* [in] */ IRTCProfile *pProfile, /* [in] */ LONG_PTR lCookie); void __RPC_STUB IRTCUserSearch_ExecuteSearch_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCUserSearch_INTERFACE_DEFINED__ */ #ifndef __IRTCUserSearchQuery_INTERFACE_DEFINED__ #define __IRTCUserSearchQuery_INTERFACE_DEFINED__ /* interface IRTCUserSearchQuery */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCUserSearchQuery; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("288300F5-D23A-4365-9A73-9985C98C2881") IRTCUserSearchQuery : public IUnknown { public: virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SearchTerm( /* [in] */ BSTR bstrName, /* [in] */ BSTR bstrValue) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SearchTerm( /* [in] */ BSTR bstrName, /* [retval][out] */ BSTR *pbstrValue) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SearchTerms( /* [retval][out] */ BSTR *pbstrNames) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SearchPreference( /* [in] */ RTC_USER_SEARCH_PREFERENCE enPreference, /* [in] */ long lValue) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SearchPreference( /* [in] */ RTC_USER_SEARCH_PREFERENCE enPreference, /* [retval][out] */ long *plValue) = 0; virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SearchDomain( /* [in] */ BSTR bstrDomain) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SearchDomain( /* [retval][out] */ BSTR *pbstrDomain) = 0; }; #else /* C style interface */ typedef struct IRTCUserSearchQueryVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCUserSearchQuery * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCUserSearchQuery * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCUserSearchQuery * This); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SearchTerm )( IRTCUserSearchQuery * This, /* [in] */ BSTR bstrName, /* [in] */ BSTR bstrValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SearchTerm )( IRTCUserSearchQuery * This, /* [in] */ BSTR bstrName, /* [retval][out] */ BSTR *pbstrValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SearchTerms )( IRTCUserSearchQuery * This, /* [retval][out] */ BSTR *pbstrNames); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SearchPreference )( IRTCUserSearchQuery * This, /* [in] */ RTC_USER_SEARCH_PREFERENCE enPreference, /* [in] */ long lValue); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SearchPreference )( IRTCUserSearchQuery * This, /* [in] */ RTC_USER_SEARCH_PREFERENCE enPreference, /* [retval][out] */ long *plValue); /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SearchDomain )( IRTCUserSearchQuery * This, /* [in] */ BSTR bstrDomain); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SearchDomain )( IRTCUserSearchQuery * This, /* [retval][out] */ BSTR *pbstrDomain); END_INTERFACE } IRTCUserSearchQueryVtbl; interface IRTCUserSearchQuery { CONST_VTBL struct IRTCUserSearchQueryVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCUserSearchQuery_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCUserSearchQuery_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCUserSearchQuery_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCUserSearchQuery_put_SearchTerm(This,bstrName,bstrValue) \ (This)->lpVtbl -> put_SearchTerm(This,bstrName,bstrValue) #define IRTCUserSearchQuery_get_SearchTerm(This,bstrName,pbstrValue) \ (This)->lpVtbl -> get_SearchTerm(This,bstrName,pbstrValue) #define IRTCUserSearchQuery_get_SearchTerms(This,pbstrNames) \ (This)->lpVtbl -> get_SearchTerms(This,pbstrNames) #define IRTCUserSearchQuery_put_SearchPreference(This,enPreference,lValue) \ (This)->lpVtbl -> put_SearchPreference(This,enPreference,lValue) #define IRTCUserSearchQuery_get_SearchPreference(This,enPreference,plValue) \ (This)->lpVtbl -> get_SearchPreference(This,enPreference,plValue) #define IRTCUserSearchQuery_put_SearchDomain(This,bstrDomain) \ (This)->lpVtbl -> put_SearchDomain(This,bstrDomain) #define IRTCUserSearchQuery_get_SearchDomain(This,pbstrDomain) \ (This)->lpVtbl -> get_SearchDomain(This,pbstrDomain) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_put_SearchTerm_Proxy( IRTCUserSearchQuery * This, /* [in] */ BSTR bstrName, /* [in] */ BSTR bstrValue); void __RPC_STUB IRTCUserSearchQuery_put_SearchTerm_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_get_SearchTerm_Proxy( IRTCUserSearchQuery * This, /* [in] */ BSTR bstrName, /* [retval][out] */ BSTR *pbstrValue); void __RPC_STUB IRTCUserSearchQuery_get_SearchTerm_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_get_SearchTerms_Proxy( IRTCUserSearchQuery * This, /* [retval][out] */ BSTR *pbstrNames); void __RPC_STUB IRTCUserSearchQuery_get_SearchTerms_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_put_SearchPreference_Proxy( IRTCUserSearchQuery * This, /* [in] */ RTC_USER_SEARCH_PREFERENCE enPreference, /* [in] */ long lValue); void __RPC_STUB IRTCUserSearchQuery_put_SearchPreference_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_get_SearchPreference_Proxy( IRTCUserSearchQuery * This, /* [in] */ RTC_USER_SEARCH_PREFERENCE enPreference, /* [retval][out] */ long *plValue); void __RPC_STUB IRTCUserSearchQuery_get_SearchPreference_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_put_SearchDomain_Proxy( IRTCUserSearchQuery * This, /* [in] */ BSTR bstrDomain); void __RPC_STUB IRTCUserSearchQuery_put_SearchDomain_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchQuery_get_SearchDomain_Proxy( IRTCUserSearchQuery * This, /* [retval][out] */ BSTR *pbstrDomain); void __RPC_STUB IRTCUserSearchQuery_get_SearchDomain_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCUserSearchQuery_INTERFACE_DEFINED__ */ #ifndef __IRTCUserSearchResult_INTERFACE_DEFINED__ #define __IRTCUserSearchResult_INTERFACE_DEFINED__ /* interface IRTCUserSearchResult */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCUserSearchResult; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("851278B2-9592-480f-8DB5-2DE86B26B54D") IRTCUserSearchResult : public IUnknown { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Value( /* [in] */ RTC_USER_SEARCH_COLUMN enColumn, /* [retval][out] */ BSTR *pbstrValue) = 0; }; #else /* C style interface */ typedef struct IRTCUserSearchResultVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCUserSearchResult * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCUserSearchResult * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCUserSearchResult * This); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( IRTCUserSearchResult * This, /* [in] */ RTC_USER_SEARCH_COLUMN enColumn, /* [retval][out] */ BSTR *pbstrValue); END_INTERFACE } IRTCUserSearchResultVtbl; interface IRTCUserSearchResult { CONST_VTBL struct IRTCUserSearchResultVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCUserSearchResult_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCUserSearchResult_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCUserSearchResult_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCUserSearchResult_get_Value(This,enColumn,pbstrValue) \ (This)->lpVtbl -> get_Value(This,enColumn,pbstrValue) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResult_get_Value_Proxy( IRTCUserSearchResult * This, /* [in] */ RTC_USER_SEARCH_COLUMN enColumn, /* [retval][out] */ BSTR *pbstrValue); void __RPC_STUB IRTCUserSearchResult_get_Value_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCUserSearchResult_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumUserSearchResults_INTERFACE_DEFINED__ #define __IRTCEnumUserSearchResults_INTERFACE_DEFINED__ /* interface IRTCEnumUserSearchResults */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCEnumUserSearchResults; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("83D4D877-AA5D-4a5b-8D0E-002A8067E0E8") IRTCEnumUserSearchResults : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCUserSearchResult **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumUserSearchResults **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumUserSearchResultsVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumUserSearchResults * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumUserSearchResults * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumUserSearchResults * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumUserSearchResults * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCUserSearchResult **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumUserSearchResults * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumUserSearchResults * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumUserSearchResults * This, /* [retval][out] */ IRTCEnumUserSearchResults **ppEnum); END_INTERFACE } IRTCEnumUserSearchResultsVtbl; interface IRTCEnumUserSearchResults { CONST_VTBL struct IRTCEnumUserSearchResultsVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumUserSearchResults_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumUserSearchResults_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumUserSearchResults_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumUserSearchResults_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumUserSearchResults_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumUserSearchResults_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumUserSearchResults_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumUserSearchResults_Next_Proxy( IRTCEnumUserSearchResults * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCUserSearchResult **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumUserSearchResults_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumUserSearchResults_Reset_Proxy( IRTCEnumUserSearchResults * This); void __RPC_STUB IRTCEnumUserSearchResults_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumUserSearchResults_Skip_Proxy( IRTCEnumUserSearchResults * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumUserSearchResults_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumUserSearchResults_Clone_Proxy( IRTCEnumUserSearchResults * This, /* [retval][out] */ IRTCEnumUserSearchResults **ppEnum); void __RPC_STUB IRTCEnumUserSearchResults_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumUserSearchResults_INTERFACE_DEFINED__ */ #ifndef __IRTCUserSearchResultsEvent_INTERFACE_DEFINED__ #define __IRTCUserSearchResultsEvent_INTERFACE_DEFINED__ /* interface IRTCUserSearchResultsEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCUserSearchResultsEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("D8C8C3CD-7FAC-4088-81C5-C24CBC0938E3") IRTCUserSearchResultsEvent : public IDispatch { public: virtual /* [helpstring][id][hidden] */ HRESULT STDMETHODCALLTYPE EnumerateResults( /* [retval][out] */ IRTCEnumUserSearchResults **ppEnum) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Results( /* [retval][out] */ IRTCCollection **ppCollection) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( /* [retval][out] */ IRTCProfile2 **ppProfile) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Query( /* [retval][out] */ IRTCUserSearchQuery **ppQuery) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Cookie( /* [retval][out] */ LONG_PTR *plCookie) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MoreAvailable( /* [retval][out] */ VARIANT_BOOL *pfMoreAvailable) = 0; }; #else /* C style interface */ typedef struct IRTCUserSearchResultsEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCUserSearchResultsEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCUserSearchResultsEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCUserSearchResultsEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCUserSearchResultsEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCUserSearchResultsEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCUserSearchResultsEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCUserSearchResultsEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumerateResults )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCEnumUserSearchResults **ppEnum); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Results )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCCollection **ppCollection); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCProfile2 **ppProfile); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Query )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCUserSearchQuery **ppQuery); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Cookie )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ LONG_PTR *plCookie); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MoreAvailable )( IRTCUserSearchResultsEvent * This, /* [retval][out] */ VARIANT_BOOL *pfMoreAvailable); END_INTERFACE } IRTCUserSearchResultsEventVtbl; interface IRTCUserSearchResultsEvent { CONST_VTBL struct IRTCUserSearchResultsEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCUserSearchResultsEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCUserSearchResultsEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCUserSearchResultsEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCUserSearchResultsEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCUserSearchResultsEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCUserSearchResultsEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCUserSearchResultsEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCUserSearchResultsEvent_EnumerateResults(This,ppEnum) \ (This)->lpVtbl -> EnumerateResults(This,ppEnum) #define IRTCUserSearchResultsEvent_get_Results(This,ppCollection) \ (This)->lpVtbl -> get_Results(This,ppCollection) #define IRTCUserSearchResultsEvent_get_Profile(This,ppProfile) \ (This)->lpVtbl -> get_Profile(This,ppProfile) #define IRTCUserSearchResultsEvent_get_Query(This,ppQuery) \ (This)->lpVtbl -> get_Query(This,ppQuery) #define IRTCUserSearchResultsEvent_get_Cookie(This,plCookie) \ (This)->lpVtbl -> get_Cookie(This,plCookie) #define IRTCUserSearchResultsEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCUserSearchResultsEvent_get_MoreAvailable(This,pfMoreAvailable) \ (This)->lpVtbl -> get_MoreAvailable(This,pfMoreAvailable) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][hidden] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_EnumerateResults_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCEnumUserSearchResults **ppEnum); void __RPC_STUB IRTCUserSearchResultsEvent_EnumerateResults_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_get_Results_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCCollection **ppCollection); void __RPC_STUB IRTCUserSearchResultsEvent_get_Results_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_get_Profile_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCProfile2 **ppProfile); void __RPC_STUB IRTCUserSearchResultsEvent_get_Profile_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_get_Query_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ IRTCUserSearchQuery **ppQuery); void __RPC_STUB IRTCUserSearchResultsEvent_get_Query_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_get_Cookie_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ LONG_PTR *plCookie); void __RPC_STUB IRTCUserSearchResultsEvent_get_Cookie_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_get_StatusCode_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCUserSearchResultsEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCUserSearchResultsEvent_get_MoreAvailable_Proxy( IRTCUserSearchResultsEvent * This, /* [retval][out] */ VARIANT_BOOL *pfMoreAvailable); void __RPC_STUB IRTCUserSearchResultsEvent_get_MoreAvailable_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCUserSearchResultsEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionReferStatusEvent_INTERFACE_DEFINED__ #define __IRTCSessionReferStatusEvent_INTERFACE_DEFINED__ /* interface IRTCSessionReferStatusEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCSessionReferStatusEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("3D8FC2CD-5D76-44AB-BB68-2A80353B34A2") IRTCSessionReferStatusEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession2 **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReferStatus( /* [retval][out] */ RTC_SESSION_REFER_STATUS *penReferStatus) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusCode( /* [retval][out] */ long *plStatusCode) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StatusText( /* [retval][out] */ BSTR *pbstrStatusText) = 0; }; #else /* C style interface */ typedef struct IRTCSessionReferStatusEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionReferStatusEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionReferStatusEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionReferStatusEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCSessionReferStatusEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCSessionReferStatusEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCSessionReferStatusEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCSessionReferStatusEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCSessionReferStatusEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReferStatus )( IRTCSessionReferStatusEvent * This, /* [retval][out] */ RTC_SESSION_REFER_STATUS *penReferStatus); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusCode )( IRTCSessionReferStatusEvent * This, /* [retval][out] */ long *plStatusCode); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StatusText )( IRTCSessionReferStatusEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); END_INTERFACE } IRTCSessionReferStatusEventVtbl; interface IRTCSessionReferStatusEvent { CONST_VTBL struct IRTCSessionReferStatusEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionReferStatusEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionReferStatusEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionReferStatusEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionReferStatusEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCSessionReferStatusEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCSessionReferStatusEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCSessionReferStatusEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCSessionReferStatusEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCSessionReferStatusEvent_get_ReferStatus(This,penReferStatus) \ (This)->lpVtbl -> get_ReferStatus(This,penReferStatus) #define IRTCSessionReferStatusEvent_get_StatusCode(This,plStatusCode) \ (This)->lpVtbl -> get_StatusCode(This,plStatusCode) #define IRTCSessionReferStatusEvent_get_StatusText(This,pbstrStatusText) \ (This)->lpVtbl -> get_StatusText(This,pbstrStatusText) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferStatusEvent_get_Session_Proxy( IRTCSessionReferStatusEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); void __RPC_STUB IRTCSessionReferStatusEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferStatusEvent_get_ReferStatus_Proxy( IRTCSessionReferStatusEvent * This, /* [retval][out] */ RTC_SESSION_REFER_STATUS *penReferStatus); void __RPC_STUB IRTCSessionReferStatusEvent_get_ReferStatus_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferStatusEvent_get_StatusCode_Proxy( IRTCSessionReferStatusEvent * This, /* [retval][out] */ long *plStatusCode); void __RPC_STUB IRTCSessionReferStatusEvent_get_StatusCode_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferStatusEvent_get_StatusText_Proxy( IRTCSessionReferStatusEvent * This, /* [retval][out] */ BSTR *pbstrStatusText); void __RPC_STUB IRTCSessionReferStatusEvent_get_StatusText_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionReferStatusEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionReferredEvent_INTERFACE_DEFINED__ #define __IRTCSessionReferredEvent_INTERFACE_DEFINED__ /* interface IRTCSessionReferredEvent */ /* [unique][helpstring][dual][uuid][object] */ EXTERN_C const IID IID_IRTCSessionReferredEvent; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("176A6828-4FCC-4F28-A862-04597A6CF1C4") IRTCSessionReferredEvent : public IDispatch { public: virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Session( /* [retval][out] */ IRTCSession2 **ppSession) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReferredByURI( /* [retval][out] */ BSTR *pbstrReferredByURI) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReferToURI( /* [retval][out] */ BSTR *pbstrReferoURI) = 0; virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReferCookie( /* [retval][out] */ BSTR *pbstrReferCookie) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Accept( void) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Reject( void) = 0; virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetReferredSessionState( /* [in] */ RTC_SESSION_STATE enState) = 0; }; #else /* C style interface */ typedef struct IRTCSessionReferredEventVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionReferredEvent * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionReferredEvent * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionReferredEvent * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCSessionReferredEvent * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCSessionReferredEvent * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCSessionReferredEvent * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCSessionReferredEvent * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Session )( IRTCSessionReferredEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReferredByURI )( IRTCSessionReferredEvent * This, /* [retval][out] */ BSTR *pbstrReferredByURI); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReferToURI )( IRTCSessionReferredEvent * This, /* [retval][out] */ BSTR *pbstrReferoURI); /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReferCookie )( IRTCSessionReferredEvent * This, /* [retval][out] */ BSTR *pbstrReferCookie); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Accept )( IRTCSessionReferredEvent * This); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Reject )( IRTCSessionReferredEvent * This); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetReferredSessionState )( IRTCSessionReferredEvent * This, /* [in] */ RTC_SESSION_STATE enState); END_INTERFACE } IRTCSessionReferredEventVtbl; interface IRTCSessionReferredEvent { CONST_VTBL struct IRTCSessionReferredEventVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionReferredEvent_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionReferredEvent_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionReferredEvent_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionReferredEvent_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCSessionReferredEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCSessionReferredEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCSessionReferredEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #define IRTCSessionReferredEvent_get_Session(This,ppSession) \ (This)->lpVtbl -> get_Session(This,ppSession) #define IRTCSessionReferredEvent_get_ReferredByURI(This,pbstrReferredByURI) \ (This)->lpVtbl -> get_ReferredByURI(This,pbstrReferredByURI) #define IRTCSessionReferredEvent_get_ReferToURI(This,pbstrReferoURI) \ (This)->lpVtbl -> get_ReferToURI(This,pbstrReferoURI) #define IRTCSessionReferredEvent_get_ReferCookie(This,pbstrReferCookie) \ (This)->lpVtbl -> get_ReferCookie(This,pbstrReferCookie) #define IRTCSessionReferredEvent_Accept(This) \ (This)->lpVtbl -> Accept(This) #define IRTCSessionReferredEvent_Reject(This) \ (This)->lpVtbl -> Reject(This) #define IRTCSessionReferredEvent_SetReferredSessionState(This,enState) \ (This)->lpVtbl -> SetReferredSessionState(This,enState) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_get_Session_Proxy( IRTCSessionReferredEvent * This, /* [retval][out] */ IRTCSession2 **ppSession); void __RPC_STUB IRTCSessionReferredEvent_get_Session_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_get_ReferredByURI_Proxy( IRTCSessionReferredEvent * This, /* [retval][out] */ BSTR *pbstrReferredByURI); void __RPC_STUB IRTCSessionReferredEvent_get_ReferredByURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_get_ReferToURI_Proxy( IRTCSessionReferredEvent * This, /* [retval][out] */ BSTR *pbstrReferoURI); void __RPC_STUB IRTCSessionReferredEvent_get_ReferToURI_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_get_ReferCookie_Proxy( IRTCSessionReferredEvent * This, /* [retval][out] */ BSTR *pbstrReferCookie); void __RPC_STUB IRTCSessionReferredEvent_get_ReferCookie_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_Accept_Proxy( IRTCSessionReferredEvent * This); void __RPC_STUB IRTCSessionReferredEvent_Accept_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_Reject_Proxy( IRTCSessionReferredEvent * This); void __RPC_STUB IRTCSessionReferredEvent_Reject_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCSessionReferredEvent_SetReferredSessionState_Proxy( IRTCSessionReferredEvent * This, /* [in] */ RTC_SESSION_STATE enState); void __RPC_STUB IRTCSessionReferredEvent_SetReferredSessionState_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionReferredEvent_INTERFACE_DEFINED__ */ #ifndef __IRTCSessionDescriptionManager_INTERFACE_DEFINED__ #define __IRTCSessionDescriptionManager_INTERFACE_DEFINED__ /* interface IRTCSessionDescriptionManager */ /* [unique][oleautomation][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCSessionDescriptionManager; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("BA7F518E-D336-4070-93A6-865395C843F9") IRTCSessionDescriptionManager : public IUnknown { public: virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EvaluateSessionDescription( /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [out][in] */ VARIANT_BOOL *pfApplicationSession) = 0; }; #else /* C style interface */ typedef struct IRTCSessionDescriptionManagerVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCSessionDescriptionManager * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCSessionDescriptionManager * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCSessionDescriptionManager * This); /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EvaluateSessionDescription )( IRTCSessionDescriptionManager * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [out][in] */ VARIANT_BOOL *pfApplicationSession); END_INTERFACE } IRTCSessionDescriptionManagerVtbl; interface IRTCSessionDescriptionManager { CONST_VTBL struct IRTCSessionDescriptionManagerVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCSessionDescriptionManager_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCSessionDescriptionManager_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCSessionDescriptionManager_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCSessionDescriptionManager_EvaluateSessionDescription(This,bstrContentType,bstrSessionDescription,pfApplicationSession) \ (This)->lpVtbl -> EvaluateSessionDescription(This,bstrContentType,bstrSessionDescription,pfApplicationSession) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IRTCSessionDescriptionManager_EvaluateSessionDescription_Proxy( IRTCSessionDescriptionManager * This, /* [in] */ BSTR bstrContentType, /* [in] */ BSTR bstrSessionDescription, /* [out][in] */ VARIANT_BOOL *pfApplicationSession); void __RPC_STUB IRTCSessionDescriptionManager_EvaluateSessionDescription_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCSessionDescriptionManager_INTERFACE_DEFINED__ */ #ifndef __IRTCEnumPresenceDevices_INTERFACE_DEFINED__ #define __IRTCEnumPresenceDevices_INTERFACE_DEFINED__ /* interface IRTCEnumPresenceDevices */ /* [unique][helpstring][hidden][uuid][object] */ EXTERN_C const IID IID_IRTCEnumPresenceDevices; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("708C2AB7-8BF8-42f8-8C7D-635197AD5539") IRTCEnumPresenceDevices : public IUnknown { public: virtual HRESULT STDMETHODCALLTYPE Next( /* [in] */ ULONG celt, /* [size_is][out] */ IRTCPresenceDevice **ppElements, /* [full][out][in] */ ULONG *pceltFetched) = 0; virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; virtual HRESULT STDMETHODCALLTYPE Skip( /* [in] */ ULONG celt) = 0; virtual HRESULT STDMETHODCALLTYPE Clone( /* [retval][out] */ IRTCEnumPresenceDevices **ppEnum) = 0; }; #else /* C style interface */ typedef struct IRTCEnumPresenceDevicesVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCEnumPresenceDevices * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCEnumPresenceDevices * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCEnumPresenceDevices * This); HRESULT ( STDMETHODCALLTYPE *Next )( IRTCEnumPresenceDevices * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCPresenceDevice **ppElements, /* [full][out][in] */ ULONG *pceltFetched); HRESULT ( STDMETHODCALLTYPE *Reset )( IRTCEnumPresenceDevices * This); HRESULT ( STDMETHODCALLTYPE *Skip )( IRTCEnumPresenceDevices * This, /* [in] */ ULONG celt); HRESULT ( STDMETHODCALLTYPE *Clone )( IRTCEnumPresenceDevices * This, /* [retval][out] */ IRTCEnumPresenceDevices **ppEnum); END_INTERFACE } IRTCEnumPresenceDevicesVtbl; interface IRTCEnumPresenceDevices { CONST_VTBL struct IRTCEnumPresenceDevicesVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCEnumPresenceDevices_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCEnumPresenceDevices_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCEnumPresenceDevices_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCEnumPresenceDevices_Next(This,celt,ppElements,pceltFetched) \ (This)->lpVtbl -> Next(This,celt,ppElements,pceltFetched) #define IRTCEnumPresenceDevices_Reset(This) \ (This)->lpVtbl -> Reset(This) #define IRTCEnumPresenceDevices_Skip(This,celt) \ (This)->lpVtbl -> Skip(This,celt) #define IRTCEnumPresenceDevices_Clone(This,ppEnum) \ (This)->lpVtbl -> Clone(This,ppEnum) #endif /* COBJMACROS */ #endif /* C style interface */ HRESULT STDMETHODCALLTYPE IRTCEnumPresenceDevices_Next_Proxy( IRTCEnumPresenceDevices * This, /* [in] */ ULONG celt, /* [size_is][out] */ IRTCPresenceDevice **ppElements, /* [full][out][in] */ ULONG *pceltFetched); void __RPC_STUB IRTCEnumPresenceDevices_Next_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumPresenceDevices_Reset_Proxy( IRTCEnumPresenceDevices * This); void __RPC_STUB IRTCEnumPresenceDevices_Reset_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumPresenceDevices_Skip_Proxy( IRTCEnumPresenceDevices * This, /* [in] */ ULONG celt); void __RPC_STUB IRTCEnumPresenceDevices_Skip_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); HRESULT STDMETHODCALLTYPE IRTCEnumPresenceDevices_Clone_Proxy( IRTCEnumPresenceDevices * This, /* [retval][out] */ IRTCEnumPresenceDevices **ppEnum); void __RPC_STUB IRTCEnumPresenceDevices_Clone_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCEnumPresenceDevices_INTERFACE_DEFINED__ */ #ifndef __IRTCPresenceDevice_INTERFACE_DEFINED__ #define __IRTCPresenceDevice_INTERFACE_DEFINED__ /* interface IRTCPresenceDevice */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCPresenceDevice; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("BC6A90DD-AD9A-48da-9B0C-2515E38521AD") IRTCPresenceDevice : public IUnknown { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Status( /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Notes( /* [retval][out] */ BSTR *pbstrNotes) = 0; virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PresenceProperty( /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPresenceData( /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData) = 0; }; #else /* C style interface */ typedef struct IRTCPresenceDeviceVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPresenceDevice * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPresenceDevice * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPresenceDevice * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( IRTCPresenceDevice * This, /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Notes )( IRTCPresenceDevice * This, /* [retval][out] */ BSTR *pbstrNotes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresenceProperty )( IRTCPresenceDevice * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPresenceData )( IRTCPresenceDevice * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); END_INTERFACE } IRTCPresenceDeviceVtbl; interface IRTCPresenceDevice { CONST_VTBL struct IRTCPresenceDeviceVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPresenceDevice_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPresenceDevice_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPresenceDevice_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPresenceDevice_get_Status(This,penStatus) \ (This)->lpVtbl -> get_Status(This,penStatus) #define IRTCPresenceDevice_get_Notes(This,pbstrNotes) \ (This)->lpVtbl -> get_Notes(This,pbstrNotes) #define IRTCPresenceDevice_get_PresenceProperty(This,enProperty,pbstrProperty) \ (This)->lpVtbl -> get_PresenceProperty(This,enProperty,pbstrProperty) #define IRTCPresenceDevice_GetPresenceData(This,pbstrNamespace,pbstrData) \ (This)->lpVtbl -> GetPresenceData(This,pbstrNamespace,pbstrData) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDevice_get_Status_Proxy( IRTCPresenceDevice * This, /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus); void __RPC_STUB IRTCPresenceDevice_get_Status_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDevice_get_Notes_Proxy( IRTCPresenceDevice * This, /* [retval][out] */ BSTR *pbstrNotes); void __RPC_STUB IRTCPresenceDevice_get_Notes_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDevice_get_PresenceProperty_Proxy( IRTCPresenceDevice * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); void __RPC_STUB IRTCPresenceDevice_get_PresenceProperty_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); /* [helpstring] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDevice_GetPresenceData_Proxy( IRTCPresenceDevice * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); void __RPC_STUB IRTCPresenceDevice_GetPresenceData_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPresenceDevice_INTERFACE_DEFINED__ */ #ifndef __IRTCPresenceDevice2_INTERFACE_DEFINED__ #define __IRTCPresenceDevice2_INTERFACE_DEFINED__ /* interface IRTCPresenceDevice2 */ /* [unique][helpstring][uuid][object] */ EXTERN_C const IID IID_IRTCPresenceDevice2; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("00DE7891-77A8-4123-A9A4-4E5728BD8AC3") IRTCPresenceDevice2 : public IRTCPresenceDevice { public: virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DeviceID( /* [retval][out] */ BSTR *pbstrDeviceID) = 0; }; #else /* C style interface */ typedef struct IRTCPresenceDevice2Vtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCPresenceDevice2 * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCPresenceDevice2 * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCPresenceDevice2 * This); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( IRTCPresenceDevice2 * This, /* [retval][out] */ RTC_PRESENCE_STATUS *penStatus); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Notes )( IRTCPresenceDevice2 * This, /* [retval][out] */ BSTR *pbstrNotes); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PresenceProperty )( IRTCPresenceDevice2 * This, /* [in] */ RTC_PRESENCE_PROPERTY enProperty, /* [retval][out] */ BSTR *pbstrProperty); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPresenceData )( IRTCPresenceDevice2 * This, /* [out] */ BSTR *pbstrNamespace, /* [out] */ BSTR *pbstrData); /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DeviceID )( IRTCPresenceDevice2 * This, /* [retval][out] */ BSTR *pbstrDeviceID); END_INTERFACE } IRTCPresenceDevice2Vtbl; interface IRTCPresenceDevice2 { CONST_VTBL struct IRTCPresenceDevice2Vtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCPresenceDevice2_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCPresenceDevice2_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCPresenceDevice2_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCPresenceDevice2_get_Status(This,penStatus) \ (This)->lpVtbl -> get_Status(This,penStatus) #define IRTCPresenceDevice2_get_Notes(This,pbstrNotes) \ (This)->lpVtbl -> get_Notes(This,pbstrNotes) #define IRTCPresenceDevice2_get_PresenceProperty(This,enProperty,pbstrProperty) \ (This)->lpVtbl -> get_PresenceProperty(This,enProperty,pbstrProperty) #define IRTCPresenceDevice2_GetPresenceData(This,pbstrNamespace,pbstrData) \ (This)->lpVtbl -> GetPresenceData(This,pbstrNamespace,pbstrData) #define IRTCPresenceDevice2_get_DeviceID(This,pbstrDeviceID) \ (This)->lpVtbl -> get_DeviceID(This,pbstrDeviceID) #endif /* COBJMACROS */ #endif /* C style interface */ /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IRTCPresenceDevice2_get_DeviceID_Proxy( IRTCPresenceDevice2 * This, /* [retval][out] */ BSTR *pbstrDeviceID); void __RPC_STUB IRTCPresenceDevice2_get_DeviceID_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, DWORD *_pdwStubPhase); #endif /* __IRTCPresenceDevice2_INTERFACE_DEFINED__ */ #ifndef __RTCCORELib_LIBRARY_DEFINED__ #define __RTCCORELib_LIBRARY_DEFINED__ /* library RTCCORELib */ /* [helpstring][version][uuid] */ EXTERN_C const IID LIBID_RTCCORELib; #ifndef __IRTCDispatchEventNotification_DISPINTERFACE_DEFINED__ #define __IRTCDispatchEventNotification_DISPINTERFACE_DEFINED__ /* dispinterface IRTCDispatchEventNotification */ /* [helpstring][uuid] */ EXTERN_C const IID DIID_IRTCDispatchEventNotification; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("176ddfbe-fec0-4d55-bc87-84cff1ef7f91") IRTCDispatchEventNotification : public IDispatch { }; #else /* C style interface */ typedef struct IRTCDispatchEventNotificationVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IRTCDispatchEventNotification * This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IRTCDispatchEventNotification * This); ULONG ( STDMETHODCALLTYPE *Release )( IRTCDispatchEventNotification * This); HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( IRTCDispatchEventNotification * This, /* [out] */ UINT *pctinfo); HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( IRTCDispatchEventNotification * This, /* [in] */ UINT iTInfo, /* [in] */ LCID lcid, /* [out] */ ITypeInfo **ppTInfo); HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( IRTCDispatchEventNotification * This, /* [in] */ REFIID riid, /* [size_is][in] */ LPOLESTR *rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID *rgDispId); /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( IRTCDispatchEventNotification * This, /* [in] */ DISPID dispIdMember, /* [in] */ REFIID riid, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, /* [out][in] */ DISPPARAMS *pDispParams, /* [out] */ VARIANT *pVarResult, /* [out] */ EXCEPINFO *pExcepInfo, /* [out] */ UINT *puArgErr); END_INTERFACE } IRTCDispatchEventNotificationVtbl; interface IRTCDispatchEventNotification { CONST_VTBL struct IRTCDispatchEventNotificationVtbl *lpVtbl; }; #ifdef COBJMACROS #define IRTCDispatchEventNotification_QueryInterface(This,riid,ppvObject) \ (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) #define IRTCDispatchEventNotification_AddRef(This) \ (This)->lpVtbl -> AddRef(This) #define IRTCDispatchEventNotification_Release(This) \ (This)->lpVtbl -> Release(This) #define IRTCDispatchEventNotification_GetTypeInfoCount(This,pctinfo) \ (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) #define IRTCDispatchEventNotification_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) #define IRTCDispatchEventNotification_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) #define IRTCDispatchEventNotification_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IRTCDispatchEventNotification_DISPINTERFACE_DEFINED__ */ EXTERN_C const CLSID CLSID_RTCClient; #ifdef __cplusplus class DECLSPEC_UUID("7a42ea29-a2b7-40c4-b091-f6f024aa89be") RTCClient; #endif #endif /* __RTCCORELib_LIBRARY_DEFINED__ */ /* Additional Prototypes for ALL interfaces */ unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); unsigned long __RPC_USER VARIANT_UserSize( unsigned long *, unsigned long , VARIANT * ); unsigned char * __RPC_USER VARIANT_UserMarshal( unsigned long *, unsigned char *, VARIANT * ); unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT * ); void __RPC_USER VARIANT_UserFree( unsigned long *, VARIANT * ); /* end of Additional Prototypes */ #ifdef __cplusplus } #endif #endif
[ "yippeesoft@5dda88da-d10c-0410-ac74-cc18da35fedd" ]
[ [ [ 1, 16971 ] ] ]