Модуль "P2KApi" (часть 46) - TP2KAPI.AllSilent
последняя версия: 3.0.9 build 961 beta
от 07 декабря 2007 г.
от 07 декабря 2007 г.
procedure TP2KAPI.AllSilent; var xBuffer, xBufferAlarm: pbytearray; fHandle: integer; frmProgress: TfrmProgress; begin if not TelStatus then exit; //Screen.Cursor:= crHourGlass; frmProgress:= TfrmProgress.Create(Self); try
try File_Delete('MyToneDB.db'); finally end;
try File_Delete('TempToneDB.db'); finally end;
try File_Delete('/a/mobile/audio/MyToneDB.db'); finally end;
try File_Delete('/a/mobile/audio/TempToneDB.db'); finally end;
try File_Delete('/b/mobile/audio/MyToneDB.db'); finally end;
try File_Delete('/b/mobile/audio/TempToneDB.db'); finally end;
try File_Delete('/c/mobile/audio/MyToneDB.db'); finally end;
try File_Delete('/c/mobile/audio/TempToneDB.db'); finally end;
xBuffer:= AllocMem(1);
xBufferAlarm:= allocMem(300);
try
if DownLoadFile('/a/ALARMCLOCK', 300, 4, GetTempPathEx+'ALARMCLOCK', frmProgress)
then begin
fHandle:= FileOpen(GetTempPathEx+'ALARMCLOCK', fmOpenRead);
FileRead(fHandle, xBufferAlarm^, 300);
FileClose(fHandle);
//process for ALARMCLOCK
xBufferAlarm[55]:= 0;
xBufferAlarm[55+60]:= 0;
xBufferAlarm[55+60+60]:= 0;
xBufferAlarm[55+60+60+60]:= 0;
xBufferAlarm[55+60+60+60+60]:= 0;
fHandle:= FileOpen(GetTempPathEx+'ALARMCLOCK', fmOpenReadWrite);
FileWrite(fHandle, xBufferAlarm^, 300);
FileClose(fHandle);
//write chnges
UploadFile(GetTempPathEx+'ALARMCLOCK', '/a/ALARMCLOCK', frmProgress);
ChangeAttr('/a/ALARMCLOCK', 4);
end;
finally
FreeMem(xBufferAlarm);
end;
(*
xBufferAlarm:= allocMem(300);
try
if DownLoadFile('/c/ALARMCLOCK', 300, 4, GetTempPathEx+'ALARMCLOCK', frmProgress)
then begin
fHandle:= FileOpen(GetTempPathEx+'ALARMCLOCK', fmOpenRead);
FileRead(fHandle, xBufferAlarm^, 300);
FileClose(fHandle);
//process for ALARMCLOCK
xBufferAlarm[55]:= 0;
xBufferAlarm[55+60]:= 0;
xBufferAlarm[55+60+60]:= 0;
xBufferAlarm[55+60+60+60]:= 0;
xBufferAlarm[55+60+60+60+60]:= 0;
fHandle:= FileOpen(GetTempPathEx+'ALARMCLOCK', fmOpenReadWrite);
FileWrite(fHandle, xBufferAlarm^, 300);
FileClose(fHandle);
//write chnges
UploadFile(GetTempPathEx+'ALARMCLOCK', '/c/ALARMCLOCK', frmProgress);
ChangeAttr('/c/ALARMCLOCK', 4);
end;
finally
FreeMem(xBufferAlarm);
end;
*)
xBuffer[0]:= 0;
try
WriteSeem('004c', '0001', '00', 1, xBuffer); //01 00-FF Loud просто входящий Silent and etc.
WriteSeem('004c', '0001', '01', 1, xBuffer); //01 00-FF Loud Line1 Silent and etc.
WriteSeem('004c', '0001', '02', 1, xBuffer); //02 00-FF Loud Line2 Silent and etc.
WriteSeem('004c', '0001', '03', 1, xBuffer); //03 00-FF Loud SMS messages Silent and etc.
WriteSeem('004c', '0001', '04', 1, xBuffer); //04 00-FF Loud Voice mail Silent and etc.
WriteSeem('004c', '0001', '05', 1, xBuffer); //05 00-FF Loud Inf. Servises Silent and etc.
WriteSeem('004c', '0001', '06', 1, xBuffer); //06 00-FF Loud Answermachine Silent and etc.
WriteSeem('004c', '0001', '07', 1, xBuffer); //07 00-FF Loud Alarm Silent and etc.
WriteSeem('004c', '0001', '08', 1, xBuffer); //08 00-FF Loud Передача данных Silent and etc.
WriteSeem('004c', '0001', '09', 1, xBuffer); //09 00-FF Loud Fax call Silent and etc.
WriteSeem('004c', '0001', '48', 1, xBuffer); //048 00-FF Loud AIM messages Silent and etc.
WriteSeem('004c', '0001', '4e', 1, xBuffer); //04E 00-FF Loud IM messages Silent and etc.
WriteSeem('004c', '0001', '0b', 1, xBuffer); //0B 00-FF low просто входящий Silent and etc.
WriteSeem('004c', '0001', '0c', 1, xBuffer); //0C 00-FF low Line1 Silent and etc.
WriteSeem('004c', '0001', '0d', 1, xBuffer); //0D 00-FF low Line2 Silent and etc.
WriteSeem('004c', '0001', '0e', 1, xBuffer); //0E 00-FF low SMS messages Silent and etc.
WriteSeem('004c', '0001', '0f', 1, xBuffer); //0F 00-FF low Voice mail Silent and etc.
WriteSeem('004c', '0001', '10', 1, xBuffer); //10 00-FF low Inf. Servises Silent and etc.
WriteSeem('004c', '0001', '11', 1, xBuffer); //11 00-FF low Answermachine Silent and etc.
WriteSeem('004c', '0001', '12', 1, xBuffer); //12 00-FF low Alarm Silent and etc.
WriteSeem('004c', '0001', '13', 1, xBuffer); //13 00-FF low Передача данных Silent and etc.
WriteSeem('004c', '0001', '14', 1, xBuffer); //14 00-FF low Fax call Silent and etc.
WriteSeem('004c', '0001', '49', 1, xBuffer); //049 00-FF Low AIM messages Silent and etc.
WriteSeem('004c', '0001', '4f', 1, xBuffer); //04F 00-FF Low IM messages Silent and etc.
WriteSeem('004c', '0001', '21', 1, xBuffer); //21 00-FF просто входящий vibe ^ loud Silent and etc.
WriteSeem('004c', '0001', '22', 1, xBuffer); //22 00-FF vibe ^ loud Line1 Silent and etc.
WriteSeem('004c', '0001', '23', 1, xBuffer); //23 00-FF vibe ^ loud Line2 Silent and etc.
WriteSeem('004c', '0001', '24', 1, xBuffer); //24 00-FF vibe ^ loud SMS messages Silent and etc.
WriteSeem('004c', '0001', '25', 1, xBuffer); //25 00-FF vibe ^ loud Voice mail Silent and etc.
WriteSeem('004c', '0001', '26', 1, xBuffer); //26 00-FF vibe ^ loud Inf. Servises Silent and etc.
WriteSeem('004c', '0001', '27', 1, xBuffer); //27 00-FF vibe ^ loud Answermacjine Silent and etc.
WriteSeem('004c', '0001', '28', 1, xBuffer); //28 00-FF vibe ^ loud Alarm Silent and etc.
WriteSeem('004c', '0001', '29', 1, xBuffer); //29 00-FF vibe ^ loud Передача данных Silent and etc.
WriteSeem('004c', '0001', '2a', 1, xBuffer); //2A 00-FF vibe ^ loud Fax call Silent and etc.
WriteSeem('004c', '0001', '4A', 1, xBuffer); //4A 1/2/3/4/5 vibe ^ loud AIM messages Silent and etc.
WriteSeem('004c', '0001', '51', 1, xBuffer); //51 1/2/3/4/5 vibe ^ loud IM messages Silent and etc.
WriteSeem('004c', '0001', '58', 1, xBuffer); //21 00-FF просто входящий vibe ^ loud Silent and etc.
WriteSeem('004c', '0001', '59', 1, xBuffer); //22 00-FF vibe ^ loud Line1 Silent and etc.
WriteSeem('004c', '0001', '5a', 1, xBuffer); //23 00-FF vibe ^ loud Line2 Silent and etc.
WriteSeem('004c', '0001', '5b', 1, xBuffer); //24 00-FF vibe ^ loud SMS messages Silent and etc.
WriteSeem('004c', '0001', '5c', 1, xBuffer); //25 00-FF vibe ^ loud Voice mail Silent and etc.
WriteSeem('004c', '0001', '5d', 1, xBuffer); //26 00-FF vibe ^ loud Inf. Servises Silent and etc.
WriteSeem('004c', '0001', '5e', 1, xBuffer); //27 00-FF vibe ^ loud Answermacjine Silent and etc.
WriteSeem('004c', '0001', '5f', 1, xBuffer); //28 00-FF vibe ^ loud Alarm Silent and etc.
WriteSeem('004c', '0001', '60', 1, xBuffer); //29 00-FF vibe ^ loud Передача данных Silent and etc.
WriteSeem('004c', '0001', '61', 1, xBuffer); //2A 00-FF vibe ^ loud Fax call Silent and etc.
WriteSeem('004c', '0001', '63', 1, xBuffer); //4A 1/2/3/4/5 vibe ^ loud AIM messages Silent and etc.
WriteSeem('004c', '0001', '64', 1, xBuffer); //51 1/2/3/4/5 vibe ^ loud IM messages Silent and etc.
finally
FreeMem(xBuffer);
end;
finally
frmProgress.Free;
//Screen.Cursor:= crDefault;
end;
end;
Еще записи по теме
- Модуль "P2KFileManager" (часть 4) - GetDrives
- Модуль "P2KApi" (часть 49) - TP2KAPI.USB_WriteDataEx
- Главный модуль программы (часть 24) - MenuItem1Click
- Модуль "Справочник" (часть 11) - FillMemberEx
- Модуль "Мое меню" (часть 8) - GetWebShortcuts
- Модуль "P2KApi" (часть 17) - FillTCIFSACStructEx
- Модуль "Пункты меню" (часть 28) - EditNodeItemOld
