Interfaces : Эльфостроение : Форум |
Страница 2 из 2: « 1 [2] |
den_po: |
01.11.10, 22:39 |
2 topics have been merged ("class Canvas" & "new method to get the screen buffer") |
MO_oC: |
02.11.10, 07:41 |
den_po, I test CoCreateInstance on K750, found that if use the IID of other platform, the phone will reboot. Can you find the reason. [ Редактировано MO_oC в 2.11.10 11:48 ] |
blacklizard: |
02.11.10, 20:58 |
GraphicManager Type_def.h: UUID: Class IUIStatusrow: class IUIGraphics: class IUIGraphicManager: Ex:: |
Joker XT: |
16.01.12, 10:48 |
Ф-ии на Си для использования клипборда Код: class IUIText: public IUnknown { public: virtual int unk_0(); //0x10 virtual int get_text(wchar_t *ws, int max_len, int *len); virtual int unk_1(); virtual int get_len(int *len); }; class IUITextFactory: public IUnknown { public: virtual int unk_0(); virtual int CreateFromAscii(); virtual int CreateFromRaw(wchar_t *ws, int len, IUIText **ppIUITextPointer); virtual int CreateFromTextId(); virtual int unk_1(); virtual int unk_2(); virtual int unk_3(); virtual int ConcatenateIUITexts(); }; class IUIClipboard: public IUnknown { public: virtual int GetBuffer(void **buffer); virtual int SetIUIText(IUIText *pIUIText); virtual int GetIUIText(IUIText **ppIUITextPointer); virtual int Clear(); virtual int isEmpty(); }; class IUIClipboardManager: public IUnknown { public: virtual int GetBuffer(void **buffer); virtual int GetIUIClipboard(IUIClipboard **ppIUIClipboardPointer); }; UUID CID_CUIClipboardManager = { 0x4E, 0xFE, 0x6C, 0x65, 0x6D, 0xE8, 0x4B, 0xC2, 0xB5, 0xC, 0x12, 0x3B, 0x65, 0xD1, 0x5F, 0x72 }; UUID IID_IUIClipboardManager = { 0x9B, 0x5D, 0xF1, 0xA9, 0xE3, 0x6A, 0x44, 0x7E, 0x9A, 0xB2, 0x47, 0x21, 0x4E, 0xA, 0x35, 0x3 }; UUID CID_CUITextFactory = { 0xEA, 0xED, 0x4, 0x64, 0x0, 0x73, 0x41, 0x81, 0xBD, 0xE3, 0xFB, 0x31, 0x9F, 0xDB, 0xDF, 0xBC }; UUID IID_IUITextFactory = { 0xFB, 0xE8, 0xC1, 0xCC, 0x97, 0x35, 0x49, 0xD9, 0x95, 0x8E, 0x3E, 0x9D, 0x99, 0x82, 0x27, 0xB3 }; IUIClipboard *GetClipboardClass(void) { IUIClipboard *pIUIClipboard = NULL; IShell *pIShell = NULL; OSE_GetShell(PPINTERFACE(&pIShell)); if(pIShell) { IUIClipboardManager *pIUIClipboardManager = NULL; pIShell->CreateInstance(&CID_CUIClipboardManager, &IID_IUIClipboardManager, PPINTERFACE(&pIUIClipboardManager)); if(pIUIClipboardManager) { pIUIClipboardManager->GetIUIClipboard(&pIUIClipboard); pIUIClipboardManager->Release(); } pIShell->Release(); } return(pIUIClipboard); } bool Clipboard_ExistsText(void) { bool result = true; IUIClipboard *pIUIClipboard = GetClipboardClass(); if(pIUIClipboard) { result = pIUIClipboard->isEmpty(); pIUIClipboard->Release(); } return(!result); } void Clipboard_SetText(wchar_t *ws, int len) { IUITextFactory *pIUITextFactory = NULL; CoCreateInstance(&CID_CUITextFactory, &IID_IUITextFactory, PPINTERFACE(&pIUITextFactory)); if(pIUITextFactory) { IUIText *pIUIText = NULL; pIUITextFactory->CreateFromRaw(ws, len, &pIUIText); if(pIUIText) { IUIClipboard *pIUIClipboard = GetClipboardClass(); if(pIUIClipboard) { pIUIClipboard->SetIUIText(pIUIText); pIUIClipboard->Release(); return; } pIUIText->Release(); } pIUITextFactory->Release(); } } wchar_t *Clipboard_GetText(void) { wchar_t *ret_ws = NULL; IUIText *pIUIText = NULL; IUIClipboard *pIUIClipboard = GetClipboardClass(); if(!pIUIClipboard) return(ret_ws); pIUIClipboard->GetIUIText(&pIUIText); pIUIClipboard->Release(); if(pIUIText) { int len = 0; if(pIUIText->get_len(&len) >= 0) { int new_len = 0; ret_ws = new wchar_t[len+1]; pIUIText->get_text(ret_ws, len+1, &new_len); if(!new_len) { mfree(ret_ws); ret_ws = NULL; } pIUIText->Release(); } } return(ret_ws); } |
D3mon: |
20.04.12, 18:40 |
Интерфейс для получения/изменения настроек будильника. Оригинальных названий классов/методов/типов не знаю.. Interface: |
den_po: |
20.04.12, 20:43 |
D3mon, часть таких вопросов можно решить dev-прошивками. например, этой http://supertrubka.org/mydownloads/showfile.php?lid=765 |
diezil: |
06.05.12, 05:20 |
Tested on C902 AS/K850 Not sure if correct names :( Код: UUID CID_IFlashLightControl = { 0x47, 0x3D, 0x77, 0x2B, 0x56, 0x7B, 0x43, 0x30, 0x80, 0xB2, 0x38, 0x91, 0xE7, 0x09, 0xFB, 0x9B }; UUID IID_IFlashLightControl = { 0xDF, 0xF6, 0x03, 0xFA, 0xA0, 0xD0, 0x49, 0xC6, 0x92, 0xD5, 0x37, 0x23, 0x8E, 0x52, 0x66, 0x99 }; UUID CID_IFlashLightDeviceManager = { 0x38, 0x5F, 0xF8, 0x9C, 0x7D, 0x99, 0x4A, 0x3E, 0x89, 0x1F, 0x7D, 0x63, 0x89, 0x94, 0x33, 0x2B }; UUID IID_IFlashLightDeviceManager = { 0x43, 0xAC, 0x3E, 0x06, 0x88, 0xDA, 0x46, 0x16, 0xBF, 0x04, 0x41, 0x73, 0x0A, 0xE7, 0xA1, 0x97 }; class IFlashLightControl: public IUnknown // C902 AS 11DD127C { public: virtual int SetState( int state ); // 0 = off, 1 = on ( 0x63, 0x4, 0x38 ) virtual int unk_14( int unk ); }; class IFlashLightDeviceManager: public IUnknown { public: virtual int CreateFlashLightControl( IFlashLightControl** pFlashLightControl ); }; class IShell: public IUnknown // C902 AS 11C9DB44 { public: // C902 virtual void* unk_10(); // 0x10 virtual void* unk_14(); // 0x14 virtual void* unk_18(); // 0x18 virtual void* unk_1C(); // 0x1C virtual int CreateInstance( UUID* CID, UUID* IID, void* pInterface ); // 0x20 virtual void* unk_24(); // 0x24 virtual void* unk_28(); // 0x28 virtual void* unk_2C(); // 0x2C virtual void* unk_30(); // 0x30 virtual void* unk_34(); // 0x34 virtual void* unk_38(); // 0x38 }; Код: void LED_SetState( int state ) { #ifndef _SETLAMPLEVEL_ IShell* pIShell = NULL; IFlashLightDeviceManager* pIFlashLightDeviceManager = NULL; IFlashLightControl* pFlashLightControl = NULL; OSE_GetShell( PPINTERFACE( &pIShell ) ); if( pIShell ) { pIShell->CreateInstance(&CID_IFlashLightDeviceManager, &IID_IFlashLightDeviceManager, PPINTERFACE(&pIFlashLightDeviceManager)); pIShell->Release(); if ( pIFlashLightDeviceManager ) { pIFlashLightDeviceManager->CreateFlashLightControl( &pFlashLightControl ); pIFlashLightDeviceManager->Release(); if ( pFlashLightControl ) { pFlashLightControl->SetState( state ); pFlashLightControl->Release(); } } } #else SetLampLevel( state ); #endif } [ Редактировано diezil в 6.5.12 02:41 ] |
E1kolyan: |
06.05.12, 10:13 |
Вот вам еще... Код: typedef unsigned long FUint32; typedef unsigned short FUint16; typedef unsigned char FUint8; typedef bool TBool; typedef unsigned short TChar; typedef FUint32 TClientData; typedef FUint32 TAudioControl_Handle; typedef FUint16 TMsgBase; typedef FUint8 TAudioControl_Volume; typedef FUint8 TVibratorDeviceDutyCycle; typedef FUint32 TAudioControl_TimeInMilliSeconds; const unsigned short AUDIOCONTROL_DEBUGMENU_STRING_MAXLENGTH = 79; typedef TChar TAudioControl_DebugMenuString[AUDIOCONTROL_DEBUGMENU_STRING_MAXLENGTH+1]; typedef enum { AUDIOCONTROL_VOLUMETYPE_CURRENT, /**< The current volumetype */ AUDIOCONTROL_VOLUMETYPE_CALLVOLUME, /**< The call volume */ AUDIOCONTROL_VOLUMETYPE_RINGVOLUME, /**< The ring signal volume */ AUDIOCONTROL_VOLUMETYPE_MEDIAVOLUME, /**< The media volume */ AUDIOCONTROL_VOLUMETYPE_INPUTVOLUME /**< FOR AUDIOCONTROL INTERNAL USE ONLY */ } TAudioControl_VolumeType; typedef enum { AUDIOCONTROL_RINGVOLUME_0, AUDIOCONTROL_RINGVOLUME_1, AUDIOCONTROL_RINGVOLUME_2, AUDIOCONTROL_RINGVOLUME_3, AUDIOCONTROL_RINGVOLUME_4, AUDIOCONTROL_RINGVOLUME_5, AUDIOCONTROL_RINGVOLUME_6, AUDIOCONTROL_RINGVOLUME_7, AUDIOCONTROL_RINGVOLUME_8, AUDIOCONTROL_CALLVOLUME_0, AUDIOCONTROL_CALLVOLUME_1, AUDIOCONTROL_CALLVOLUME_2, AUDIOCONTROL_CALLVOLUME_3, AUDIOCONTROL_CALLVOLUME_4, AUDIOCONTROL_CALLVOLUME_5, AUDIOCONTROL_CALLVOLUME_6, AUDIOCONTROL_CALLVOLUME_7, AUDIOCONTROL_CALLVOLUME_8, AUDIOCONTROL_MEDIAVOLUME_0, AUDIOCONTROL_MEDIAVOLUME_1, AUDIOCONTROL_MEDIAVOLUME_2, AUDIOCONTROL_MEDIAVOLUME_3, AUDIOCONTROL_MEDIAVOLUME_4, AUDIOCONTROL_MEDIAVOLUME_5, AUDIOCONTROL_MEDIAVOLUME_6, AUDIOCONTROL_MEDIAVOLUME_7, AUDIOCONTROL_MEDIAVOLUME_8, AUDIOCONTROL_MEDIAVOLUME_9, AUDIOCONTROL_MEDIAVOLUME_10, AUDIOCONTROL_MEDIAVOLUME_11, AUDIOCONTROL_MEDIAVOLUME_12, AUDIOCONTROL_MEDIAVOLUME_13, AUDIOCONTROL_MEDIAVOLUME_14, AUDIOCONTROL_MEDIAVOLUME_15 } TAudioControl_VolumeTemp; typedef enum { AUDIOCONTROL_VIBRATORSTATE_OFF, /**< The vibrator is always off */ AUDIOCONTROL_VIBRATORSTATE_ON, /**< The vibrator is used when appropriate */ AUDIOCONTROL_VIBRATORSTATE_ON_IF_SILENT /**< The vibrator is used when appropriate, if silentmode is on */ } TAudioControl_VibratorState; typedef enum { AUDIOCONTROL_TTYMODE_OFF, /**< TTY mode set to off*/ AUDIOCONTROL_TTYMODE_STANDARD, /**< TTY mode set to standard*/ AUDIOCONTROL_TTYMODE_HCO, /**< TTY mode set to hearing carry over*/ AUDIOCONTROL_TTYMODE_VCO /**< TTY mode set to voice carry over*/ } TAudioControl_TTYMode; typedef enum { AUDIOCONTROL_HACMODE_OFF, AUDIOCONTROL_HACMODE_MIC, AUDIOCONTROL_HACMODE_TCOIL } TAudioControl_HACMode; typedef enum { AUDIOCONTROL_CALLTYPE_VOICE, /**< VoiceCall */ AUDIOCONTROL_CALLTYPE_VIDEO /**< VideoCall */ } TAudioControl_CallType; typedef enum { AUDIOCONTROL_CALLSTATE_IDLE, /**< Should be used when no call is active */ AUDIOCONTROL_CALLSTATE_ANSWERING,/**< Should be used before ICall_Answer to indicate that a call is about to be answered*/ AUDIOCONTROL_CALLSTATE_ALERTING, /**< Obsolete, replaced with AUDIOCONTROL_CALLSTATE_ANSWERING*/ AUDIOCONTROL_CALLSTATE_SETUP, /**< Should be used before initiating an outgoing call*/ AUDIOCONTROL_CALLSTATE_ONGOING, /**< Should be used when a call is active*/ AUDIOCONTROL_CALLSTATE_HOLDING /**< Should be used when all calls are on hold*/ } TAudioControl_CallState; typedef enum { AUDIOCONTROL_SPEAKERTYPE_EARPIECE, /**< The earpiece speaker */ AUDIOCONTROL_SPEAKERTYPE_SPEAKER, /**< The builtin speaker */ AUDIOCONTROL_SPEAKERTYPE_AUTO /**< Automatically choose speaker */ } TAudioControl_SpeakerType; class IUnknown { public: virtual void* pguid(); virtual void* QueryInterface(); virtual void* AddRef(); virtual void* Release(); }; class IAudioControl: public IUnknown { public: virtual int unk_0x10(); virtual int unk_0x14(); virtual int unk_0x18(); virtual int unk_0x1C(); virtual int unk_0x20(); virtual int unk_0x24(); virtual int unk_0x28(); virtual int unk_0x2C(); virtual int unk_0x30(); virtual int unk_0x34(); virtual int unk_0x38(); virtual int unk_0x3C(); virtual int unk_0x40(); virtual int unk_0x44(); virtual int unk_0x48(); virtual int unk_0x4C(); virtual int unk_0x50(); virtual int unk_0x54(); virtual int unk_0x58(); virtual int unk_0x5C(); virtual int unk_0x60(); virtual int unk_0x64(); virtual int unk_0x68(); virtual int unk_0x6C(); virtual int unk_0x70(); virtual int unk_0x74(); virtual int unk_0x78(); virtual int unk_0x7C(); virtual int unk_0x80(); virtual int unk_0x84(); virtual int unk_0x88(); virtual int unk_0x8C(); virtual int unk_0x90(); virtual int IsAudioPlaying(TBool* pAudioPlaying, TAudioControl_VolumeType* pVolumeType); virtual int IsVibratorRunning(TBool* pVibratorRunning); virtual int unk_0x9C(); virtual int unk_0xA0(); virtual int unk_0xA4(); virtual int unk_0xA8(); virtual int unk_0xAC(); virtual int unk_0xB0(); virtual int unk_0xB4(); virtual int unk_0xB8(); virtual int Volume_Set(TAudioControl_VolumeType volumeType, TAudioControl_Volume pVolume); virtual int Volume_Get(TAudioControl_VolumeType volumeType, TAudioControl_Volume* pVolume); virtual int unk_0xC4(); virtual int unk_0xC8(); virtual int unk_0xCC(); virtual int unk_0xD0(); virtual int IncreaseVolume(TAudioControl_VolumeType volumeType, TAudioControl_Volume* pNewVolume); virtual int DecreaseVolume(TAudioControl_VolumeType volumeType, TAudioControl_Volume* pNewVolume); virtual int unk_0xDC(); virtual int unk_0xE0(); virtual int unk_0xE4(); virtual int unk_0xE8(); virtual int unk_0xEC(); virtual int unk_0xF0(); virtual int unk_0xF4(); virtual int unk_0xF8(); virtual int unk_0xFC(); virtual int unk_0x100(); virtual int unk_0x104(); virtual int unk_0x108(); virtual int unk_0x10C(); virtual int unk_0x110(); virtual int unk_0x114(); virtual int unk_0x118(); virtual int unk_0x11C(); virtual int unk_0x120(); virtual int unk_0x124(); virtual int unk_0x128(); virtual int unk_0x12C(); virtual int unk_0x130(); virtual int unk_0x134(); virtual int unk_0x138(); virtual int unk_0x13C(); virtual int unk_0x140(); virtual int unk_0x144(); virtual int unk_0x148(); virtual int unk_0x14C(); virtual int unk_0x150(); virtual int unk_0x154(); virtual int DebugMenu_GetString(TAudioControl_DebugMenuString* pBuffer); virtual int unk_0x15C(); virtual int unk_0x160(); virtual int unk_0x164(); virtual int unk_0x168(); virtual int unk_0x16C(); virtual int SilentMode_Set(TBool silentModeEnabled); virtual int SilentMode_Get(TBool* silentModeEnabled); virtual int TTYMode_Set(TAudioControl_TTYMode TTYMode); virtual int TTYMode_Get(TAudioControl_TTYMode* pTTYMode); virtual int HACMode_Set(TAudioControl_HACMode HACMode); virtual int HACMode_Get(TAudioControl_HACMode* pHACMode); virtual int VibratorState_Set(TAudioControl_VibratorState vibratorState); virtual int VibratorState_Get(TAudioControl_VibratorState* pVibratorState); virtual int Vibrator_Start(TAudioControl_TimeInMilliSeconds period, TAudioControl_TimeInMilliSeconds dutyCycle, TAudioControl_TimeInMilliSeconds duration); virtual int Vibrator_Stop(void); virtual int Callstate_Set(TAudioControl_CallType callType, TAudioControl_CallState callState); virtual int unk_0x19C(); virtual int Camera_FollowSilentMode_Set(TBool followSilentMode); virtual int Camera_FollowSilentMode_Get(TBool* pFollowSilentMode); virtual int unk_0x1A8(); virtual int unk_0x1AC(); virtual int unk_0x1B0(); virtual int unk_0x1B4(); virtual int unk_0x1B8(); virtual int unk_0x1BC(); }; class IAudioDevice: public IUnknown { public: virtual int AudioControl(IAudioControl** ppIAudioControl); }; Код: void SetVolume() { UUID CID_CAudioDevice = {0xE2, 0, 0x10, 0x71, 0x81, 0xD3, 0x43, 0xC3, 0xAB, 0xEA, 0xD4, 0xF4, 0xEB, 0x67, 0xC8, 0x93}; UUID IID_IAudioDevice = {0x78, 0xE, 0x15, 0xD9, 0x40, 0xF5, 0x4F, 0x99, 0xAF, 0x93, 0x38, 0x3B, 0x38, 0x7F, 0xA7, 0xED}; IAudioDevice* pIAudioDevice = NULL; IAudioControl* pIAudioControl = NULL; CoCreateInstance(&CID_CAudioDevice, &IID_IAudioDevice, PPINTERFACE(&pIAudioDevice)); { if(pIAudioDevice) { pIAudioDevice->AudioControl(&pIAudioControl); if(pIAudioControl) { pIAudioControl->Volume_Set(AUDIOCONTROL_VOLUMETYPE_MEDIAVOLUME, AUDIOCONTROL_MEDIAVOLUME_15); pIAudioControl->Release(); } pIAudioDevice->Release(); } } } |
diezil: |
22.05.12, 20:33 |
Код: UUID CID_IIlluminationControl = { 0xBF, 0x60, 0xD1, 0x6E, 0xC0, 0xEF, 0x41, 0xFC, 0xA7, 0x37, 0x81, 0x64, 0x8F, 0x45, 0x23, 0xF6 }; UUID IID_IIlluminationControl = { 0x16, 0xE2, 0x36, 0xF4, 0x00, 0x15, 0x4E, 0x02, 0x97, 0xC6, 0x3A, 0x29, 0x58, 0xBE, 0x9B, 0xCE }; class IIlluminationControl: public IUnknown // C902 AS 0x11DD12C8 { public: virtual int Illumination_LedID_SetLevel( int LedID, int level ); virtual int Illumination_LedID_Off( int LedID ); virtual int Illumination_LedID_SetLevel_Gradually( int LedID, int fade, int level ); }; updated virtual int unk_18( ... ); //Illumination_LedID_Fade( ... ); ??? virtual int Illumination_LedID_SetLevel_Gradually( int LedID, int fade, int level ); [ Редактировано diezil в 22.5.12 19:51 ] |
Страница 2 из 2: « 1 [2] |
URL этой темы: https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=5122&start=10 © 2005-2018 supertrubka.org |