├── .github └── workflows │ └── main.yml ├── .gitignore ├── AUTHORS ├── CMakeLists.txt ├── COPYING ├── Doxyfile ├── NEWS ├── README.md ├── THANKS ├── TODO ├── cmake ├── CheckCXX11Regex.cmake ├── FindCcrtp.cmake ├── FindCommoncpp.cmake ├── FindG729.cmake ├── FindGsm.cmake ├── FindIlbc.cmake ├── FindLibMagic.cmake ├── FindLibSndfile.cmake ├── FindReadline.cmake ├── FindSpeex.cmake ├── FindUcommon.cmake └── FindZrtpcpp.cmake ├── data ├── providers.csv ├── ringback.wav ├── ringtone.wav ├── twinkle.1 └── twinkle.svg ├── sip.protocol ├── src ├── CMakeLists.txt ├── abstract_dialog.cpp ├── abstract_dialog.h ├── address_book.cpp ├── address_book.h ├── audio │ ├── CMakeLists.txt │ ├── README_G711 │ ├── audio_codecs.cpp │ ├── audio_codecs.h │ ├── audio_decoder.cpp │ ├── audio_decoder.h │ ├── audio_device.cpp │ ├── audio_device.h │ ├── audio_encoder.cpp │ ├── audio_encoder.h │ ├── audio_rx.cpp │ ├── audio_rx.h │ ├── audio_session.cpp │ ├── audio_session.h │ ├── audio_tx.cpp │ ├── audio_tx.h │ ├── dtmf_player.cpp │ ├── dtmf_player.h │ ├── freq_gen.cpp │ ├── freq_gen.h │ ├── g711.cpp │ ├── g711.h │ ├── g721.cpp │ ├── g722.h │ ├── g722_decode.c │ ├── g722_encode.c │ ├── g722_local.h │ ├── g723_16.cpp │ ├── g723_24.cpp │ ├── g723_40.cpp │ ├── g72x.cpp │ ├── g72x.h │ ├── gsm │ │ ├── COPYRIGHT │ │ ├── ChangeLog │ │ ├── INSTALL │ │ ├── MACHINES │ │ ├── README │ │ ├── inc │ │ │ ├── config.h │ │ │ ├── gsm.h │ │ │ ├── private.h │ │ │ ├── proto.h │ │ │ └── unproto.h │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── add.cpp │ │ │ ├── code.cpp │ │ │ ├── debug.cpp │ │ │ ├── decode.cpp │ │ │ ├── gsm_create.cpp │ │ │ ├── gsm_decode.cpp │ │ │ ├── gsm_destroy.cpp │ │ │ ├── gsm_encode.cpp │ │ │ ├── gsm_explode.cpp │ │ │ ├── gsm_implode.cpp │ │ │ ├── gsm_option.cpp │ │ │ ├── gsm_print.cpp │ │ │ ├── long_term.cpp │ │ │ ├── lpc.cpp │ │ │ ├── preprocess.cpp │ │ │ ├── rpe.cpp │ │ │ ├── short_term.cpp │ │ │ └── table.cpp │ ├── media_buffer.cpp │ ├── media_buffer.h │ ├── rtp_telephone_event.cpp │ ├── rtp_telephone_event.h │ ├── tone_gen.cpp │ ├── tone_gen.h │ ├── twinkle_rtp_session.cpp │ ├── twinkle_rtp_session.h │ ├── twinkle_zrtp_ui.cpp │ └── twinkle_zrtp_ui.h ├── audits │ ├── CMakeLists.txt │ ├── memman.cpp │ └── memman.h ├── auth.cpp ├── auth.h ├── call_history.cpp ├── call_history.h ├── call_script.cpp ├── call_script.h ├── client_request.cpp ├── client_request.h ├── cmd_socket.cpp ├── cmd_socket.h ├── dialog.cpp ├── dialog.h ├── diamondcard.cpp ├── diamondcard.h ├── epa.cpp ├── epa.h ├── events.cpp ├── events.h ├── exceptions.h ├── gui │ ├── CMakeLists.txt │ ├── address_finder.cpp │ ├── address_finder.h │ ├── addresscardform.cpp │ ├── addresscardform.h │ ├── addresscardform.ui │ ├── addresstablemodel.cpp │ ├── addresstablemodel.h │ ├── akonadiaddressbook.cpp │ ├── akonadiaddressbook.h │ ├── authenticationform.cpp │ ├── authenticationform.h │ ├── authenticationform.ui │ ├── buddyform.cpp │ ├── buddyform.h │ ├── buddyform.ui │ ├── buddylistview.cpp │ ├── buddylistview.h │ ├── command_args.h │ ├── core_strings.h │ ├── deregisterform.cpp │ ├── deregisterform.h │ ├── deregisterform.ui │ ├── diamondcardprofileform.cpp │ ├── diamondcardprofileform.h │ ├── diamondcardprofileform.ui │ ├── dtmfform.cpp │ ├── dtmfform.h │ ├── dtmfform.ui │ ├── getaddressform.cpp │ ├── getaddressform.h │ ├── getaddressform.ui │ ├── getprofilenameform.cpp │ ├── getprofilenameform.h │ ├── getprofilenameform.ui │ ├── gui.cpp │ ├── gui.h │ ├── historyform.cpp │ ├── historyform.h │ ├── historyform.ui │ ├── icons.qrc │ ├── idlesession_inhibitor.cpp │ ├── idlesession_inhibitor.h │ ├── idlesession_manager.cpp │ ├── idlesession_manager.h │ ├── images │ │ ├── 1downarrow.png │ │ ├── 1leftarrow-yellow.png │ │ ├── 1leftarrow.png │ │ ├── 1rightarrow.png │ │ ├── 1uparrow.png │ │ ├── answer-disabled.png │ │ ├── answer.png │ │ ├── attach.png │ │ ├── auto_answer-disabled.png │ │ ├── auto_answer.png │ │ ├── buddy.png │ │ ├── bye-disabled.png │ │ ├── bye.png │ │ ├── cancel-disabled.png │ │ ├── cancel.png │ │ ├── cf-disabled.png │ │ ├── cf.png │ │ ├── clock.png │ │ ├── conf-disabled.png │ │ ├── conf.png │ │ ├── conference-disabled.png │ │ ├── conference.png │ │ ├── consult-xfer.png │ │ ├── contexthelp.png │ │ ├── dtmf-0.png │ │ ├── dtmf-1.png │ │ ├── dtmf-2.png │ │ ├── dtmf-3.png │ │ ├── dtmf-4.png │ │ ├── dtmf-5.png │ │ ├── dtmf-6.png │ │ ├── dtmf-7.png │ │ ├── dtmf-8.png │ │ ├── dtmf-9.png │ │ ├── dtmf-a.png │ │ ├── dtmf-b.png │ │ ├── dtmf-c.png │ │ ├── dtmf-d.png │ │ ├── dtmf-disabled.png │ │ ├── dtmf-pound.png │ │ ├── dtmf-star.png │ │ ├── dtmf.png │ │ ├── edit.png │ │ ├── edit16.png │ │ ├── editcopy │ │ ├── editcut │ │ ├── editdelete.png │ │ ├── editpaste │ │ ├── encrypted-disabled.png │ │ ├── encrypted.png │ │ ├── encrypted32.png │ │ ├── encrypted_verified.png │ │ ├── exit.png │ │ ├── favorites.png │ │ ├── filenew │ │ ├── fileopen-disabled.png │ │ ├── fileopen.png │ │ ├── filesave │ │ ├── gear.png │ │ ├── hold-disabled.png │ │ ├── hold.png │ │ ├── invite-disabled.png │ │ ├── invite.png │ │ ├── kcmpci.png │ │ ├── kcmpci16.png │ │ ├── kmix.png │ │ ├── knotify.png │ │ ├── kontact_contacts-disabled.png │ │ ├── kontact_contacts.png │ │ ├── kontact_contacts32.png │ │ ├── log.png │ │ ├── log_small.png │ │ ├── message.png │ │ ├── message32.png │ │ ├── mime_application.png │ │ ├── mime_audio.png │ │ ├── mime_image.png │ │ ├── mime_text.png │ │ ├── mime_video.png │ │ ├── missed-disabled.png │ │ ├── missed.png │ │ ├── mute-disabled.png │ │ ├── mute.png │ │ ├── mwi_failure16.png │ │ ├── mwi_new16.png │ │ ├── mwi_none.png │ │ ├── mwi_none16.png │ │ ├── mwi_none16_dis.png │ │ ├── network.png │ │ ├── no-indication.png │ │ ├── ok.png │ │ ├── osd_hangup.png │ │ ├── osd_mic_off.png │ │ ├── osd_mic_on.png │ │ ├── package_network.png │ │ ├── package_system.png │ │ ├── password.png │ │ ├── penguin-small.png │ │ ├── penguin.png │ │ ├── penguin_big.png │ │ ├── popup_incoming_answer.png │ │ ├── popup_incoming_reject.png │ │ ├── presence.png │ │ ├── presence_failed.png │ │ ├── presence_offline.png │ │ ├── presence_online.png │ │ ├── presence_rejected.png │ │ ├── presence_unknown.png │ │ ├── print │ │ ├── qt-logo.png │ │ ├── redial-disabled.png │ │ ├── redial.png │ │ ├── redirect-disabled.png │ │ ├── redirect.png │ │ ├── redo │ │ ├── reg-query.png │ │ ├── reg_failed-disabled.png │ │ ├── reg_failed.png │ │ ├── reject-disabled.png │ │ ├── reject.png │ │ ├── save_as.png │ │ ├── searchfind │ │ ├── settings.png │ │ ├── stat_conference.png │ │ ├── stat_established.png │ │ ├── stat_established_nomedia.png │ │ ├── stat_mute.png │ │ ├── stat_outgoing.png │ │ ├── stat_ringing.png │ │ ├── sys_auto_ans.png │ │ ├── sys_auto_ans_dis.png │ │ ├── sys_busy_estab.png │ │ ├── sys_busy_estab_dis.png │ │ ├── sys_busy_trans.png │ │ ├── sys_busy_trans_dis.png │ │ ├── sys_dnd.png │ │ ├── sys_dnd_dis.png │ │ ├── sys_encrypted.png │ │ ├── sys_encrypted_dis.png │ │ ├── sys_encrypted_verified.png │ │ ├── sys_encrypted_verified_dis.png │ │ ├── sys_hold.png │ │ ├── sys_hold_dis.png │ │ ├── sys_idle.png │ │ ├── sys_idle_dis.png │ │ ├── sys_missed.png │ │ ├── sys_missed_dis.png │ │ ├── sys_mute.png │ │ ├── sys_mute_dis.png │ │ ├── sys_mwi.png │ │ ├── sys_mwi_dis.png │ │ ├── sys_redir.png │ │ ├── sys_redir_dis.png │ │ ├── sys_services.png │ │ ├── sys_services_dis.png │ │ ├── telephone-hook.png │ │ ├── transfer-disabled.png │ │ ├── transfer.png │ │ ├── twinkle16-disabled.png │ │ ├── twinkle16.png │ │ ├── twinkle24.png │ │ ├── twinkle32.png │ │ ├── twinkle48.png │ │ ├── undo │ │ ├── yast_PhoneTTOffhook.png │ │ └── yast_babelfish.png │ ├── incoming_call_popup.cpp │ ├── incoming_call_popup.h │ ├── inviteform.cpp │ ├── inviteform.h │ ├── inviteform.ui │ ├── kcontactstablemodel.cpp │ ├── kcontactstablemodel.h │ ├── lang │ │ ├── twinkle_cs.ts │ │ ├── twinkle_de.ts │ │ ├── twinkle_fr.ts │ │ ├── twinkle_nl.ts │ │ ├── twinkle_ru.ts │ │ ├── twinkle_sk.ts │ │ ├── twinkle_sv.ts │ │ └── twinkle_xx.ts │ ├── logviewform.cpp │ ├── logviewform.h │ ├── logviewform.ui │ ├── main.cpp │ ├── messageform.cpp │ ├── messageform.h │ ├── messageform.ui │ ├── messageformview.cpp │ ├── messageformview.h │ ├── mphoneform.cpp │ ├── mphoneform.h │ ├── mphoneform.ui │ ├── numberconversionform.cpp │ ├── numberconversionform.h │ ├── numberconversionform.ui │ ├── osd.cpp │ ├── osd.h │ ├── qml │ │ ├── ImageButton.qml │ │ ├── TextImageButton.qml │ │ ├── incoming_call.qml │ │ ├── osd.qml │ │ └── qml.qrc │ ├── qt_translator.h │ ├── redirectform.cpp │ ├── redirectform.h │ ├── redirectform.ui │ ├── selectnicform.cpp │ ├── selectnicform.h │ ├── selectnicform.ui │ ├── selectprofileform.cpp │ ├── selectprofileform.h │ ├── selectprofileform.ui │ ├── selectuserform.cpp │ ├── selectuserform.h │ ├── selectuserform.ui │ ├── sendfileform.cpp │ ├── sendfileform.h │ ├── sendfileform.ui │ ├── srvredirectform.cpp │ ├── srvredirectform.h │ ├── srvredirectform.ui │ ├── syssettingsform.cpp │ ├── syssettingsform.h │ ├── syssettingsform.ui │ ├── termcapform.cpp │ ├── termcapform.h │ ├── termcapform.ui │ ├── transferform.cpp │ ├── transferform.h │ ├── transferform.ui │ ├── twinkle-uri-handler │ ├── twinkleapplication.cpp │ ├── twinkleapplication.h │ ├── userprofileform.cpp │ ├── userprofileform.h │ ├── userprofileform.ui │ ├── wizardform.cpp │ ├── wizardform.h │ ├── wizardform.ui │ ├── yesnodialog.cpp │ └── yesnodialog.h ├── id_object.cpp ├── id_object.h ├── im │ ├── CMakeLists.txt │ ├── im_iscomposing_body.cpp │ ├── im_iscomposing_body.h │ ├── msg_session.cpp │ └── msg_session.h ├── line.cpp ├── line.h ├── listener.cpp ├── listener.h ├── log.cpp ├── log.h ├── main.cpp ├── mwi │ ├── CMakeLists.txt │ ├── mwi.cpp │ ├── mwi.h │ ├── mwi_dialog.cpp │ ├── mwi_dialog.h │ ├── mwi_subscription.cpp │ ├── mwi_subscription.h │ ├── simple_msg_sum_body.cpp │ └── simple_msg_sum_body.h ├── parser │ ├── CMakeLists.txt │ ├── challenge.cpp │ ├── challenge.h │ ├── coding.cpp │ ├── coding.h │ ├── credentials.cpp │ ├── credentials.h │ ├── definitions.cpp │ ├── definitions.h │ ├── hdr_accept.cpp │ ├── hdr_accept.h │ ├── hdr_accept_encoding.cpp │ ├── hdr_accept_encoding.h │ ├── hdr_accept_language.cpp │ ├── hdr_accept_language.h │ ├── hdr_alert_info.cpp │ ├── hdr_alert_info.h │ ├── hdr_allow.cpp │ ├── hdr_allow.h │ ├── hdr_allow_events.cpp │ ├── hdr_allow_events.h │ ├── hdr_auth_info.cpp │ ├── hdr_auth_info.h │ ├── hdr_authorization.cpp │ ├── hdr_authorization.h │ ├── hdr_call_id.cpp │ ├── hdr_call_id.h │ ├── hdr_call_info.cpp │ ├── hdr_call_info.h │ ├── hdr_contact.cpp │ ├── hdr_contact.h │ ├── hdr_content_disp.cpp │ ├── hdr_content_disp.h │ ├── hdr_content_encoding.cpp │ ├── hdr_content_encoding.h │ ├── hdr_content_language.cpp │ ├── hdr_content_language.h │ ├── hdr_content_length.cpp │ ├── hdr_content_length.h │ ├── hdr_content_type.cpp │ ├── hdr_content_type.h │ ├── hdr_cseq.cpp │ ├── hdr_cseq.h │ ├── hdr_date.cpp │ ├── hdr_date.h │ ├── hdr_error_info.cpp │ ├── hdr_error_info.h │ ├── hdr_event.cpp │ ├── hdr_event.h │ ├── hdr_expires.cpp │ ├── hdr_expires.h │ ├── hdr_from.cpp │ ├── hdr_from.h │ ├── hdr_in_reply_to.cpp │ ├── hdr_in_reply_to.h │ ├── hdr_max_forwards.cpp │ ├── hdr_max_forwards.h │ ├── hdr_mime_version.cpp │ ├── hdr_mime_version.h │ ├── hdr_min_expires.cpp │ ├── hdr_min_expires.h │ ├── hdr_min_se.cpp │ ├── hdr_min_se.h │ ├── hdr_organization.cpp │ ├── hdr_organization.h │ ├── hdr_p_asserted_identity.cpp │ ├── hdr_p_asserted_identity.h │ ├── hdr_p_preferred_identity.cpp │ ├── hdr_p_preferred_identity.h │ ├── hdr_priority.cpp │ ├── hdr_priority.h │ ├── hdr_privacy.cpp │ ├── hdr_privacy.h │ ├── hdr_proxy_authenticate.cpp │ ├── hdr_proxy_authenticate.h │ ├── hdr_proxy_authorization.cpp │ ├── hdr_proxy_authorization.h │ ├── hdr_proxy_require.cpp │ ├── hdr_proxy_require.h │ ├── hdr_rack.cpp │ ├── hdr_rack.h │ ├── hdr_reason.cpp │ ├── hdr_reason.h │ ├── hdr_record_route.cpp │ ├── hdr_record_route.h │ ├── hdr_refer_sub.cpp │ ├── hdr_refer_sub.h │ ├── hdr_refer_to.cpp │ ├── hdr_refer_to.h │ ├── hdr_referred_by.cpp │ ├── hdr_referred_by.h │ ├── hdr_replaces.cpp │ ├── hdr_replaces.h │ ├── hdr_reply_to.cpp │ ├── hdr_reply_to.h │ ├── hdr_request_disposition.cpp │ ├── hdr_request_disposition.h │ ├── hdr_require.cpp │ ├── hdr_require.h │ ├── hdr_retry_after.cpp │ ├── hdr_retry_after.h │ ├── hdr_route.cpp │ ├── hdr_route.h │ ├── hdr_rseq.cpp │ ├── hdr_rseq.h │ ├── hdr_server.cpp │ ├── hdr_server.h │ ├── hdr_service_route.cpp │ ├── hdr_service_route.h │ ├── hdr_session_expires.cpp │ ├── hdr_session_expires.h │ ├── hdr_sip_etag.cpp │ ├── hdr_sip_etag.h │ ├── hdr_sip_if_match.cpp │ ├── hdr_sip_if_match.h │ ├── hdr_subject.cpp │ ├── hdr_subject.h │ ├── hdr_subscription_state.cpp │ ├── hdr_subscription_state.h │ ├── hdr_supported.cpp │ ├── hdr_supported.h │ ├── hdr_timestamp.cpp │ ├── hdr_timestamp.h │ ├── hdr_to.cpp │ ├── hdr_to.h │ ├── hdr_unsupported.cpp │ ├── hdr_unsupported.h │ ├── hdr_user_agent.cpp │ ├── hdr_user_agent.h │ ├── hdr_via.cpp │ ├── hdr_via.h │ ├── hdr_warning.cpp │ ├── hdr_warning.h │ ├── hdr_www_authenticate.cpp │ ├── hdr_www_authenticate.h │ ├── header.cpp │ ├── header.h │ ├── identity.cpp │ ├── identity.h │ ├── media_type.cpp │ ├── media_type.h │ ├── milenage.cpp │ ├── milenage.h │ ├── parameter.cpp │ ├── parameter.h │ ├── parse_ctrl.cpp │ ├── parse_ctrl.h │ ├── parser.yxx │ ├── request.cpp │ ├── request.h │ ├── response.cpp │ ├── response.h │ ├── rijndael.cpp │ ├── rijndael.h │ ├── route.cpp │ ├── route.h │ ├── scanner.lxx │ ├── sip_body.cpp │ ├── sip_body.h │ ├── sip_message.cpp │ └── sip_message.h ├── patterns │ ├── CMakeLists.txt │ ├── observer.cpp │ └── observer.h ├── phone.cpp ├── phone.h ├── phone_user.cpp ├── phone_user.h ├── presence │ ├── CMakeLists.txt │ ├── buddy.cpp │ ├── buddy.h │ ├── pidf_body.cpp │ ├── pidf_body.h │ ├── presence_dialog.cpp │ ├── presence_dialog.h │ ├── presence_epa.cpp │ ├── presence_epa.h │ ├── presence_state.cpp │ ├── presence_state.h │ ├── presence_subscription.cpp │ └── presence_subscription.h ├── prohibit_thread.cpp ├── prohibit_thread.h ├── protocol.h ├── redirect.cpp ├── redirect.h ├── sdp │ ├── CMakeLists.txt │ ├── sdp.cpp │ ├── sdp.h │ ├── sdp_parse_ctrl.cpp │ ├── sdp_parse_ctrl.h │ ├── sdp_parser.h │ ├── sdp_parser.yxx │ └── sdp_scanner.lxx ├── sender.cpp ├── sender.h ├── sequence_number.h ├── service.cpp ├── service.h ├── session.cpp ├── session.h ├── sockets │ ├── CMakeLists.txt │ ├── connection.cpp │ ├── connection.h │ ├── connection_table.cpp │ ├── connection_table.h │ ├── dnssrv.cpp │ ├── dnssrv.h │ ├── interfaces.cpp │ ├── interfaces.h │ ├── ipaddr.h │ ├── socket.cpp │ ├── socket.h │ ├── url.cpp │ └── url.h ├── stun │ ├── CMakeLists.txt │ ├── stun.cxx │ ├── stun.h │ ├── stun_transaction.cpp │ ├── stun_transaction.h │ ├── udp.cxx │ └── udp.h ├── sub_refer.cpp ├── sub_refer.h ├── subscription.cpp ├── subscription.h ├── subscription_dialog.cpp ├── subscription_dialog.h ├── sys_settings.cpp ├── sys_settings.h ├── threads │ ├── CMakeLists.txt │ ├── mutex.cpp │ ├── mutex.h │ ├── sema.cpp │ ├── sema.h │ ├── thread.cpp │ └── thread.h ├── timekeeper.cpp ├── timekeeper.h ├── transaction.cpp ├── transaction.h ├── transaction_layer.cpp ├── transaction_layer.h ├── transaction_mgr.cpp ├── transaction_mgr.h ├── translator.h ├── user.cpp ├── user.h ├── userintf.cpp ├── userintf.h ├── util.cpp ├── util.h └── utils │ ├── CMakeLists.txt │ ├── file_utils.cpp │ ├── file_utils.h │ ├── mime_database.cpp │ ├── mime_database.h │ ├── record_file.h │ └── record_file.hpp ├── twinkle.desktop.in ├── twinkle.spec.in └── twinkle_config.h.in /.gitignore: -------------------------------------------------------------------------------- 1 | # generated by cmake 2 | *.cmake 3 | !cmake/*.cmake 4 | *.depends 5 | CMakeFiles 6 | Makefile 7 | /CMakeCache.txt 8 | /twinkle_config.h 9 | /twinkle.desktop 10 | 11 | # generated by build 12 | *.o 13 | *.qm 14 | ui_*.h 15 | moc_*.cpp 16 | src/twinkle-console 17 | src/gui/twinkle 18 | src/gui/twinkle_automoc.cpp 19 | src/gui/qrc_icons.cpp 20 | src/gui/qrc_icons.cxx 21 | src/gui/qrc_qml.cpp 22 | src/gui/qrc_qml.cxx 23 | src/parser/parser.cxx 24 | src/parser/parser.hxx 25 | src/parser/scanner.cxx 26 | src/sdp/sdp_parser.cxx 27 | src/sdp/sdp_parser.hxx 28 | src/sdp/sdp_scanner.cxx 29 | 30 | # Qt Creator files 31 | CMakeLists.txt.user* 32 | 33 | # generic 34 | *~ 35 | 36 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Author of Twinkle: 2 | 3 | Michel de Boer designed and implemented Twinkle. 4 | Lubos Dolezel ported Twinkle to Qt4/5 and took over further development. 5 | 6 | Contributions: 7 | * Werner Dittmann (ZRTP/SRTP) 8 | * Bogdan Harjoc (AKAv1-MD5, Service-Route) 9 | * Roman Imankulov (command line editing) 10 | * Ondrej Moris (codec preprocessing) 11 | * Rickard Petzall (ALSA) 12 | 13 | Twinkle contains the following 3rd party software packages: 14 | - GSM codec from Jutta Degener and Carsten Bormann 15 | see directory src/audio/gsm for more info 16 | - G.711/G.726 codec from Sun Microsystems 17 | see src/audio/README_G711 for more info 18 | - G.722 codec from Steve Underwood 19 | see src/audio/g722.h for more info 20 | - iLBC implementation from RFC 3951 (www.ilbcfreeware.org) 21 | - Parts of the STUN project from sourceforge 22 | http://sourceforge.net/projects/stun 23 | - Parts of libsrv at http://libsrv.sourceforge.net/ 24 | 25 | Dynamic linked libraries: 26 | - RTP, ZRTP and SRTP functionality is provided by the 27 | GNU ccRTP stack: http://www.gnu.org/software/ccrtp 28 | 29 | Translators: 30 | Czech Marek Straka 31 | Dutch Michel de Boer 32 | German Joerg Reisenweber 33 | French Olivier Aufrere 34 | Russian Michail Chodorenko 35 | Swedish Daniel Nylander 36 | 37 | Michel de Boer 38 | https://mfnboer.home.xs4all.nl/twinkle/ 39 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | Thanks to the following people for testing and finding all 2 | those lovely bugs: 3 | 4 | Richard Bos 5 | Schelte Bron 6 | Ruud Linders 7 | John van der Ploeg 8 | Marco van Zijl 9 | 10 | Thanks to Richard Bos for RPM building and advertising. 11 | 12 | Thanks to Joerg Reisenweber for his excellent testing and debugging. 13 | 14 | Thanks to Treeve Jelbert for helping me catching build errors in release 0.4 15 | 16 | Thanks to James Le Cuirot for helping me debug several ALSA and RTP problems. 17 | 18 | Qt 4 & 5 porting done by Lubos Dolezel and Michal Kubecek. 19 | 20 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | * make KDE support work again 2 | 3 | After cleaning up the autotools config, twinkle only builds with 4 | --without-kde. This is only temporary, the goal is to allow building 5 | against KDE4 libraries (and, preferrably, also KDE5). 6 | 7 | * IPv6 support 8 | 9 | Still missing, AFAIK. 10 | 11 | * t_gui locking 12 | 13 | Dirty workaround for (mostly) calling GUI related methods from non-GUI 14 | threads. Doesn't actually work with Qt4, causing segfaults. Analyze 15 | the remaining uses and get rid of it. 16 | 17 | * MEMMAN_* tracking macros 18 | 19 | Ugly and unreliable (too easy to forget adding them). Either replace 20 | them with overloaded new and delete operators or kill them completely 21 | and rely on valgrind. 22 | 23 | -------------------------------------------------------------------------------- /cmake/FindCcrtp.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(CCRTP_INCLUDE_DIR ccrtp/rtp.h) 2 | FIND_LIBRARY(CCRTP_LIBRARIES NAMES ccrtp) 3 | 4 | IF(CCRTP_INCLUDE_DIR AND CCRTP_LIBRARIES) 5 | SET(CCRTP_FOUND TRUE) 6 | ENDIF(CCRTP_INCLUDE_DIR AND CCRTP_LIBRARIES) 7 | 8 | IF(CCRTP_FOUND) 9 | IF (NOT Ccrtp_FIND_QUIETLY) 10 | MESSAGE(STATUS "Found ccrtp includes: ${CCRTP_INCLUDE_DIR}/ccrtp/rtp.h") 11 | MESSAGE(STATUS "Found ccrtp library: ${CCRTP_LIBRARIES}") 12 | ENDIF (NOT Ccrtp_FIND_QUIETLY) 13 | ELSE(CCRTP_FOUND) 14 | IF (Ccrtp_FIND_REQUIRED) 15 | MESSAGE(FATAL_ERROR "Could NOT find ccrtp development files") 16 | ENDIF (Ccrtp_FIND_REQUIRED) 17 | ENDIF(CCRTP_FOUND) 18 | -------------------------------------------------------------------------------- /cmake/FindCommoncpp.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(COMMONCPP_INCLUDE_DIR commoncpp/config.h) 2 | FIND_LIBRARY(COMMONCPP_LIBRARIES NAMES commoncpp) 3 | 4 | IF(COMMONCPP_INCLUDE_DIR AND COMMONCPP_LIBRARIES) 5 | SET(COMMONCPP_FOUND TRUE) 6 | ENDIF(COMMONCPP_INCLUDE_DIR AND COMMONCPP_LIBRARIES) 7 | 8 | IF(COMMONCPP_FOUND) 9 | IF (NOT Commoncpp_FIND_QUIETLY) 10 | MESSAGE(STATUS "Found commoncpp includes: ${COMMONCPP_INCLUDE_DIR}/commoncpp/config.h") 11 | MESSAGE(STATUS "Found commoncpp library: ${COMMONCPP_LIBRARIES}") 12 | ENDIF (NOT Commoncpp_FIND_QUIETLY) 13 | ELSE(COMMONCPP_FOUND) 14 | IF (Commoncpp_FIND_REQUIRED) 15 | MESSAGE(FATAL_ERROR "Could NOT find commoncpp development files") 16 | ENDIF (Commoncpp_FIND_REQUIRED) 17 | ENDIF(COMMONCPP_FOUND) 18 | -------------------------------------------------------------------------------- /cmake/FindGsm.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(GSM_INCLUDE_DIR gsm/gsm.h) 2 | FIND_LIBRARY(GSM_LIBRARY NAMES gsm) 3 | 4 | IF(GSM_INCLUDE_DIR AND GSM_LIBRARY) 5 | SET(GSM_FOUND TRUE) 6 | ENDIF(GSM_INCLUDE_DIR AND GSM_LIBRARY) 7 | 8 | IF(GSM_FOUND) 9 | IF (NOT Gsm_FIND_QUIETLY) 10 | MESSAGE(STATUS "Found gsm includes: ${GSM_INCLUDE_DIR}/gsm/config.h") 11 | MESSAGE(STATUS "Found gsm library: ${GSM_LIBRARY}") 12 | ENDIF (NOT Gsm_FIND_QUIETLY) 13 | ELSE(GSM_FOUND) 14 | IF (Gsm_FIND_REQUIRED) 15 | MESSAGE(FATAL_ERROR "Could NOT find gsm development files") 16 | ENDIF (Gsm_FIND_REQUIRED) 17 | ENDIF(GSM_FOUND) 18 | -------------------------------------------------------------------------------- /cmake/FindIlbc.cmake: -------------------------------------------------------------------------------- 1 | include (CMakePushCheckState) 2 | include (CheckCXXSourceCompiles) 3 | 4 | FIND_PATH(ILBC_INCLUDE_DIR ilbc/iLBC_decode.h) 5 | FIND_LIBRARY(ILBC_LIBRARIES NAMES ilbc) 6 | 7 | IF(ILBC_INCLUDE_DIR AND ILBC_LIBRARIES) 8 | SET(ILBC_FOUND TRUE) 9 | 10 | # Check if libilbc can be used without 'extern "C"' 11 | CMAKE_PUSH_CHECK_STATE() 12 | LIST(APPEND CMAKE_REQUIRED_INCLUDES "${ILBC_INCLUDE_DIR}") 13 | LIST(APPEND CMAKE_REQUIRED_LIBRARIES "-lilbc") 14 | SET(CMAKE_REQUIRED_QUIET TRUE) 15 | CHECK_CXX_SOURCE_COMPILES(" 16 | #include 17 | 18 | int main() { 19 | iLBC_Dec_Inst_t *iLBCdec_inst; 20 | initDecode(iLBCdec_inst, 0, 0); 21 | return 0; 22 | } 23 | " ILBC_CPP) 24 | CMAKE_POP_CHECK_STATE() 25 | ENDIF(ILBC_INCLUDE_DIR AND ILBC_LIBRARIES) 26 | 27 | IF(ILBC_FOUND) 28 | IF (NOT Ilbc_FIND_QUIETLY) 29 | MESSAGE(STATUS "Found ilbc includes: ${ILBC_INCLUDE_DIR}/ilbc/iLBC_decode.h") 30 | MESSAGE(STATUS "Found ilbc library: ${ILBC_LIBRARIES}") 31 | ENDIF (NOT Ilbc_FIND_QUIETLY) 32 | ELSE(ILBC_FOUND) 33 | IF (Ilbc_FIND_REQUIRED) 34 | MESSAGE(FATAL_ERROR "Could NOT find ilbc development files") 35 | ENDIF (Ilbc_FIND_REQUIRED) 36 | ENDIF(ILBC_FOUND) 37 | -------------------------------------------------------------------------------- /cmake/FindLibSndfile.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h) 2 | 3 | SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile) 4 | FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH) 5 | 6 | IF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) 7 | SET(LIBSNDFILE_FOUND TRUE) 8 | ENDIF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) 9 | 10 | IF(LIBSNDFILE_FOUND) 11 | IF(NOT LibSndfile_FIND_QUIETLY) 12 | MESSAGE(STATUS "Found LibSndfile: ${LIBSNDFILE_LIBRARY}") 13 | ENDIF (NOT LibSndfile_FIND_QUIETLY) 14 | ELSE(LIBSNDFILE_FOUND) 15 | IF(LibSndfile_FIND_REQUIRED) 16 | MESSAGE(FATAL_ERROR "Could not find sndfile") 17 | ENDIF(LibSndfile_FIND_REQUIRED) 18 | ENDIF (LIBSNDFILE_FOUND) 19 | -------------------------------------------------------------------------------- /cmake/FindSpeex.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(SPEEX_INCLUDE_DIR speex/speex.h) 2 | FIND_LIBRARY(SPEEX_LIBRARY NAMES speex) 3 | FIND_LIBRARY(SPEEXDSP_LIBRARY NAMES speexdsp) 4 | 5 | IF(SPEEX_INCLUDE_DIR AND SPEEX_LIBRARY AND SPEEXDSP_LIBRARY) 6 | SET(SPEEX_FOUND TRUE) 7 | SET(SPEEX_LIBRARIES ${SPEEX_LIBRARY} ${SPEEXDSP_LIBRARY}) 8 | ENDIF(SPEEX_INCLUDE_DIR AND SPEEX_LIBRARY AND SPEEXDSP_LIBRARY) 9 | 10 | IF(SPEEX_FOUND) 11 | IF (NOT Speex_FIND_QUIETLY) 12 | MESSAGE(STATUS "Found speex includes: ${SPEEX_INCLUDE_DIR}/speex/speex.h") 13 | MESSAGE(STATUS "Found speex library: ${SPEEX_LIBRARIES}") 14 | ENDIF (NOT Speex_FIND_QUIETLY) 15 | ELSE(SPEEX_FOUND) 16 | IF (Speex_FIND_REQUIRED) 17 | MESSAGE(FATAL_ERROR "Could NOT find speex development files") 18 | ENDIF (Speex_FIND_REQUIRED) 19 | ENDIF(SPEEX_FOUND) 20 | -------------------------------------------------------------------------------- /cmake/FindUcommon.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(UCOMMON_INCLUDE_DIR ucommon/ucommon.h) 2 | FIND_LIBRARY(UCOMMON_LIBRARIES NAMES ucommon) 3 | FIND_LIBRARY(USECURE_LIBRARIES NAMES usecure) 4 | 5 | IF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES AND USECURE_LIBRARIES) 6 | SET(UCOMMON_FOUND TRUE) 7 | SET(UCOMMON_LIBRARIES ${UCOMMON_LIBRARIES} ${USECURE_LIBRARIES}) 8 | ENDIF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES AND USECURE_LIBRARIES) 9 | 10 | IF(UCOMMON_FOUND) 11 | IF (NOT Ucommon_FIND_QUIETLY) 12 | MESSAGE(STATUS "Found ucommon includes: ${UCOMMON_INCLUDE_DIR}/ucommon/ucommon.h") 13 | MESSAGE(STATUS "Found ucommon library: ${UCOMMON_LIBRARIES}") 14 | ENDIF (NOT Ucommon_FIND_QUIETLY) 15 | ELSE(UCOMMON_FOUND) 16 | IF (Ucommon_FIND_REQUIRED) 17 | MESSAGE(FATAL_ERROR "Could NOT find ucommon development files") 18 | ENDIF (Ucommon_FIND_REQUIRED) 19 | ENDIF(UCOMMON_FOUND) 20 | -------------------------------------------------------------------------------- /cmake/FindZrtpcpp.cmake: -------------------------------------------------------------------------------- 1 | FIND_PATH(ZRTPCPP_INCLUDE_DIR libzrtpcpp/zrtpccrtp.h) 2 | FIND_LIBRARY(ZRTPCPP_LIBRARIES NAMES zrtpcpp) 3 | 4 | IF(ZRTPCPP_INCLUDE_DIR AND ZRTPCPP_LIBRARIES) 5 | SET(ZRTPCPP_FOUND TRUE) 6 | ENDIF(ZRTPCPP_INCLUDE_DIR AND ZRTPCPP_LIBRARIES) 7 | 8 | IF(ZRTPCPP_FOUND) 9 | IF (NOT Zrtpcpp_FIND_QUIETLY) 10 | MESSAGE(STATUS "Found libzrtpcpp includes: ${ZRTPCPP_INCLUDE_DIR}/libzrtpcpp/zrtpccrtp.h") 11 | MESSAGE(STATUS "Found libzrtpcpp library: ${ZRTPCPP_LIBRARIES}") 12 | 13 | SET(ZRTPCPP_INCLUDE_DIR ${ZRTPCPP_INCLUDE_DIR} "${ZRTPCPP_INCLUDE_DIR}/libzrtpcpp") 14 | ENDIF (NOT Zrtpcpp_FIND_QUIETLY) 15 | ELSE(ZRTPCPP_FOUND) 16 | IF (Zrtpcpp_FIND_REQUIRED) 17 | MESSAGE(FATAL_ERROR "Could NOT find libzrtpcpp development files") 18 | ENDIF (Zrtpcpp_FIND_REQUIRED) 19 | ENDIF(ZRTPCPP_FOUND) 20 | -------------------------------------------------------------------------------- /data/providers.csv: -------------------------------------------------------------------------------- 1 | # provider;domain;sip proxy;stun server 2 | sipgate.at;sipgate.at;;sipgate.at 3 | sipgate.co.uk;sipgate.co.uk;;sipgate.co.uk 4 | sipgate.de;sipgate.de;;sipgate.de 5 | SIPphone!;proxy01.sipphone.com;;stun01.sipphone.com 6 | -------------------------------------------------------------------------------- /data/ringback.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/data/ringback.wav -------------------------------------------------------------------------------- /data/ringtone.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/data/ringtone.wav -------------------------------------------------------------------------------- /sip.protocol: -------------------------------------------------------------------------------- 1 | [Protocol] 2 | exec=twinkle --call %u 3 | protocol=sip 4 | input=none 5 | output=none 6 | helper=true 7 | listing= 8 | reading=false 9 | writing=false 10 | makedir=false 11 | deleting=false 12 | Icon=multimedia 13 | -------------------------------------------------------------------------------- /src/audio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-audio) 2 | 3 | set(LIBTWINKLE_AUDIO-SRCS 4 | audio_device.cpp 5 | audio_decoder.cpp 6 | audio_encoder.cpp 7 | audio_codecs.cpp 8 | audio_rx.cpp 9 | audio_session.cpp 10 | audio_tx.cpp 11 | dtmf_player.cpp 12 | freq_gen.cpp 13 | g711.cpp 14 | g721.cpp 15 | g722_decode.c 16 | g722_encode.c 17 | g723_16.cpp 18 | g723_24.cpp 19 | g723_40.cpp 20 | g72x.cpp 21 | media_buffer.cpp 22 | rtp_telephone_event.cpp 23 | tone_gen.cpp 24 | twinkle_rtp_session.cpp 25 | twinkle_zrtp_ui.cpp 26 | ) 27 | 28 | add_library(libtwinkle-audio OBJECT ${LIBTWINKLE_AUDIO-SRCS}) 29 | -------------------------------------------------------------------------------- /src/audio/g711.h: -------------------------------------------------------------------------------- 1 | #ifndef _G711_H 2 | #define _G711_H 3 | 4 | // The linear PCM codes are signed 16 bit values 5 | 6 | // G.711 A-law 7 | unsigned char linear2alaw(short pcm_val); 8 | short alaw2linear(unsigned char a_val); 9 | 10 | // G.711 u-law 11 | unsigned char linear2ulaw(short pcm_val); 12 | short ulaw2linear(unsigned char u_val); 13 | 14 | // A-law <-> u-law conversions 15 | unsigned char alaw2ulaw(unsigned char aval); 16 | unsigned char ulaw2alaw(unsigned char uval); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/audio/g722_local.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2019 Frédéric Brière 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Our own additions to g722.h, kept separate so that the latter can easily 19 | // be updated by copying it as-is from Asterisk 20 | 21 | #ifndef _G722_LOCAL_H 22 | #define _G722_LOCAL_H 23 | 24 | // A sampling rate of 16 kHz and a bit rate of 64 kbit/s result in a ratio of 25 | // 2 samples per payload byte 26 | #define G722_SAMPLES_PAYLOAD_RATIO (16000 / (64000 / 8)) 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/audio/gsm/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, 2 | Technische Universitaet Berlin 3 | 4 | Any use of this software is permitted provided that this notice is not 5 | removed and that neither the authors nor the Technische Universitaet Berlin 6 | are deemed to have made any representations as to the suitability of this 7 | software for any purpose nor are held responsible for any defects of 8 | this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 9 | 10 | As a matter of courtesy, the authors request to be informed about uses 11 | this software has found, about bugs in this software, and about any 12 | improvements that may be of general interest. 13 | 14 | Berlin, 28.11.1994 15 | Jutta Degener 16 | Carsten Bormann 17 | -------------------------------------------------------------------------------- /src/audio/gsm/MACHINES: -------------------------------------------------------------------------------- 1 | The gsm library has been tested successfully on the following platforms: 2 | 3 | - Various Sun4's running SunOS 4.1.2 4 | - SPARC1 (SunOS 4.1.1) 5 | - Integrated Solutions 68k Optimum running 4.3BSD UNIX with a Green Hills cc 6 | - NeXTstation running NeXT-OS/Mach 3.0 7 | - No-name AT/386 with Xenix 2.3.2 (using -DSTUPID_COMPILER) 8 | - RS/6000-350 running AIX 3.2.0 9 | - RS/6000-320 running AIX 3.1.5 10 | - Alliant FX80 (Concentrix 5.7) 11 | - SGI Indigo XS4000 (IRIX 4.0.5F) 12 | -------------------------------------------------------------------------------- /src/audio/gsm/inc/unproto.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | /*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/unproto.h,v 1.1 1992/10/28 00:11:08 jutta Exp $*/ 8 | 9 | #ifdef PROTO_H /* sic */ 10 | #undef PROTO_H 11 | 12 | #undef P 13 | #undef P0 14 | #undef P1 15 | #undef P2 16 | #undef P3 17 | #undef P4 18 | #undef P5 19 | #undef P6 20 | #undef P7 21 | #undef P8 22 | 23 | #endif /* PROTO_H */ 24 | -------------------------------------------------------------------------------- /src/audio/gsm/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-gsm) 2 | 3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../inc) 4 | 5 | set(LIBTWINKLE_GSM-SRCS 6 | add.cpp 7 | code.cpp 8 | debug.cpp 9 | decode.cpp 10 | gsm_create.cpp 11 | gsm_decode.cpp 12 | gsm_destroy.cpp 13 | gsm_encode.cpp 14 | gsm_explode.cpp 15 | gsm_implode.cpp 16 | gsm_option.cpp 17 | gsm_print.cpp 18 | long_term.cpp 19 | lpc.cpp 20 | preprocess.cpp 21 | rpe.cpp 22 | short_term.cpp 23 | table.cpp 24 | ) 25 | 26 | add_library(libtwinkle-gsm OBJECT ${LIBTWINKLE_GSM-SRCS}) 27 | -------------------------------------------------------------------------------- /src/audio/gsm/src/gsm_create.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | static char const ident[] = "$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_create.c,v 1.4 1996/07/02 09:59:05 jutta Exp $"; 8 | 9 | #include "config.h" 10 | 11 | #ifdef HAS_STRING_H 12 | #include 13 | #else 14 | # include "proto.h" 15 | extern char * memset P((char *, int, int)); 16 | #endif 17 | 18 | #ifdef HAS_STDLIB_H 19 | # include 20 | #else 21 | # ifdef HAS_MALLOC_H 22 | # include 23 | # else 24 | extern char * malloc(); 25 | # endif 26 | #endif 27 | 28 | #include 29 | 30 | #include "gsm.h" 31 | #include "private.h" 32 | #include "proto.h" 33 | 34 | gsm gsm_create P0() 35 | { 36 | gsm r; 37 | 38 | r = (gsm)malloc(sizeof(struct gsm_state)); 39 | if (!r) return r; 40 | 41 | memset((char *)r, 0, sizeof(*r)); 42 | r->nrp = 40; 43 | 44 | return r; 45 | } 46 | -------------------------------------------------------------------------------- /src/audio/gsm/src/gsm_destroy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_destroy.c,v 1.3 1994/11/28 19:52:25 jutta Exp $ */ 8 | 9 | #include "gsm.h" 10 | #include "config.h" 11 | #include "proto.h" 12 | 13 | #ifdef HAS_STDLIB_H 14 | # include 15 | #else 16 | # ifdef HAS_MALLOC_H 17 | # include 18 | # else 19 | extern void free(); 20 | # endif 21 | #endif 22 | 23 | void gsm_destroy P1((S), gsm S) 24 | { 25 | if (S) free((char *)S); 26 | } 27 | -------------------------------------------------------------------------------- /src/audio/gsm/src/gsm_option.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_option.c,v 1.3 1996/07/02 09:59:05 jutta Exp $ */ 8 | 9 | #include "private.h" 10 | 11 | #include "gsm.h" 12 | #include "proto.h" 13 | 14 | int gsm_option P3((r, opt, val), gsm r, int opt, int * val) 15 | { 16 | int result = -1; 17 | 18 | switch (opt) { 19 | case GSM_OPT_LTP_CUT: 20 | #ifdef LTP_CUT 21 | result = r->ltp_cut; 22 | if (val) r->ltp_cut = *val; 23 | #endif 24 | break; 25 | 26 | case GSM_OPT_VERBOSE: 27 | #ifndef NDEBUG 28 | result = r->verbose; 29 | if (val) r->verbose = *val; 30 | #endif 31 | break; 32 | 33 | case GSM_OPT_FAST: 34 | 35 | #if defined(FAST) && defined(USE_FLOAT_MUL) 36 | result = r->fast; 37 | if (val) r->fast = !!*val; 38 | #endif 39 | break; 40 | 41 | case GSM_OPT_FRAME_CHAIN: 42 | 43 | #ifdef WAV49 44 | result = r->frame_chain; 45 | if (val) r->frame_chain = *val; 46 | #endif 47 | break; 48 | 49 | case GSM_OPT_FRAME_INDEX: 50 | 51 | #ifdef WAV49 52 | result = r->frame_index; 53 | if (val) r->frame_index = *val; 54 | #endif 55 | break; 56 | 57 | case GSM_OPT_WAV49: 58 | 59 | #ifdef WAV49 60 | result = r->wav_fmt; 61 | if (val) r->wav_fmt = !!*val; 62 | #endif 63 | break; 64 | 65 | default: 66 | break; 67 | } 68 | return result; 69 | } 70 | -------------------------------------------------------------------------------- /src/audits/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-audits) 2 | 3 | set(LIBTWINKLE_AUDITS-SRCS 4 | memman.cpp 5 | ) 6 | 7 | add_library(libtwinkle-audits OBJECT ${LIBTWINKLE_AUDITS-SRCS}) 8 | -------------------------------------------------------------------------------- /src/exceptions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /** 19 | * @file 20 | * Exceptions. 21 | */ 22 | 23 | #ifndef _EXCEPTIONS_H 24 | #define _EXCEPTIONS_H 25 | 26 | #include 27 | 28 | /** Exception tupe. */ 29 | enum t_exception { 30 | X_DIALOG_ALREADY_ESTABLISHED, /**< Dialog is already established. */ 31 | X_WRONG_STATE /**< State machine is in wrong state. */ 32 | }; 33 | 34 | class empty_list_exception : public std::exception { 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/gui/addresscardform.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDRESSCARDFORM_H 2 | #define ADDRESSCARDFORM_H 3 | #include "address_book.h" 4 | #include "ui_addresscardform.h" 5 | 6 | class AddressCardForm : public QDialog, public Ui::AddressCardForm 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | AddressCardForm(QWidget* parent = 0); 12 | ~AddressCardForm(); 13 | 14 | virtual int exec( t_address_card & card ); 15 | 16 | public slots: 17 | virtual void validate(); 18 | 19 | protected slots: 20 | virtual void languageChange(); 21 | 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/gui/authenticationform.h: -------------------------------------------------------------------------------- 1 | #ifndef AUTHENTICATIONFORM_H 2 | #define AUTHENTICATIONFORM_H 3 | #include "user.h" 4 | #include "ui_authenticationform.h" 5 | 6 | class AuthenticationForm : public QDialog, public Ui::AuthenticationForm 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | AuthenticationForm(QWidget* parent = 0); 12 | ~AuthenticationForm(); 13 | 14 | virtual int exec( t_user * user_config, const QString & realm, QString & username, QString & password ); 15 | 16 | protected slots: 17 | virtual void languageChange(); 18 | 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/gui/buddyform.h: -------------------------------------------------------------------------------- 1 | #ifndef BUDDYFORM_H 2 | #define BUDDYFORM_H 3 | #include "getaddressform.h" 4 | #include "presence/buddy.h" 5 | #include 6 | #include "user.h" 7 | #include "ui_buddyform.h" 8 | 9 | class BuddyForm : public QDialog, public Ui::BuddyForm 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | BuddyForm(QWidget* parent = 0); 15 | ~BuddyForm(); 16 | 17 | public slots: 18 | virtual void showNew( t_buddy_list & _buddy_list, QTreeWidgetItem * _profileItem ); 19 | virtual void showEdit( t_buddy & buddy ); 20 | virtual void validate(); 21 | virtual void showAddressBook(); 22 | virtual void selectedAddress( const QString & name, const QString & phone ); 23 | 24 | protected slots: 25 | virtual void languageChange(); 26 | 27 | private: 28 | GetAddressForm *getAddressForm; 29 | t_user *user_config; 30 | bool edit_mode; 31 | t_buddy_list *buddy_list; 32 | t_buddy *edit_buddy; 33 | QTreeWidgetItem *profileItem; 34 | 35 | void init(); 36 | void destroy(); 37 | 38 | }; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gui/deregisterform.cpp: -------------------------------------------------------------------------------- 1 | #include "deregisterform.h" 2 | 3 | /* 4 | * Constructs a DeregisterForm which is a child of 'parent', with the 5 | * name 'name' and widget flags set to 'f' 6 | * 7 | * The dialog will by default be modeless, unless you set 'modal' to 8 | * true to construct a modal dialog. 9 | */ 10 | DeregisterForm::DeregisterForm(QWidget* parent) 11 | : QDialog(parent) 12 | { 13 | setupUi(this); 14 | } 15 | 16 | /* 17 | * Destroys the object and frees any allocated resources 18 | */ 19 | DeregisterForm::~DeregisterForm() 20 | { 21 | // no need to delete child widgets, Qt does it all for us 22 | } 23 | -------------------------------------------------------------------------------- /src/gui/deregisterform.h: -------------------------------------------------------------------------------- 1 | #ifndef DEREGISTERFORM_H 2 | #define DEREGISTERFORM_H 3 | 4 | #include 5 | 6 | #include "ui_deregisterform.h" 7 | 8 | class DeregisterForm : public QDialog, private Ui::DeregisterForm 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | DeregisterForm(QWidget* parent = 0); 14 | ~DeregisterForm(); 15 | }; 16 | 17 | #endif // DEREGISTERFORM_H 18 | -------------------------------------------------------------------------------- /src/gui/diamondcardprofileform.h: -------------------------------------------------------------------------------- 1 | #ifndef DIAMONDCARDPROFILEFORM_H 2 | #define DIAMONDCARDPROFILEFORM_H 3 | #include 4 | #include 5 | #include "user.h" 6 | #include "ui_diamondcardprofileform.h" 7 | 8 | class DiamondcardProfileForm : public QDialog, public Ui_DiamondcardProfileForm 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | DiamondcardProfileForm(QWidget* parent = 0); 14 | ~DiamondcardProfileForm(); 15 | 16 | virtual int exec( t_user * user ); 17 | 18 | public slots: 19 | virtual void destroyOldUserConfig(); 20 | virtual void show( t_user * user ); 21 | virtual void validate(); 22 | virtual void signUpLinkActivated(); 23 | 24 | signals: 25 | void success(); 26 | void newDiamondcardProfile(const QString&); 27 | 28 | protected slots: 29 | virtual void languageChange(); 30 | 31 | private: 32 | t_user *user_config; 33 | bool destroy_user_config; 34 | 35 | void init(); 36 | void destroy(); 37 | 38 | }; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gui/dtmfform.h: -------------------------------------------------------------------------------- 1 | #ifndef DTMFFORM_H 2 | #define DTMFFORM_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "ui_dtmfform.h" 8 | 9 | class DtmfForm : public QDialog, private Ui::DtmfForm 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | explicit DtmfForm(QWidget *parent = 0); 15 | ~DtmfForm(); 16 | 17 | public slots: 18 | void dtmf1(); 19 | void dtmf2(); 20 | void dtmf3(); 21 | void dtmf4(); 22 | void dtmf5(); 23 | void dtmf6(); 24 | void dtmf7(); 25 | void dtmf8(); 26 | void dtmf9(); 27 | void dtmf0(); 28 | void dtmfStar(); 29 | void dtmfPound(); 30 | void dtmfA(); 31 | void dtmfB(); 32 | void dtmfC(); 33 | void dtmfD(); 34 | 35 | void insertNextKey(); 36 | 37 | protected: 38 | void keyPressEvent(QKeyEvent* e); 39 | signals: 40 | void digits(const QString&); 41 | private: 42 | QTimer m_insertTimer; 43 | QString m_remainingKeys; 44 | }; 45 | 46 | #endif // DTMFFORM_H 47 | -------------------------------------------------------------------------------- /src/gui/getaddressform.h: -------------------------------------------------------------------------------- 1 | #ifndef GETADDRESSFORM_UI_H 2 | #define GETADDRESSFORM_UI_H 3 | 4 | #include "twinkle_config.h" 5 | 6 | #include "ui_getaddressform.h" 7 | #include "user.h" 8 | 9 | class AddressTableModel; 10 | #ifdef HAVE_AKONADI 11 | class KContactsTableModel; 12 | #endif 13 | 14 | class GetAddressForm : public QDialog, public Ui::GetAddressForm 15 | { 16 | Q_OBJECT 17 | public: 18 | GetAddressForm(QWidget *parent); 19 | ~GetAddressForm(); 20 | private: 21 | void init(); 22 | // void destroy(); 23 | public slots: 24 | void reload(); 25 | void show(); 26 | void loadAddresses(); 27 | void selectAddress(); 28 | void selectAkonadiAddress(); 29 | void selectLocalAddress(); 30 | void toggleSipOnly( bool on ); 31 | void addLocalAddress(); 32 | void deleteLocalAddress(); 33 | void editLocalAddress(); 34 | 35 | signals: 36 | void address(const QString &, const QString &); 37 | void address(const QString &); 38 | private: 39 | AddressTableModel* m_model; 40 | #ifdef HAVE_AKONADI 41 | KContactsTableModel* k_model; 42 | #endif 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/gui/getprofilenameform.h: -------------------------------------------------------------------------------- 1 | #ifndef GETPROFILENAMEFORM_H 2 | #define GETPROFILENAMEFORM_H 3 | 4 | #include 5 | #include "ui_getprofilenameform.h" 6 | 7 | class GetProfileNameForm : public QDialog, private Ui::GetProfileNameForm 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | GetProfileNameForm(QWidget* parent = 0); 13 | ~GetProfileNameForm(); 14 | 15 | QString getProfileName(); 16 | int execNewName(); 17 | int execRename( const QString & oldName ); 18 | 19 | public slots: 20 | void validate(); 21 | 22 | private: 23 | void init(); 24 | }; 25 | 26 | #endif // GETPROFILENAMEFORM_H 27 | -------------------------------------------------------------------------------- /src/gui/historyform.h: -------------------------------------------------------------------------------- 1 | #ifndef HISTORYFORM_H 2 | #define HISTORYFORM_H 3 | #include "phone.h" 4 | #include 5 | #include 6 | #include 7 | #include "user.h" 8 | #include "ui_historyform.h" 9 | 10 | class HistoryForm : public QDialog, public Ui::HistoryForm 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | HistoryForm(QWidget* parent = 0); 16 | ~HistoryForm(); 17 | 18 | public slots: 19 | virtual void loadHistory(); 20 | virtual void update(); 21 | virtual void show(); 22 | virtual void closeEvent( QCloseEvent * e ); 23 | virtual void popupMenu( QPoint pos ); 24 | virtual void call( QModelIndex index ); 25 | virtual void call( void ); 26 | virtual void deleteEntry( void ); 27 | virtual void clearHistory(); 28 | 29 | signals: 30 | void call(t_user *, const QString &, const QString &, bool); 31 | 32 | protected slots: 33 | virtual void languageChange(); 34 | 35 | private: 36 | time_t timeLastViewed; 37 | QMenu *histPopupMenu; 38 | QStandardItemModel *m_model; 39 | QAction* itemCall; 40 | QPixmap m_pixmapIn, m_pixmapOut; 41 | QPixmap m_pixmapOk, m_pixmapCancel; 42 | QList m_history; 43 | 44 | void init(); 45 | void destroy(); 46 | 47 | private slots: 48 | void showCallDetails(const QModelIndex &); 49 | }; 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/images/1downarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/1downarrow.png -------------------------------------------------------------------------------- /src/gui/images/1leftarrow-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/1leftarrow-yellow.png -------------------------------------------------------------------------------- /src/gui/images/1leftarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/1leftarrow.png -------------------------------------------------------------------------------- /src/gui/images/1rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/1rightarrow.png -------------------------------------------------------------------------------- /src/gui/images/1uparrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/1uparrow.png -------------------------------------------------------------------------------- /src/gui/images/answer-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/answer-disabled.png -------------------------------------------------------------------------------- /src/gui/images/answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/answer.png -------------------------------------------------------------------------------- /src/gui/images/attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/attach.png -------------------------------------------------------------------------------- /src/gui/images/auto_answer-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/auto_answer-disabled.png -------------------------------------------------------------------------------- /src/gui/images/auto_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/auto_answer.png -------------------------------------------------------------------------------- /src/gui/images/buddy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/buddy.png -------------------------------------------------------------------------------- /src/gui/images/bye-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/bye-disabled.png -------------------------------------------------------------------------------- /src/gui/images/bye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/bye.png -------------------------------------------------------------------------------- /src/gui/images/cancel-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/cancel-disabled.png -------------------------------------------------------------------------------- /src/gui/images/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/cancel.png -------------------------------------------------------------------------------- /src/gui/images/cf-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/cf-disabled.png -------------------------------------------------------------------------------- /src/gui/images/cf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/cf.png -------------------------------------------------------------------------------- /src/gui/images/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/clock.png -------------------------------------------------------------------------------- /src/gui/images/conf-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/conf-disabled.png -------------------------------------------------------------------------------- /src/gui/images/conf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/conf.png -------------------------------------------------------------------------------- /src/gui/images/conference-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/conference-disabled.png -------------------------------------------------------------------------------- /src/gui/images/conference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/conference.png -------------------------------------------------------------------------------- /src/gui/images/consult-xfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/consult-xfer.png -------------------------------------------------------------------------------- /src/gui/images/contexthelp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/contexthelp.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-0.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-1.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-2.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-3.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-4.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-5.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-6.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-7.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-8.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-9.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-a.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-b.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-c.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-d.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-disabled.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-pound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-pound.png -------------------------------------------------------------------------------- /src/gui/images/dtmf-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf-star.png -------------------------------------------------------------------------------- /src/gui/images/dtmf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/dtmf.png -------------------------------------------------------------------------------- /src/gui/images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/edit.png -------------------------------------------------------------------------------- /src/gui/images/edit16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/edit16.png -------------------------------------------------------------------------------- /src/gui/images/editcopy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/editcopy -------------------------------------------------------------------------------- /src/gui/images/editcut: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/editcut -------------------------------------------------------------------------------- /src/gui/images/editdelete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/editdelete.png -------------------------------------------------------------------------------- /src/gui/images/editpaste: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/editpaste -------------------------------------------------------------------------------- /src/gui/images/encrypted-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/encrypted-disabled.png -------------------------------------------------------------------------------- /src/gui/images/encrypted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/encrypted.png -------------------------------------------------------------------------------- /src/gui/images/encrypted32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/encrypted32.png -------------------------------------------------------------------------------- /src/gui/images/encrypted_verified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/encrypted_verified.png -------------------------------------------------------------------------------- /src/gui/images/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/exit.png -------------------------------------------------------------------------------- /src/gui/images/favorites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/favorites.png -------------------------------------------------------------------------------- /src/gui/images/filenew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/filenew -------------------------------------------------------------------------------- /src/gui/images/fileopen-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/fileopen-disabled.png -------------------------------------------------------------------------------- /src/gui/images/fileopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/fileopen.png -------------------------------------------------------------------------------- /src/gui/images/filesave: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/filesave -------------------------------------------------------------------------------- /src/gui/images/gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/gear.png -------------------------------------------------------------------------------- /src/gui/images/hold-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/hold-disabled.png -------------------------------------------------------------------------------- /src/gui/images/hold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/hold.png -------------------------------------------------------------------------------- /src/gui/images/invite-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/invite-disabled.png -------------------------------------------------------------------------------- /src/gui/images/invite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/invite.png -------------------------------------------------------------------------------- /src/gui/images/kcmpci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/kcmpci.png -------------------------------------------------------------------------------- /src/gui/images/kcmpci16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/kcmpci16.png -------------------------------------------------------------------------------- /src/gui/images/kmix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/kmix.png -------------------------------------------------------------------------------- /src/gui/images/knotify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/knotify.png -------------------------------------------------------------------------------- /src/gui/images/kontact_contacts-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/kontact_contacts-disabled.png -------------------------------------------------------------------------------- /src/gui/images/kontact_contacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/kontact_contacts.png -------------------------------------------------------------------------------- /src/gui/images/kontact_contacts32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/kontact_contacts32.png -------------------------------------------------------------------------------- /src/gui/images/log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/log.png -------------------------------------------------------------------------------- /src/gui/images/log_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/log_small.png -------------------------------------------------------------------------------- /src/gui/images/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/message.png -------------------------------------------------------------------------------- /src/gui/images/message32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/message32.png -------------------------------------------------------------------------------- /src/gui/images/mime_application.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mime_application.png -------------------------------------------------------------------------------- /src/gui/images/mime_audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mime_audio.png -------------------------------------------------------------------------------- /src/gui/images/mime_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mime_image.png -------------------------------------------------------------------------------- /src/gui/images/mime_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mime_text.png -------------------------------------------------------------------------------- /src/gui/images/mime_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mime_video.png -------------------------------------------------------------------------------- /src/gui/images/missed-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/missed-disabled.png -------------------------------------------------------------------------------- /src/gui/images/missed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/missed.png -------------------------------------------------------------------------------- /src/gui/images/mute-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mute-disabled.png -------------------------------------------------------------------------------- /src/gui/images/mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mute.png -------------------------------------------------------------------------------- /src/gui/images/mwi_failure16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mwi_failure16.png -------------------------------------------------------------------------------- /src/gui/images/mwi_new16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mwi_new16.png -------------------------------------------------------------------------------- /src/gui/images/mwi_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mwi_none.png -------------------------------------------------------------------------------- /src/gui/images/mwi_none16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mwi_none16.png -------------------------------------------------------------------------------- /src/gui/images/mwi_none16_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/mwi_none16_dis.png -------------------------------------------------------------------------------- /src/gui/images/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/network.png -------------------------------------------------------------------------------- /src/gui/images/no-indication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/no-indication.png -------------------------------------------------------------------------------- /src/gui/images/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/ok.png -------------------------------------------------------------------------------- /src/gui/images/osd_hangup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/osd_hangup.png -------------------------------------------------------------------------------- /src/gui/images/osd_mic_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/osd_mic_off.png -------------------------------------------------------------------------------- /src/gui/images/osd_mic_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/osd_mic_on.png -------------------------------------------------------------------------------- /src/gui/images/package_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/package_network.png -------------------------------------------------------------------------------- /src/gui/images/package_system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/package_system.png -------------------------------------------------------------------------------- /src/gui/images/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/password.png -------------------------------------------------------------------------------- /src/gui/images/penguin-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/penguin-small.png -------------------------------------------------------------------------------- /src/gui/images/penguin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/penguin.png -------------------------------------------------------------------------------- /src/gui/images/penguin_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/penguin_big.png -------------------------------------------------------------------------------- /src/gui/images/popup_incoming_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/popup_incoming_answer.png -------------------------------------------------------------------------------- /src/gui/images/popup_incoming_reject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/popup_incoming_reject.png -------------------------------------------------------------------------------- /src/gui/images/presence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/presence.png -------------------------------------------------------------------------------- /src/gui/images/presence_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/presence_failed.png -------------------------------------------------------------------------------- /src/gui/images/presence_offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/presence_offline.png -------------------------------------------------------------------------------- /src/gui/images/presence_online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/presence_online.png -------------------------------------------------------------------------------- /src/gui/images/presence_rejected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/presence_rejected.png -------------------------------------------------------------------------------- /src/gui/images/presence_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/presence_unknown.png -------------------------------------------------------------------------------- /src/gui/images/print: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/print -------------------------------------------------------------------------------- /src/gui/images/qt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/qt-logo.png -------------------------------------------------------------------------------- /src/gui/images/redial-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/redial-disabled.png -------------------------------------------------------------------------------- /src/gui/images/redial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/redial.png -------------------------------------------------------------------------------- /src/gui/images/redirect-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/redirect-disabled.png -------------------------------------------------------------------------------- /src/gui/images/redirect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/redirect.png -------------------------------------------------------------------------------- /src/gui/images/redo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/redo -------------------------------------------------------------------------------- /src/gui/images/reg-query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/reg-query.png -------------------------------------------------------------------------------- /src/gui/images/reg_failed-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/reg_failed-disabled.png -------------------------------------------------------------------------------- /src/gui/images/reg_failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/reg_failed.png -------------------------------------------------------------------------------- /src/gui/images/reject-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/reject-disabled.png -------------------------------------------------------------------------------- /src/gui/images/reject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/reject.png -------------------------------------------------------------------------------- /src/gui/images/save_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/save_as.png -------------------------------------------------------------------------------- /src/gui/images/searchfind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/searchfind -------------------------------------------------------------------------------- /src/gui/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/settings.png -------------------------------------------------------------------------------- /src/gui/images/stat_conference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/stat_conference.png -------------------------------------------------------------------------------- /src/gui/images/stat_established.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/stat_established.png -------------------------------------------------------------------------------- /src/gui/images/stat_established_nomedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/stat_established_nomedia.png -------------------------------------------------------------------------------- /src/gui/images/stat_mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/stat_mute.png -------------------------------------------------------------------------------- /src/gui/images/stat_outgoing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/stat_outgoing.png -------------------------------------------------------------------------------- /src/gui/images/stat_ringing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/stat_ringing.png -------------------------------------------------------------------------------- /src/gui/images/sys_auto_ans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_auto_ans.png -------------------------------------------------------------------------------- /src/gui/images/sys_auto_ans_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_auto_ans_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_busy_estab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_busy_estab.png -------------------------------------------------------------------------------- /src/gui/images/sys_busy_estab_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_busy_estab_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_busy_trans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_busy_trans.png -------------------------------------------------------------------------------- /src/gui/images/sys_busy_trans_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_busy_trans_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_dnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_dnd.png -------------------------------------------------------------------------------- /src/gui/images/sys_dnd_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_dnd_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_encrypted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_encrypted.png -------------------------------------------------------------------------------- /src/gui/images/sys_encrypted_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_encrypted_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_encrypted_verified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_encrypted_verified.png -------------------------------------------------------------------------------- /src/gui/images/sys_encrypted_verified_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_encrypted_verified_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_hold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_hold.png -------------------------------------------------------------------------------- /src/gui/images/sys_hold_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_hold_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_idle.png -------------------------------------------------------------------------------- /src/gui/images/sys_idle_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_idle_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_missed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_missed.png -------------------------------------------------------------------------------- /src/gui/images/sys_missed_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_missed_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_mute.png -------------------------------------------------------------------------------- /src/gui/images/sys_mute_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_mute_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_mwi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_mwi.png -------------------------------------------------------------------------------- /src/gui/images/sys_mwi_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_mwi_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_redir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_redir.png -------------------------------------------------------------------------------- /src/gui/images/sys_redir_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_redir_dis.png -------------------------------------------------------------------------------- /src/gui/images/sys_services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_services.png -------------------------------------------------------------------------------- /src/gui/images/sys_services_dis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/sys_services_dis.png -------------------------------------------------------------------------------- /src/gui/images/telephone-hook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/telephone-hook.png -------------------------------------------------------------------------------- /src/gui/images/transfer-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/transfer-disabled.png -------------------------------------------------------------------------------- /src/gui/images/transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/transfer.png -------------------------------------------------------------------------------- /src/gui/images/twinkle16-disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/twinkle16-disabled.png -------------------------------------------------------------------------------- /src/gui/images/twinkle16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/twinkle16.png -------------------------------------------------------------------------------- /src/gui/images/twinkle24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/twinkle24.png -------------------------------------------------------------------------------- /src/gui/images/twinkle32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/twinkle32.png -------------------------------------------------------------------------------- /src/gui/images/twinkle48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/twinkle48.png -------------------------------------------------------------------------------- /src/gui/images/undo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/undo -------------------------------------------------------------------------------- /src/gui/images/yast_PhoneTTOffhook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/yast_PhoneTTOffhook.png -------------------------------------------------------------------------------- /src/gui/images/yast_babelfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LubosD/twinkle/e067dcba28f4e2acd7f71b875fc4168e9706aaaa/src/gui/images/yast_babelfish.png -------------------------------------------------------------------------------- /src/gui/incoming_call_popup.h: -------------------------------------------------------------------------------- 1 | #ifndef T_INCOMING_CALL_POPUP_H 2 | #define T_INCOMING_CALL_POPUP_H 3 | 4 | #include 5 | #include 6 | 7 | class IncomingCallPopup : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit IncomingCallPopup(QObject *parent = 0); 12 | virtual ~IncomingCallPopup(); 13 | 14 | void setCallerName(const QString& name); 15 | void show(); 16 | void hide(); 17 | void setVisible(bool v) { if (v) show(); else hide(); } 18 | void move(int x, int y); 19 | 20 | private: 21 | void positionWindow(); 22 | signals: 23 | void answerClicked(); 24 | void rejectClicked(); 25 | public slots: 26 | void onAnswerClicked(); 27 | void onRejectClicked(); 28 | void saveState(); 29 | private: 30 | QQuickView* m_view; 31 | QQuickItem* m_callerText; 32 | }; 33 | 34 | #endif // T_INCOMING_CALL_POPUP_H 35 | -------------------------------------------------------------------------------- /src/gui/inviteform.h: -------------------------------------------------------------------------------- 1 | #ifndef INVITEFORM_UI_H 2 | #define INVITEFORM_UI_H 3 | #include "ui_inviteform.h" 4 | #include "sockets/url.h" 5 | #include "getaddressform.h" 6 | #include "user.h" 7 | #include "phone.h" 8 | #include 9 | 10 | class t_phone; 11 | extern t_phone *phone; 12 | 13 | class InviteForm : public QDialog, public Ui::InviteForm 14 | { 15 | Q_OBJECT 16 | public: 17 | InviteForm(QWidget *parent); 18 | ~InviteForm(); 19 | public slots: 20 | void clear(); 21 | void show( t_user * user_config, const QString & dest, const QString & subject, bool anonymous ); 22 | void validate(); 23 | void addToInviteComboBox( const QString & destination ); 24 | void reject(); 25 | void closeEvent( QCloseEvent * ); 26 | void showAddressBook(); 27 | void selectedAddress( const QString & address ); 28 | void warnHideUser( void ); 29 | signals: 30 | void destination(t_user *, const QString &, const t_url &, const QString &, bool); 31 | void raw_destination(const QString &); 32 | private: 33 | void init(); 34 | void destroy(); 35 | 36 | GetAddressForm *getAddressForm; 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/gui/logviewform.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGVIEWFORM_H 2 | #define LOGVIEWFORM_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "ui_logviewform.h" 9 | 10 | class LogViewForm : public QDialog, protected Ui::LogViewForm 11 | { 12 | Q_OBJECT 13 | 14 | private: 15 | QFile* logfile; 16 | QTextStream* logstream; 17 | 18 | bool isOnBottom() const; 19 | public slots: 20 | void scrollToBottom(); 21 | 22 | public: 23 | LogViewForm(QWidget* parent = 0); 24 | ~LogViewForm(); 25 | 26 | public slots: 27 | void show(); 28 | void closeEvent(QCloseEvent* ev); 29 | void update(bool log_zapped); 30 | void clear(); 31 | 32 | }; 33 | 34 | #endif // LOGVIEWFORM_H 35 | -------------------------------------------------------------------------------- /src/gui/numberconversionform.h: -------------------------------------------------------------------------------- 1 | #ifndef NUMBERCONVERSIONFORM_H 2 | #define NUMBERCONVERSIONFORM_H 3 | 4 | #include 5 | #include "ui_numberconversionform.h" 6 | 7 | class NumberConversionForm : public QDialog, private Ui::NumberConversionForm 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | NumberConversionForm(QWidget* parent = 0); 13 | ~NumberConversionForm(); 14 | 15 | int exec(QString& expr, QString& replace); 16 | 17 | public slots: 18 | void validate(); 19 | 20 | private: 21 | void init(); 22 | }; 23 | 24 | #endif // NUMBERCONVERSIONFORM_H 25 | -------------------------------------------------------------------------------- /src/gui/osd.h: -------------------------------------------------------------------------------- 1 | #ifndef OSD_H 2 | #define OSD_H 3 | #include 4 | #include 5 | 6 | // Must use forward declaration, otherwise build fails 7 | // due to double QMetaTypeID definition (wtf). 8 | // Hence I also cannot inherit from OSD_VIEWCLASS... 9 | class QQuickView; 10 | class QQuickItem; 11 | 12 | class OSD : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | OSD(QObject* parent = 0); 17 | ~OSD(); 18 | 19 | void setCaller(const QString& text); 20 | void setTime(const QString& timeText); 21 | void setMuted(bool muted); 22 | 23 | void move(int x, int y); 24 | void show(); 25 | void hide(); 26 | int width() const; 27 | int height() const; 28 | void setVisible(bool v) { if (v) show(); else hide(); } 29 | 30 | private: 31 | void positionWindow(); 32 | public slots: 33 | void onHangupClicked(); 34 | void onMuteClicked(); 35 | void saveState(); 36 | 37 | signals: 38 | void hangupClicked(); 39 | void muteClicked(); 40 | 41 | private: 42 | QQuickView* m_view; 43 | QQuickItem* m_caller; 44 | QQuickItem* m_time; 45 | QQuickItem* m_mute; 46 | }; 47 | 48 | #endif // OSD_H 49 | -------------------------------------------------------------------------------- /src/gui/qml/ImageButton.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | Rectangle { 4 | 5 | property alias image: img.source 6 | signal clicked 7 | 8 | color: "transparent" 9 | z: 2 10 | 11 | MouseArea { 12 | id: mouseArea 13 | anchors.fill: parent 14 | onClicked: parent.clicked() 15 | } 16 | 17 | Image { 18 | id: img 19 | smooth: true 20 | anchors.fill: parent 21 | } 22 | 23 | states: State { 24 | name: "pressed"; when: mouseArea.pressed 25 | PropertyChanges { target: img; anchors.topMargin: 2; anchors.bottomMargin: -2 } 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/gui/qml/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ImageButton.qml 4 | osd.qml 5 | TextImageButton.qml 6 | incoming_call.qml 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/gui/qt_translator.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _QT_TRANSLATOR_H 19 | #define _QT_TRANSLATOR_H 20 | 21 | #include 22 | #include "translator.h" 23 | 24 | // This class provides the translation service from Qt to the 25 | // core of Twinkle. 26 | class t_qt_translator : public t_translator { 27 | public: 28 | t_qt_translator(QApplication *qa) : _qa(qa) {}; 29 | 30 | virtual string translate(const string &s) { 31 | return _qa->translate("TwinkleCore", s.c_str()).toStdString(); 32 | }; 33 | 34 | virtual string translate2(const string &context, const string &s) { 35 | return _qa->translate(context.c_str(), s.c_str()).toStdString(); 36 | }; 37 | 38 | private: 39 | QApplication *_qa; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gui/redirectform.h: -------------------------------------------------------------------------------- 1 | #ifndef REDIRECTFORM_UI_H 2 | #define REDIRECTFORM_UI_H 3 | #include "ui_redirectform.h" 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include "getaddressform.h" 20 | #include "sockets/url.h" 21 | #include "user.h" 22 | 23 | 24 | class RedirectForm : public QDialog, public Ui::RedirectForm 25 | { 26 | Q_OBJECT 27 | 28 | public: 29 | RedirectForm(QWidget* parent = 0); 30 | ~RedirectForm(); 31 | 32 | public slots: 33 | virtual void show( t_user * user, const list & contacts ); 34 | virtual void validate(); 35 | virtual void showAddressBook(); 36 | virtual void showAddressBook1(); 37 | virtual void showAddressBook2(); 38 | virtual void showAddressBook3(); 39 | virtual void selectedAddress( const QString & address ); 40 | 41 | signals: 42 | void destinations(const list &); 43 | 44 | protected slots: 45 | virtual void languageChange(); 46 | 47 | private: 48 | GetAddressForm *getAddressForm; 49 | int nrAddressBook; 50 | t_user *user_config; 51 | 52 | void init(); 53 | void destroy(); 54 | 55 | }; 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/gui/selectnicform.h: -------------------------------------------------------------------------------- 1 | #ifndef SELECTNICFORM_H 2 | #define SELECTNICFORM_H 3 | #include 4 | #include "ui_selectnicform.h" 5 | 6 | class SelectNicForm : public QDialog, public Ui::SelectNicForm 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | SelectNicForm(QWidget* parent = 0); 12 | ~SelectNicForm(); 13 | 14 | public slots: 15 | virtual void setAsDefault( bool setIp ); 16 | virtual void setAsDefaultIp(); 17 | virtual void setAsDefaultNic(); 18 | 19 | protected slots: 20 | virtual void languageChange(); 21 | 22 | private: 23 | int idxDefault; 24 | 25 | void init(); 26 | 27 | }; 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/gui/selectuserform.h: -------------------------------------------------------------------------------- 1 | #ifndef SELECTUSERFORM_H 2 | #define SELECTUSERFORM_H 3 | class t_phone; 4 | extern t_phone *phone; 5 | 6 | #include "gui.h" 7 | #include "phone.h" 8 | #include "user.h" 9 | #include "ui_selectuserform.h" 10 | 11 | class SelectUserForm : public QDialog, public Ui::SelectUserForm 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | SelectUserForm(QWidget* parent = 0); 17 | ~SelectUserForm(); 18 | 19 | public slots: 20 | virtual void show( t_select_purpose purpose ); 21 | virtual void validate(); 22 | virtual void selectAll(); 23 | virtual void clearAll(); 24 | virtual void toggle( QModelIndex item ); 25 | 26 | signals: 27 | void selection(list); 28 | void not_selected(list); 29 | 30 | protected slots: 31 | virtual void languageChange(); 32 | 33 | private: 34 | void init(); 35 | 36 | }; 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/gui/sendfileform.h: -------------------------------------------------------------------------------- 1 | #ifndef SENDFILEFORM_H 2 | #define SENDFILEFORM_H 3 | #include "ui_sendfileform.h" 4 | 5 | class SendFileForm : public QDialog, public Ui::SendFileForm 6 | { 7 | Q_OBJECT 8 | 9 | public: 10 | SendFileForm(QWidget* parent = 0); 11 | ~SendFileForm(); 12 | 13 | public slots: 14 | virtual void signalSelectedInfo(); 15 | virtual void chooseFile(); 16 | virtual void setFilename(); 17 | 18 | signals: 19 | void selected(const QString &filename, const QString &subject); 20 | 21 | protected slots: 22 | virtual void languageChange(); 23 | 24 | private: 25 | QDialog *_chooseFileDialog; 26 | 27 | void init(); 28 | void destroy(); 29 | 30 | }; 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/gui/syssettingsform.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSSETTINGSFORM_H 2 | #define SYSSETTINGSFORM_H 3 | 4 | #include "sys_settings.h" 5 | #include 6 | #include "ui_syssettingsform.h" 7 | 8 | class SysSettingsForm : public QDialog, public Ui::SysSettingsForm 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | SysSettingsForm(QWidget* parent = 0); 14 | ~SysSettingsForm(); 15 | 16 | virtual string comboItem2audio_dev( QString item, QLineEdit * qleOther, bool playback ); 17 | 18 | public slots: 19 | virtual void showCategory( int index ); 20 | virtual void populateComboBox( QComboBox * cb, const QString & s ); 21 | virtual void populate(); 22 | virtual void validate(); 23 | virtual void show(); 24 | virtual int exec(); 25 | virtual void chooseRingtone(); 26 | virtual void chooseRingback(); 27 | virtual void devRingtoneSelected( int idx ); 28 | virtual void devSpeakerSelected( int idx ); 29 | virtual void devMicSelected( int idx ); 30 | virtual void playRingToneCheckBoxToggles( bool on ); 31 | virtual void playRingBackToneCheckBoxToggles( bool on ); 32 | 33 | signals: 34 | void inhibitIdleSessionChanged(); 35 | void sipUdpPortChanged(); 36 | void rtpPortChanged(); 37 | 38 | protected slots: 39 | virtual void languageChange(); 40 | 41 | private: 42 | int idxOtherCaptureDevOss; 43 | int idxOtherCaptureDevAlsa; 44 | int idxOtherPlaybackDevOss; 45 | int idxOtherPlaybackDevAlsa; 46 | list list_audio_playback_dev; 47 | list list_audio_capture_dev; 48 | 49 | void init(); 50 | 51 | }; 52 | 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/gui/termcapform.h: -------------------------------------------------------------------------------- 1 | #ifndef TERMCAPFORM_H 2 | #define TERMCAPFORM_H 3 | #include "ui_termcapform.h" 4 | #include "getaddressform.h" 5 | #include "phone.h" 6 | #include "sockets/url.h" 7 | #include "user.h" 8 | 9 | class t_phone; 10 | extern t_phone *phone; 11 | 12 | class TermCapForm : public QDialog, public Ui::TermCapForm 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | TermCapForm(QWidget* parent = 0); 18 | ~TermCapForm(); 19 | 20 | public slots: 21 | virtual void show( t_user * user_config, const QString & dest ); 22 | virtual void validate(); 23 | virtual void showAddressBook(); 24 | virtual void selectedAddress( const QString & address ); 25 | 26 | signals: 27 | void destination(t_user *, const t_url &); 28 | 29 | protected slots: 30 | virtual void languageChange(); 31 | 32 | private: 33 | GetAddressForm *getAddressForm; 34 | 35 | void init(); 36 | void destroy(); 37 | 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gui/transferform.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSFERFORM_H 2 | #define TRANSFERFORM_H 3 | class t_phone; 4 | extern t_phone *phone; 5 | 6 | #include "getaddressform.h" 7 | #include "phone.h" 8 | #include "protocol.h" 9 | #include 10 | #include "sockets/url.h" 11 | #include "user.h" 12 | #include "ui_transferform.h" 13 | 14 | class TransferForm : public QDialog, public Ui::TransferForm 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | TransferForm(QWidget* parent = 0); 20 | ~TransferForm(); 21 | 22 | public slots: 23 | virtual void initTransferOptions(); 24 | virtual void show( t_user * user ); 25 | virtual void show( t_user * user, const string & dest, t_transfer_type transfer_type ); 26 | virtual void hide(); 27 | virtual void reject(); 28 | virtual void validate(); 29 | virtual void closeEvent( QCloseEvent * ); 30 | virtual void showAddressBook(); 31 | virtual void selectedAddress( const QString & address ); 32 | virtual void setOtherLineAddress( bool on ); 33 | 34 | signals: 35 | void destination(const t_display_url&, t_transfer_type); 36 | 37 | protected slots: 38 | virtual void languageChange(); 39 | 40 | private: 41 | int consult_line; 42 | t_user *user_config; 43 | GetAddressForm *getAddressForm; 44 | QString previousAddress; 45 | 46 | void init(); 47 | void destroy(); 48 | 49 | }; 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gui/twinkle-uri-handler: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Invoke Twinkle, relaying an optional URI to call (sip:, sips:, tel: or 4 | # callto:) passed as argument. This is mostly meant to be used with a desktop 5 | # entry, since a URI may be present or not, and Twinkle must be invoked 6 | # differently in each case. (That, and it currently cannot handle URIs in the 7 | # first place.) 8 | 9 | # Command to run (with optional arguments, if needed) 10 | TWINKLE="twinkle" 11 | 12 | if [ $# -gt 1 ]; then 13 | echo "Usage: $0 [URI]" >&2 14 | exit 1 15 | fi 16 | 17 | if [ $# -eq 0 ]; then 18 | # No arguments, invoke Twinkle as-is 19 | exec $TWINKLE 20 | else 21 | # Convert a URI into a proper `--call` parameter 22 | case "$1" in 23 | sip:* | sips:*) 24 | CALL_ARG="$1" 25 | ;; 26 | tel:*) 27 | CALL_ARG="${1#tel:}" 28 | ;; 29 | callto:*) 30 | CALL_ARG="${1#callto:}" 31 | ;; 32 | *) 33 | echo "Unrecognized URI: $1" >&2 34 | exit 1 35 | ;; 36 | esac 37 | exec $TWINKLE --call "$CALL_ARG" 38 | fi 39 | -------------------------------------------------------------------------------- /src/gui/twinkleapplication.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _TWINKLEAPPLICATION_H 19 | #define _TWINKLEAPPLICATION_H 20 | 21 | #include "twinkle_config.h" 22 | 23 | #ifdef HAVE_KDE 24 | #include 25 | #else 26 | #include 27 | #endif 28 | 29 | #ifdef HAVE_KDE 30 | class t_twinkle_application : public KApplication { 31 | #else 32 | class t_twinkle_application : public QApplication { 33 | #endif 34 | public: 35 | #ifdef HAVE_KDE 36 | t_twinkle_application(); 37 | #else 38 | t_twinkle_application(int &argc, char **argv); 39 | #endif 40 | virtual void commitData ( QSessionManager &sm ); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gui/wizardform.h: -------------------------------------------------------------------------------- 1 | #ifndef WIZARDFORM_H 2 | #define WIZARDFORM_H 3 | 4 | struct t_provider; 5 | 6 | #include 7 | #include "user.h" 8 | #include "ui_wizardform.h" 9 | 10 | class WizardForm : public QDialog, public Ui::WizardForm 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | WizardForm(QWidget* parent = 0); 16 | ~WizardForm(); 17 | 18 | virtual void show( t_user * user ); 19 | 20 | public slots: 21 | virtual void initProviders(); 22 | virtual int exec( t_user * user ); 23 | virtual void update( const QString & item ); 24 | virtual void updateAuthName( const QString & s ); 25 | virtual void disableSuggestAuthName(); 26 | virtual void validate(); 27 | 28 | signals: 29 | void success(); 30 | 31 | protected slots: 32 | virtual void languageChange(); 33 | 34 | private: 35 | bool suggestAuthName; 36 | std::map mapProviders; 37 | t_user *user_config; 38 | 39 | void init(); 40 | 41 | }; 42 | 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/id_object.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "id_object.h" 19 | 20 | // Initialization of static members 21 | t_mutex t_id_object::mtx_next_id; 22 | t_object_id t_id_object::next_id = 1; 23 | 24 | t_id_object::t_id_object() { 25 | mtx_next_id.lock(); 26 | id = next_id++; 27 | if (next_id == 65535) next_id = 1; 28 | mtx_next_id.unlock(); 29 | } 30 | 31 | t_object_id t_id_object::get_object_id() { 32 | return id; 33 | } 34 | 35 | void t_id_object::generate_new_id() { 36 | mtx_next_id.lock(); 37 | id = next_id++; 38 | if (next_id == 65535) next_id = 1; 39 | mtx_next_id.unlock(); 40 | } 41 | -------------------------------------------------------------------------------- /src/im/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-im) 2 | 3 | set(LIBTWINKLE_IM-SRCS 4 | im_iscomposing_body.cpp 5 | msg_session.cpp 6 | ) 7 | 8 | add_library(libtwinkle-im OBJECT ${LIBTWINKLE_IM-SRCS}) 9 | -------------------------------------------------------------------------------- /src/listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /** 19 | * @file 20 | * Network listener threads 21 | */ 22 | 23 | #ifndef _H_LISTENER 24 | #define _H_LISTENER 25 | 26 | /** Thread listening on SIP UDP port */ 27 | void *listen_udp(void *arg); 28 | 29 | /** Thread listening on established TCP connections */ 30 | void *listen_for_data_tcp(void *arg); 31 | 32 | /** Thread listening for incoming TCP connection requests */ 33 | void *listen_for_conn_requests_tcp(void *arg); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/mwi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-mwi) 2 | 3 | set(LIBTWINKLE_MWI-SRCS 4 | mwi.cpp 5 | mwi_dialog.cpp 6 | mwi_subscription.cpp 7 | simple_msg_sum_body.cpp 8 | ) 9 | 10 | add_library(libtwinkle-mwi OBJECT ${LIBTWINKLE_MWI-SRCS}) 11 | -------------------------------------------------------------------------------- /src/mwi/mwi_dialog.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "mwi_dialog.h" 19 | 20 | #include "mwi_subscription.h" 21 | #include "phone_user.h" 22 | #include "audits/memman.h" 23 | 24 | t_mwi_dialog::t_mwi_dialog(t_phone_user *_phone_user) : 25 | t_subscription_dialog(_phone_user) 26 | { 27 | subscription = new t_mwi_subscription(this, &(phone_user->mwi)); 28 | MEMMAN_NEW(subscription); 29 | } 30 | 31 | t_mwi_dialog *t_mwi_dialog::copy(void) { 32 | // Copy is not needed. 33 | assert(false); 34 | return NULL; 35 | } 36 | -------------------------------------------------------------------------------- /src/mwi/mwi_dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _MWI_DIALOG_H 19 | #define _MWI_DIALOG_H 20 | 21 | #include "mwi.h" 22 | #include "subscription_dialog.h" 23 | 24 | // Forward declaration 25 | class t_phone_user; 26 | 27 | class t_mwi_dialog : public t_subscription_dialog { 28 | public: 29 | t_mwi_dialog(t_phone_user *_phone_user); 30 | 31 | virtual t_mwi_dialog *copy(void); 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/mwi/mwi_subscription.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RFC 3842 19 | // message-summary subscription 20 | 21 | #ifndef _MWI_SUBSCRIPTION_H 22 | #define _MWI_SUBSCRIPTION_H 23 | 24 | #include "mwi.h" 25 | #include "mwi_dialog.h" 26 | #include "subscription.h" 27 | 28 | class t_mwi_subscription : public t_subscription { 29 | private: 30 | t_mwi *mwi; 31 | 32 | protected: 33 | virtual t_request *create_subscribe(unsigned long expires) const; 34 | 35 | public: 36 | t_mwi_subscription(t_mwi_dialog *_dialog, t_mwi *_mwi); 37 | 38 | virtual bool recv_notify(t_request *r, t_tuid tuid, t_tid tid); 39 | virtual bool recv_subscribe_response(t_response *r, t_tuid tuid, t_tid tid); 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/parser/coding.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "coding.h" 19 | #include "util.h" 20 | 21 | t_coding::t_coding() { 22 | q = 1.0; 23 | } 24 | 25 | t_coding::t_coding(const string &s) { 26 | q = 1.0; 27 | content_coding = s; 28 | } 29 | 30 | string t_coding::encode(void) const { 31 | string s; 32 | 33 | s = content_coding; 34 | 35 | if (q != 1.0) { 36 | s += ";q="; 37 | s += float2str(q, 1); 38 | } 39 | 40 | return s; 41 | } 42 | -------------------------------------------------------------------------------- /src/parser/coding.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Content coding type 19 | 20 | #ifndef _CODING_H 21 | #define _CODING_H 22 | 23 | #include 24 | 25 | using namespace std; 26 | 27 | class t_coding { 28 | public: 29 | string content_coding; 30 | float q; // quality factor; 31 | 32 | t_coding(); 33 | t_coding(const string &s); 34 | 35 | string encode(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_accept.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_accept.h" 19 | #include "definitions.h" 20 | 21 | t_hdr_accept::t_hdr_accept() : t_header("Accept") {}; 22 | 23 | void t_hdr_accept::add_media(const t_media &media) { 24 | populated = true; 25 | media_list.push_back(media); 26 | } 27 | 28 | void t_hdr_accept::set_empty(void) { 29 | populated = true; 30 | media_list.clear(); 31 | } 32 | 33 | string t_hdr_accept::encode_value(void) const { 34 | string s; 35 | 36 | if (!populated) return s; 37 | 38 | for (list::const_iterator i = media_list.begin(); 39 | i != media_list.end(); i++) 40 | { 41 | if (i != media_list.begin()) s += ","; 42 | s += i->encode(); 43 | } 44 | 45 | return s; 46 | } 47 | -------------------------------------------------------------------------------- /src/parser/hdr_accept.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Accept header 19 | 20 | #ifndef _HDR_ACCEPT_H 21 | #define _HDR_ACCEPT_H 22 | 23 | #include 24 | #include "header.h" 25 | #include "media_type.h" 26 | 27 | class t_hdr_accept : public t_header { 28 | public: 29 | list media_list; // list of accepted media 30 | 31 | t_hdr_accept(); 32 | 33 | // Add a media to the list of accepted media 34 | void add_media(const t_media &media); 35 | 36 | // Clear the list of features, but make the header 'populated'. 37 | // An empty header will be in the message. 38 | void set_empty(void); 39 | 40 | string encode_value(void) const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/parser/hdr_accept_encoding.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_accept_encoding.h" 19 | #include "definitions.h" 20 | 21 | t_hdr_accept_encoding::t_hdr_accept_encoding() : t_header("Accept-Encoding") {}; 22 | 23 | void t_hdr_accept_encoding::add_coding(const t_coding &coding) { 24 | populated = true; 25 | coding_list.push_back(coding); 26 | } 27 | 28 | string t_hdr_accept_encoding::encode_value(void) const { 29 | string s; 30 | 31 | if (!populated) return s; 32 | 33 | for (list::const_iterator i = coding_list.begin(); 34 | i != coding_list.end(); i++) 35 | { 36 | if (i != coding_list.begin()) s += ","; 37 | s += i->encode(); 38 | } 39 | 40 | return s; 41 | } 42 | -------------------------------------------------------------------------------- /src/parser/hdr_accept_encoding.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Accept-Encoding header 19 | 20 | #ifndef _HDR_ACCEPT_ENCODING_H 21 | #define _HDR_ACCEPT_ENCODING_H 22 | 23 | #include 24 | #include 25 | #include "coding.h" 26 | #include "header.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_accept_encoding : public t_header { 31 | public: 32 | list coding_list; // list of content codings; 33 | 34 | t_hdr_accept_encoding(); 35 | 36 | // Add a coding to the list of content codings 37 | void add_coding(const t_coding &coding); 38 | 39 | string encode_value(void) const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/parser/hdr_allow.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Allow header 19 | 20 | #ifndef _HDR_ALLOW_H 21 | #define _HDR_ALLOW_H 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | #include "definitions.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_allow : public t_header { 31 | public: 32 | list method_list; 33 | 34 | // Unknown methods are represented as strings 35 | list unknown_methods; 36 | 37 | t_hdr_allow(); 38 | void add_method(const t_method &m, const string &unknown = ""); 39 | void add_method(const string &s); 40 | bool contains_method(const t_method &m) const; 41 | string encode_value(void) const; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/parser/hdr_allow_events.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_allow_events.h" 19 | #include "parse_ctrl.h" 20 | 21 | t_hdr_allow_events::t_hdr_allow_events() : t_header("Allow-Events", "u") {} 22 | 23 | void t_hdr_allow_events::add_event_type(const string &t) { 24 | populated = true; 25 | event_types.push_back(t); 26 | } 27 | 28 | string t_hdr_allow_events::encode_value(void) const { 29 | string s; 30 | 31 | if (!populated) return s; 32 | 33 | for (list::const_iterator i = event_types.begin(); 34 | i != event_types.end(); i++) 35 | { 36 | if (i != event_types.begin()) s += ","; 37 | s += *i; 38 | } 39 | 40 | return s; 41 | } 42 | -------------------------------------------------------------------------------- /src/parser/hdr_allow_events.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Allow-Events header 19 | // RFC 3265 20 | 21 | #ifndef _HDR_ALLOW_EVENTS 22 | #define _HDR_ALLOW_EVENTS 23 | 24 | #include 25 | #include 26 | #include "header.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_allow_events : public t_header { 31 | public: 32 | list event_types; 33 | 34 | t_hdr_allow_events(); 35 | void add_event_type(const string &t); 36 | 37 | string encode_value(void) const; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/parser/hdr_auth_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Authentication-Info header 19 | 20 | #ifndef _HDR_AUTH_INFO_H 21 | #define _HDR_AUTH_INFO_H 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_auth_info : public t_header { 29 | public: 30 | string next_nonce; 31 | string message_qop; 32 | string response_auth; 33 | string cnonce; 34 | unsigned long nonce_count; 35 | 36 | t_hdr_auth_info(); 37 | 38 | void set_next_nonce(const string &nn); 39 | void set_message_qop(const string &mq); 40 | void set_response_auth(const string &ra); 41 | void set_cnonce(const string &cn); 42 | void set_nonce_count(const unsigned long &nc); 43 | string encode_value(void) const; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/parser/hdr_call_id.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_call_id.h" 19 | #include "definitions.h" 20 | #include "parse_ctrl.h" 21 | 22 | t_hdr_call_id::t_hdr_call_id() : t_header("Call-ID", "i") {}; 23 | 24 | void t_hdr_call_id::set_call_id(const string &id) { 25 | populated = true; 26 | call_id = id; 27 | } 28 | 29 | string t_hdr_call_id::encode_value(void) const { 30 | if (!populated) return ""; 31 | return call_id; 32 | } 33 | -------------------------------------------------------------------------------- /src/parser/hdr_call_id.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Call-ID header 19 | 20 | #ifndef _HDR_CALL_ID_H 21 | #define _HDR_CALL_ID_H 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_call_id : public t_header { 29 | public: 30 | string call_id; 31 | 32 | t_hdr_call_id(); 33 | void set_call_id(const string &id); 34 | string encode_value(void) const; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/parser/hdr_content_encoding.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_content_encoding.h" 19 | #include "definitions.h" 20 | #include "parse_ctrl.h" 21 | 22 | t_hdr_content_encoding::t_hdr_content_encoding() : t_header("Content-Encoding", "e") {}; 23 | 24 | void t_hdr_content_encoding::add_coding(const t_coding &coding) { 25 | populated = true; 26 | coding_list.push_back(coding); 27 | } 28 | 29 | string t_hdr_content_encoding::encode_value(void) const { 30 | string s; 31 | 32 | if (!populated) return s; 33 | 34 | for (list::const_iterator i = coding_list.begin(); 35 | i != coding_list.end(); i++) 36 | { 37 | if (i != coding_list.begin()) s += ", "; 38 | s += i->encode(); 39 | } 40 | 41 | return s; 42 | } 43 | -------------------------------------------------------------------------------- /src/parser/hdr_content_encoding.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Content-Encoding header 19 | 20 | #ifndef _HDR_CONTENT_ENCODING_H 21 | #define _HDR_CONTENT_ENCODING_H 22 | 23 | #include 24 | #include 25 | #include "coding.h" 26 | #include "header.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_content_encoding : public t_header { 31 | public: 32 | list coding_list; // list of content codings; 33 | 34 | t_hdr_content_encoding(); 35 | 36 | // Add a coding to the list of content codings 37 | void add_coding(const t_coding &coding); 38 | 39 | string encode_value(void) const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/parser/hdr_content_language.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_content_language.h" 20 | #include "util.h" 21 | 22 | t_hdr_content_language::t_hdr_content_language() : t_header("Content-Language") {}; 23 | 24 | void t_hdr_content_language::add_language(const t_language &language) { 25 | populated = true; 26 | language_list.push_back(language); 27 | } 28 | 29 | string t_hdr_content_language::encode_value(void) const { 30 | string s; 31 | 32 | if (!populated) return s; 33 | 34 | for (list::const_iterator i = language_list.begin(); 35 | i != language_list.end(); i++) 36 | { 37 | if (i != language_list.begin()) s += ", "; 38 | s += i->encode(); 39 | } 40 | 41 | return s; 42 | } 43 | -------------------------------------------------------------------------------- /src/parser/hdr_content_language.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Content_Language header 19 | 20 | #ifndef _HDR_CONTENT_LANGUAGE_H 21 | #define _HDR_CONTENT_LANGUAGE_H 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | #include "hdr_accept_language.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_content_language : public t_header { 31 | public: 32 | list language_list; // list of languages 33 | 34 | t_hdr_content_language(); 35 | 36 | // Add a language to the list of languages 37 | void add_language(const t_language &language); 38 | 39 | string encode_value(void) const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/parser/hdr_content_length.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_content_length.h" 20 | #include "parse_ctrl.h" 21 | #include "util.h" 22 | 23 | t_hdr_content_length::t_hdr_content_length() : t_header("Content-Length", "l") { 24 | length = 0; 25 | } 26 | 27 | void t_hdr_content_length::set_length(unsigned long l) { 28 | populated = true; 29 | length = l; 30 | } 31 | 32 | string t_hdr_content_length::encode_value(void) const { 33 | string s; 34 | 35 | if (!populated) return s; 36 | 37 | s = ulong2str(length); 38 | return s; 39 | } 40 | -------------------------------------------------------------------------------- /src/parser/hdr_content_length.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Content-Length header 19 | 20 | #ifndef _HDR_CONTENT_LENGTH 21 | #define _HDR_CONTENT_LENGTH 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_content_length : public t_header { 29 | public: 30 | unsigned long length; 31 | 32 | t_hdr_content_length(); 33 | void set_length(unsigned long l); 34 | 35 | string encode_value(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_content_type.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_content_type.h" 19 | #include "definitions.h" 20 | #include "parse_ctrl.h" 21 | 22 | t_hdr_content_type::t_hdr_content_type() : t_header("Content-Type", "c") {}; 23 | 24 | void t_hdr_content_type::set_media(const t_media &m) { 25 | populated = true; 26 | media = m; 27 | } 28 | 29 | string t_hdr_content_type::encode_value(void) const { 30 | string s; 31 | 32 | if (!populated) return s; 33 | 34 | s = media.encode(); 35 | return s; 36 | } 37 | -------------------------------------------------------------------------------- /src/parser/hdr_content_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Content-Type header 19 | 20 | #ifndef _HDR_CONTENT_TYPE_H 21 | #define _HDR_CONTENT_TYPE_H 22 | 23 | #include "header.h" 24 | #include "media_type.h" 25 | 26 | class t_hdr_content_type : public t_header { 27 | public: 28 | t_media media; 29 | 30 | t_hdr_content_type(); 31 | void set_media(const t_media &m); 32 | string encode_value(void) const; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/parser/hdr_cseq.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // CSeq header 19 | 20 | #ifndef _HDR_CSEQ 21 | #define _HDR_CSEQ 22 | 23 | #include 24 | #include "header.h" 25 | #include "definitions.h" 26 | 27 | using namespace std; 28 | 29 | class t_hdr_cseq : public t_header { 30 | public: 31 | unsigned long seqnr; 32 | t_method method; 33 | string unknown_method; // set if method is UNKNOWN 34 | 35 | t_hdr_cseq(); 36 | void set_seqnr(unsigned long l); 37 | void set_method(t_method m, const string &unknown = ""); 38 | void set_method(const string &s); 39 | 40 | string encode_value(void) const; 41 | 42 | bool operator==(const t_hdr_cseq &h) const; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/parser/hdr_date.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Date header 19 | 20 | #ifndef _HDR_DATE_H 21 | #define _HDR_DATE_H 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | 27 | class t_hdr_date : public t_header { 28 | public: 29 | time_t date; 30 | 31 | t_hdr_date(); 32 | void set_date_gm(struct tm *tm); // set date, tm is GMT 33 | void set_now(void); // Set date/time to current date/time 34 | string encode_value(void) const; 35 | }; 36 | 37 | using namespace std; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/parser/hdr_expires.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_expires.h" 20 | #include "util.h" 21 | 22 | t_hdr_expires::t_hdr_expires() : t_header("Expires") { 23 | time = 0; 24 | } 25 | 26 | void t_hdr_expires::set_time(unsigned long t) { 27 | populated = true; 28 | time = t; 29 | } 30 | 31 | string t_hdr_expires::encode_value(void) const { 32 | if (!populated) return ""; 33 | 34 | return ulong2str(time); 35 | } 36 | -------------------------------------------------------------------------------- /src/parser/hdr_expires.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Expires header 19 | 20 | #ifndef _HDR_EXPIRES_LENGTH 21 | #define _HDR_EXPIRES_LENGTH 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_expires : public t_header { 29 | public: 30 | unsigned long time; // expiry time in seconds 31 | 32 | t_hdr_expires(); 33 | void set_time(unsigned long t); 34 | 35 | string encode_value(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_in_reply_to.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_in_reply_to.h" 19 | #include "definitions.h" 20 | 21 | t_hdr_in_reply_to::t_hdr_in_reply_to() : t_header("In-Reply-To") {}; 22 | 23 | void t_hdr_in_reply_to::add_call_id(const string &id) { 24 | populated = true; 25 | call_ids.push_back(id); 26 | } 27 | 28 | string t_hdr_in_reply_to::encode_value(void) const { 29 | string s; 30 | 31 | if (!populated) return s; 32 | 33 | for (list::const_iterator i = call_ids.begin(); 34 | i != call_ids.end(); i++) 35 | { 36 | if (i != call_ids.begin()) s += ", "; 37 | s += *i; 38 | } 39 | 40 | return s; 41 | } 42 | -------------------------------------------------------------------------------- /src/parser/hdr_in_reply_to.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // In-Reply-To header 19 | 20 | #ifndef _H_HDR_IN_REPLY_TO 21 | #define _H_HDR_IN_REPLY_TO 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | 27 | using namespace std; 28 | 29 | class t_hdr_in_reply_to : public t_header { 30 | public: 31 | list call_ids; 32 | 33 | t_hdr_in_reply_to(); 34 | void add_call_id(const string &id); 35 | string encode_value(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_max_forwards.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_max_forwards.h" 20 | #include "util.h" 21 | 22 | t_hdr_max_forwards::t_hdr_max_forwards() : t_header("Max-Forwards") { 23 | max_forwards = 0; 24 | } 25 | 26 | void t_hdr_max_forwards::set_max_forwards(int m) { 27 | populated = true; 28 | max_forwards = m; 29 | } 30 | 31 | string t_hdr_max_forwards::encode_value(void) const { 32 | if (!populated) return ""; 33 | 34 | return int2str(max_forwards); 35 | } 36 | -------------------------------------------------------------------------------- /src/parser/hdr_max_forwards.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Max-Forwards header 19 | 20 | #ifndef _HDR_MAX_FORWARDS_LENGTH 21 | #define _HDR_MAX_FORWARDS_LENGTH 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_max_forwards : public t_header { 29 | public: 30 | int max_forwards; 31 | 32 | t_hdr_max_forwards(); 33 | void set_max_forwards(int m); 34 | 35 | string encode_value(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_mime_version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_mime_version.h" 20 | 21 | t_hdr_mime_version::t_hdr_mime_version() : t_header("MIME-Version") {}; 22 | 23 | void t_hdr_mime_version::set_version(const string &v) { 24 | populated = true; 25 | version = v; 26 | } 27 | 28 | string t_hdr_mime_version::encode_value(void) const { 29 | if (!populated) return ""; 30 | 31 | return version; 32 | } 33 | -------------------------------------------------------------------------------- /src/parser/hdr_mime_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // MIME-Version header 19 | #ifndef _H_HDR_MIME_VERSION 20 | #define _H_HDR_MIME_VERSION 21 | 22 | #include 23 | #include "header.h" 24 | 25 | using namespace std; 26 | 27 | class t_hdr_mime_version : public t_header { 28 | public: 29 | string version; 30 | 31 | t_hdr_mime_version(); 32 | void set_version(const string &v); 33 | string encode_value(void) const; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/parser/hdr_min_expires.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_min_expires.h" 20 | #include "util.h" 21 | 22 | t_hdr_min_expires::t_hdr_min_expires() : t_header("Min-Expires") { 23 | time = 0; 24 | } 25 | 26 | void t_hdr_min_expires::set_time(unsigned long t) { 27 | populated = true; 28 | time = t; 29 | } 30 | 31 | string t_hdr_min_expires::encode_value(void) const { 32 | if (!populated) return ""; 33 | 34 | return ulong2str(time); 35 | } 36 | -------------------------------------------------------------------------------- /src/parser/hdr_min_expires.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Expires header 19 | 20 | #ifndef _HDR_MIN_EXPIRES_LENGTH 21 | #define _HDR_MIN_EXPIRES_LENGTH 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_min_expires : public t_header { 29 | public: 30 | unsigned long time; // expiry time in seconds 31 | 32 | t_hdr_min_expires(); 33 | void set_time(unsigned long t); 34 | 35 | string encode_value(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_min_se.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | Copyright (C) 2022 Frédéric Brière 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | // Min-SE header (RFC 4028) 20 | 21 | #ifndef _HDR_MIN_SE_H 22 | #define _HDR_MIN_SE_H 23 | 24 | #include 25 | #include 26 | #include "header.h" 27 | #include "parameter.h" 28 | 29 | class t_hdr_min_se : public t_header { 30 | public: 31 | unsigned long time; // expiry time in seconds 32 | list params; 33 | 34 | t_hdr_min_se(); 35 | 36 | void set_time(unsigned long t); 37 | 38 | void add_param(const t_parameter &p); 39 | void set_params(const std::list &l); 40 | 41 | std::string encode_value(void) const; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/parser/hdr_organization.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_organization.h" 20 | 21 | t_hdr_organization::t_hdr_organization() : t_header("Organization") {}; 22 | 23 | void t_hdr_organization::set_name(const string &n) { 24 | populated = true; 25 | name = n; 26 | } 27 | 28 | string t_hdr_organization::encode_value(void) const { 29 | if (!populated) return ""; 30 | 31 | return name; 32 | } 33 | -------------------------------------------------------------------------------- /src/parser/hdr_organization.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Organization header 19 | #ifndef _H_HDR_ORGANIZATION 20 | #define _H_HDR_ORGANIZATION 21 | 22 | #include 23 | #include "header.h" 24 | 25 | using namespace std; 26 | 27 | class t_hdr_organization : public t_header { 28 | public: 29 | string name; 30 | 31 | t_hdr_organization(); 32 | void set_name(const string &n); 33 | string encode_value(void) const; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/parser/hdr_p_asserted_identity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_p_asserted_identity.h" 19 | 20 | t_hdr_p_asserted_identity::t_hdr_p_asserted_identity() : 21 | t_header("P-Asserted-Identity") 22 | {} 23 | 24 | void t_hdr_p_asserted_identity::add_identity(const t_identity &identity) { 25 | populated = true; 26 | identity_list.push_back(identity); 27 | } 28 | 29 | string t_hdr_p_asserted_identity::encode_value(void) const { 30 | string s; 31 | 32 | if (!populated) return s; 33 | 34 | for (list::const_iterator i = identity_list.begin(); 35 | i != identity_list.end(); i++) 36 | { 37 | if (i != identity_list.begin()) s += ','; 38 | s += i->encode(); 39 | } 40 | 41 | return s; 42 | } 43 | -------------------------------------------------------------------------------- /src/parser/hdr_p_asserted_identity.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RFC 3325 9.1 19 | // P-Asserted-Identity header 20 | 21 | #ifndef _H_HDR_P_ASSERTED_IDENTITY 22 | #define _H_HDR_P_ASSERTED_IDENTITY 23 | 24 | #include 25 | #include "header.h" 26 | #include "identity.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_p_asserted_identity : public t_header { 31 | public: 32 | list identity_list; 33 | 34 | t_hdr_p_asserted_identity(); 35 | void add_identity(const t_identity &identity); 36 | 37 | string encode_value(void) const; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/parser/hdr_p_preferred_identity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_p_preferred_identity.h" 19 | 20 | t_hdr_p_preferred_identity::t_hdr_p_preferred_identity() : 21 | t_header("P-Preferred-Identity") 22 | {} 23 | 24 | void t_hdr_p_preferred_identity::add_identity(const t_identity &identity) { 25 | populated = true; 26 | identity_list.push_back(identity); 27 | } 28 | 29 | string t_hdr_p_preferred_identity::encode_value(void) const { 30 | string s; 31 | 32 | if (!populated) return s; 33 | 34 | for (list::const_iterator i = identity_list.begin(); 35 | i != identity_list.end(); i++) 36 | { 37 | if (i != identity_list.begin()) s += ','; 38 | s += i->encode(); 39 | } 40 | 41 | return s; 42 | } 43 | -------------------------------------------------------------------------------- /src/parser/hdr_p_preferred_identity.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RFC 3325 9.2 19 | // P-Preferred-Identity header 20 | 21 | #ifndef _H_HDR_P_PREFERRED_IDENTITY 22 | #define _H_HDR_P_PREFERRED_IDENTITY 23 | 24 | #include 25 | #include "header.h" 26 | #include "identity.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_p_preferred_identity : public t_header { 31 | public: 32 | list identity_list; 33 | 34 | t_hdr_p_preferred_identity(); 35 | void add_identity(const t_identity &identity); 36 | 37 | string encode_value(void) const; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/parser/hdr_priority.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_priority.h" 20 | 21 | t_hdr_priority::t_hdr_priority() : t_header("Priority") {}; 22 | 23 | void t_hdr_priority::set_priority(const string &p) { 24 | populated = true; 25 | priority = p; 26 | } 27 | 28 | string t_hdr_priority::encode_value(void) const { 29 | if (!populated) return ""; 30 | 31 | return priority; 32 | } 33 | -------------------------------------------------------------------------------- /src/parser/hdr_priority.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Priority header 19 | #ifndef _H_HDR_PRIORITY_VERSION 20 | #define _H_HDR_PRIORITY_VERSION 21 | 22 | #include 23 | #include "header.h" 24 | 25 | using namespace std; 26 | 27 | class t_hdr_priority : public t_header { 28 | public: 29 | string priority; 30 | 31 | t_hdr_priority(); 32 | void set_priority(const string &p); 33 | string encode_value(void) const; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/parser/hdr_privacy.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RFC 3323 19 | // Privacy header 20 | 21 | #ifndef _H_HDR_PRIVACY 22 | #define _H_HDR_PRIVACY 23 | 24 | #include 25 | #include 26 | #include "header.h" 27 | 28 | #define PRIVACY_HEADER "header" 29 | #define PRIVACY_SESSION "session" 30 | #define PRIVACY_USER "user" 31 | #define PRIVACY_NONE "none" 32 | #define PRIVACY_CRITICAL "critical" 33 | 34 | // RFC 3325 9.3 defines id privacy 35 | #define PRIVACY_ID "id" 36 | 37 | class t_hdr_privacy : public t_header { 38 | public: 39 | list privacy_list; 40 | 41 | t_hdr_privacy(); 42 | void add_privacy(const string &privacy); 43 | bool contains_privacy(const string &privacy) const; 44 | string encode_value(void) const; 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/parser/hdr_proxy_authenticate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_proxy_authenticate.h" 19 | #include "definitions.h" 20 | 21 | t_hdr_proxy_authenticate::t_hdr_proxy_authenticate() : t_header("Proxy-Authenticate") {} 22 | 23 | void t_hdr_proxy_authenticate::set_challenge(const t_challenge &c) { 24 | populated = true; 25 | challenge = c; 26 | } 27 | 28 | string t_hdr_proxy_authenticate::encode_value(void) const { 29 | if (!populated) return ""; 30 | 31 | return challenge.encode(); 32 | } 33 | -------------------------------------------------------------------------------- /src/parser/hdr_proxy_authenticate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Proxy-Authenticate header 19 | 20 | #ifndef _HDR_PROXY_AUTHENTICATE_H 21 | #define _HDR_PROXY_AUTHENTICATE_H 22 | 23 | #include 24 | #include 25 | #include "challenge.h" 26 | #include "header.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_proxy_authenticate : public t_header { 31 | public: 32 | t_challenge challenge; 33 | 34 | t_hdr_proxy_authenticate(); 35 | 36 | void set_challenge(const t_challenge &c); 37 | string encode_value(void) const; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/parser/hdr_proxy_require.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_proxy_require.h" 20 | 21 | t_hdr_proxy_require::t_hdr_proxy_require() : t_header("Proxy-Require") {}; 22 | 23 | void t_hdr_proxy_require::add_feature(const string &f) { 24 | populated = true; 25 | features.push_back(f); 26 | } 27 | 28 | string t_hdr_proxy_require::encode_value(void) const { 29 | string s; 30 | 31 | if (!populated) return s; 32 | 33 | for (list::const_iterator i = features.begin(); 34 | i != features.end(); i++) 35 | { 36 | if (i != features.begin()) s += ", "; 37 | s += *i; 38 | } 39 | 40 | return s; 41 | } 42 | -------------------------------------------------------------------------------- /src/parser/hdr_proxy_require.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Proxy-Require header 19 | 20 | #ifndef _H_HDR_PROXY_REQUIRE 21 | #define _H_HDR_PROXY_REQUIRE 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | 27 | class t_hdr_proxy_require : public t_header { 28 | public: 29 | list features; 30 | 31 | t_hdr_proxy_require(); 32 | void add_feature(const string &f); 33 | string encode_value(void) const; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/parser/hdr_rack.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RAck header 19 | // RFC 3262 20 | 21 | #ifndef _HDR_RACK 22 | #define _HDR_RACK 23 | 24 | #include 25 | #include "header.h" 26 | #include "definitions.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_rack : public t_header { 31 | public: 32 | unsigned long cseq_nr; 33 | unsigned long resp_nr; 34 | t_method method; 35 | string unknown_method; // set if method is UNKNOWN 36 | 37 | t_hdr_rack(); 38 | void set_cseq_nr(unsigned long l); 39 | void set_resp_nr(unsigned long l); 40 | void set_method(t_method m, const string &unknown = ""); 41 | void set_method(const string &s); 42 | 43 | string encode_value(void) const; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/parser/hdr_record_route.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Record-Route header 19 | 20 | #ifndef _H_HDR_RECORD_ROUTE 21 | #define _H_HDR_RECORD_ROUTE 22 | 23 | #include 24 | #include 25 | #include "route.h" 26 | #include "header.h" 27 | #include "parameter.h" 28 | #include "sockets/url.h" 29 | 30 | using namespace std; 31 | 32 | class t_hdr_record_route : public t_header { 33 | public: 34 | list route_list; 35 | 36 | t_hdr_record_route(); 37 | void add_route(const t_route &r); 38 | string encode(void) const; 39 | string encode_multi_header(void) const; 40 | string encode_value(void) const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/parser/hdr_refer_sub.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Refer-Sub header 19 | // RFC 4488 20 | 21 | #ifndef _H_HDR_REFER_SUB 22 | #define _H_HDR_REFER_SUB 23 | 24 | #include 25 | #include 26 | 27 | #include "header.h" 28 | #include "parameter.h" 29 | 30 | using namespace std; 31 | 32 | class t_hdr_refer_sub : public t_header { 33 | public: 34 | bool create_refer_sub; 35 | list extensions; 36 | 37 | t_hdr_refer_sub(); 38 | void set_create_refer_sub(bool on); 39 | void add_extension(const t_parameter &p); 40 | void set_extensions(const list &l); 41 | 42 | string encode_value(void) const; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/parser/hdr_refer_to.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RFC 3515 19 | // Refer-To header 20 | 21 | #ifndef _H_HDR_REFER_TO 22 | #define _H_HDR_REFER_TO 23 | 24 | #include 25 | #include "header.h" 26 | #include "parameter.h" 27 | #include "sockets/url.h" 28 | 29 | using namespace std; 30 | 31 | class t_hdr_refer_to : public t_header { 32 | public: 33 | string display; // display name 34 | t_url uri; 35 | list params; 36 | 37 | t_hdr_refer_to(); 38 | void set_display(const string &d); 39 | void set_uri(const string &u); 40 | void set_uri(const t_url &u); 41 | void set_params(const list &l); 42 | void add_param(const t_parameter &p); 43 | string encode_value(void) const; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/parser/hdr_reply_to.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Reply-To header 19 | 20 | #ifndef _H_HDR_REPLY_TO 21 | #define _H_HDR_REPLY_TO 22 | 23 | #include 24 | #include "header.h" 25 | #include "parameter.h" 26 | #include "sockets/url.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_reply_to : public t_header { 31 | public: 32 | string display; // display name 33 | t_url uri; 34 | list params; 35 | 36 | t_hdr_reply_to(); 37 | void set_display(const string &d); 38 | void set_uri(const string &u); 39 | void set_uri(const t_url &u); 40 | void set_params(const list &l); 41 | void add_param(const t_parameter &p); 42 | string encode_value(void) const; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/parser/hdr_require.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Require header 19 | 20 | #ifndef _H_HDR_REQUIRE 21 | #define _H_HDR_REQUIRE 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | 27 | class t_hdr_require : public t_header { 28 | public: 29 | list features; 30 | 31 | t_hdr_require(); 32 | void add_feature(const string &f); 33 | void add_features(const list &l); 34 | void del_feature(const string &f); 35 | bool contains(const string &f) const; 36 | string encode_value(void) const; 37 | void unpopulate(void); 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/parser/hdr_retry_after.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Retry-After header 19 | 20 | #ifndef _H_HDR_RETRY_AFTER 21 | #define _H_HDR_RETRY_AFTER 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | #include "parameter.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_retry_after : public t_header { 31 | public: 32 | unsigned long time; // in seconds 33 | string comment; 34 | unsigned long duration; // in seconds 35 | list params; 36 | 37 | t_hdr_retry_after(); 38 | void set_time(unsigned long t); 39 | void set_comment(const string &c); 40 | void set_duration(unsigned long d); 41 | void add_param(const t_parameter &p); 42 | string encode_value(void) const; 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/parser/hdr_route.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Route header 19 | 20 | #ifndef _H_HDR_ROUTE 21 | #define _H_HDR_ROUTE 22 | 23 | #include 24 | #include 25 | #include "route.h" 26 | #include "header.h" 27 | #include "parameter.h" 28 | 29 | using namespace std; 30 | 31 | class t_hdr_route : public t_header { 32 | public: 33 | list route_list; 34 | 35 | // If route_to_first_route == true, then the request must be routed 36 | // to the first route in the list. Otherwise to the request URI. 37 | bool route_to_first_route; 38 | 39 | t_hdr_route(); 40 | void add_route(const t_route &r); 41 | string encode(void) const; 42 | string encode_multi_header(void) const; 43 | string encode_value(void) const; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/parser/hdr_rseq.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_rseq.h" 20 | #include "util.h" 21 | 22 | t_hdr_rseq::t_hdr_rseq() : t_header("RSeq") { 23 | resp_nr = 0; 24 | } 25 | 26 | void t_hdr_rseq::set_resp_nr(unsigned long l) { 27 | populated = true; 28 | resp_nr = l; 29 | } 30 | 31 | string t_hdr_rseq::encode_value(void) const { 32 | if (!populated) return ""; 33 | 34 | return ulong2str(resp_nr); 35 | } 36 | 37 | bool t_hdr_rseq::operator==(const t_hdr_rseq &h) const { 38 | return (resp_nr == h.resp_nr); 39 | } 40 | -------------------------------------------------------------------------------- /src/parser/hdr_rseq.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // RSeq header 19 | // RFC 3262 20 | 21 | #ifndef _HDR_RSEQ 22 | #define _HDR_RSEQ 23 | 24 | #include 25 | #include "header.h" 26 | #include "definitions.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_rseq : public t_header { 31 | public: 32 | unsigned long resp_nr; 33 | 34 | t_hdr_rseq(); 35 | void set_resp_nr(unsigned long l); 36 | 37 | string encode_value(void) const; 38 | 39 | bool operator==(const t_hdr_rseq &h) const; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/parser/hdr_service_route.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Service-Route header 19 | 20 | #ifndef _H_HDR_SERVICE_ROUTE 21 | #define _H_HDR_SERVICE_ROUTE 22 | 23 | #include 24 | #include 25 | #include "route.h" 26 | #include "header.h" 27 | #include "parameter.h" 28 | #include "sockets/url.h" 29 | 30 | using namespace std; 31 | 32 | class t_hdr_service_route : public t_header { 33 | public: 34 | list route_list; 35 | 36 | t_hdr_service_route(); 37 | void add_route(const t_route &r); 38 | string encode(void) const; 39 | string encode_multi_header(void) const; 40 | string encode_value(void) const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/parser/hdr_sip_etag.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_sip_etag.h" 19 | 20 | t_hdr_sip_etag::t_hdr_sip_etag() : t_header("SIP-ETag") {}; 21 | 22 | void t_hdr_sip_etag::set_etag(const string &_etag) { 23 | populated = true; 24 | etag = _etag; 25 | } 26 | 27 | string t_hdr_sip_etag::encode_value(void) const { 28 | if (!populated) return ""; 29 | return etag; 30 | } 31 | -------------------------------------------------------------------------------- /src/parser/hdr_sip_etag.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /** 19 | * @file 20 | * SIP-ETag header (RFC 3903) 21 | */ 22 | 23 | #ifndef _HDR_SIP_ETAG_H 24 | #define _HDR_SIP_ETAG_H 25 | 26 | #include 27 | #include "header.h" 28 | 29 | using namespace std; 30 | 31 | /** SIP-ETag header (RFC 3903) */ 32 | class t_hdr_sip_etag : public t_header { 33 | public: 34 | string etag; /**< Entity tag. */ 35 | 36 | /** Constructor. */ 37 | t_hdr_sip_etag(); 38 | 39 | /** 40 | * Set entity tag. 41 | * @param _etag [in] Entity tag to set. 42 | */ 43 | void set_etag(const string &_etag); 44 | 45 | string encode_value(void) const; 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/parser/hdr_sip_if_match.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "hdr_sip_if_match.h" 19 | 20 | t_hdr_sip_if_match::t_hdr_sip_if_match() : t_header("SIP-If-Match") {}; 21 | 22 | void t_hdr_sip_if_match::set_etag(const string &_etag) { 23 | populated = true; 24 | etag = _etag; 25 | } 26 | 27 | string t_hdr_sip_if_match::encode_value(void) const { 28 | if (!populated) return ""; 29 | return etag; 30 | } 31 | 32 | void t_hdr_sip_if_match::clear(void) { 33 | etag.clear(); 34 | populated = false; 35 | } 36 | -------------------------------------------------------------------------------- /src/parser/hdr_sip_if_match.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /** 19 | * @file 20 | * SIP-If-Match header (RFC 3903) 21 | */ 22 | 23 | #ifndef _HDR_SIP_IF_MATCH_H 24 | #define _HDR_SIP_IF_MATCH_H 25 | 26 | #include 27 | #include "header.h" 28 | 29 | using namespace std; 30 | 31 | /** SIP-If-Match header (RFC 3903) */ 32 | class t_hdr_sip_if_match : public t_header { 33 | public: 34 | string etag; /**< Entity tag. */ 35 | 36 | /** Constructor. */ 37 | t_hdr_sip_if_match(); 38 | 39 | /** 40 | * Set entity tag. 41 | * @param _etag [in] Entity tag to set. 42 | */ 43 | void set_etag(const string &_etag); 44 | 45 | /** Clear the header. */ 46 | void clear(void); 47 | 48 | string encode_value(void) const; 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/parser/hdr_subject.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_subject.h" 20 | #include "parse_ctrl.h" 21 | 22 | t_hdr_subject::t_hdr_subject() : t_header("Subject", "s") {}; 23 | 24 | void t_hdr_subject::set_subject(const string &s) { 25 | populated = true; 26 | subject = s; 27 | } 28 | 29 | string t_hdr_subject::encode_value(void) const { 30 | if (!populated) return ""; 31 | 32 | return subject; 33 | } 34 | -------------------------------------------------------------------------------- /src/parser/hdr_subject.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Subject header 19 | #ifndef _H_HDR_SUBJECT 20 | #define _H_HDR_SUBJECT 21 | 22 | #include 23 | #include "header.h" 24 | 25 | using namespace std; 26 | 27 | class t_hdr_subject : public t_header { 28 | public: 29 | string subject; 30 | 31 | t_hdr_subject(); 32 | void set_subject(const string &s); 33 | string encode_value(void) const; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/parser/hdr_timestamp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_timestamp.h" 20 | #include "util.h" 21 | 22 | t_hdr_timestamp::t_hdr_timestamp() : t_header("Timestamp") { 23 | timestamp = 0; 24 | delay = 0; 25 | } 26 | 27 | void t_hdr_timestamp::set_timestamp(float t) { 28 | populated = true; 29 | timestamp = t; 30 | } 31 | 32 | void t_hdr_timestamp::set_delay(float d) { 33 | populated = true; 34 | delay = d; 35 | } 36 | 37 | string t_hdr_timestamp::encode_value(void) const { 38 | string s; 39 | 40 | if (!populated) return s; 41 | 42 | s += float2str(timestamp, 3); 43 | 44 | if (delay != 0) { 45 | s += " "; 46 | s += float2str(delay, 3); 47 | } 48 | 49 | return s; 50 | } 51 | -------------------------------------------------------------------------------- /src/parser/hdr_timestamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Timestamp header 19 | 20 | #ifndef _H_HDR_TIMESTAMP 21 | #define _H_HDR_TIMESTAMP 22 | 23 | #include 24 | #include "header.h" 25 | 26 | using namespace std; 27 | 28 | class t_hdr_timestamp : public t_header { 29 | public: 30 | float timestamp; 31 | float delay; 32 | 33 | t_hdr_timestamp(); 34 | void set_timestamp(float t); 35 | void set_delay(float d); 36 | string encode_value(void) const; 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/parser/hdr_to.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // To header 19 | 20 | #ifndef _H_HDR_TO 21 | #define _H_HDR_TO 22 | 23 | #include 24 | #include "header.h" 25 | #include "parameter.h" 26 | #include "sockets/url.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_to : public t_header { 31 | public: 32 | string display; // display name 33 | t_url uri; 34 | string tag; 35 | list params; 36 | 37 | t_hdr_to(); 38 | void set_display(const string &d); 39 | void set_uri(const string &u); 40 | void set_uri(const t_url &u); 41 | void set_tag(const string &t); 42 | void set_params(const list &l); 43 | void add_param(const t_parameter &p); 44 | string encode_value(void) const; 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/parser/hdr_unsupported.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Unsupported header 19 | 20 | #ifndef _H_HDR_UNSUPPORTED 21 | #define _H_HDR_UNSUPPORTED 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | 27 | class t_hdr_unsupported : public t_header { 28 | public: 29 | list features; 30 | 31 | t_hdr_unsupported(); 32 | void add_feature(const string &f); 33 | void set_features(const list &_features); 34 | bool contains(const string &f) const; 35 | string encode_value(void) const; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/parser/hdr_user_agent.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "hdr_user_agent.h" 20 | #include "util.h" 21 | 22 | t_hdr_user_agent::t_hdr_user_agent() : t_header("User-Agent") {}; 23 | 24 | void t_hdr_user_agent::add_server(const t_server &s) { 25 | populated = true; 26 | ua_info.push_back(s); 27 | } 28 | 29 | string t_hdr_user_agent::get_ua_info(void) const { 30 | string s; 31 | 32 | for (list::const_iterator i = ua_info.begin(); 33 | i != ua_info.end(); i++ ) 34 | { 35 | if (i != ua_info.begin()) s += ' '; 36 | s += i->encode(); 37 | } 38 | 39 | return s; 40 | } 41 | 42 | string t_hdr_user_agent::encode_value(void) const { 43 | if (!populated) return ""; 44 | 45 | return get_ua_info(); 46 | } 47 | -------------------------------------------------------------------------------- /src/parser/hdr_user_agent.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // User-Agent header 19 | 20 | #ifndef _H_HDR_USER_AGENT 21 | #define _H_HDR_USER_AGENT 22 | 23 | #include 24 | #include 25 | #include "header.h" 26 | #include "hdr_server.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_user_agent : public t_header { 31 | public: 32 | list ua_info; 33 | 34 | t_hdr_user_agent(); 35 | void add_server(const t_server &s); 36 | 37 | // Get string representation of ua_info; 38 | string get_ua_info(void) const; 39 | 40 | string encode_value(void) const; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/parser/hdr_www_authenticate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // WWW-Authenticate header 19 | 20 | #ifndef _HDR_WWW_AUTHENTICATE_H 21 | #define _HDR_WWW_AUTHENTICATE_H 22 | 23 | #include 24 | #include 25 | #include "challenge.h" 26 | #include "header.h" 27 | 28 | using namespace std; 29 | 30 | class t_hdr_www_authenticate : public t_header { 31 | public: 32 | t_challenge challenge; 33 | 34 | t_hdr_www_authenticate(); 35 | 36 | void set_challenge(const t_challenge &c); 37 | string encode_value(void) const; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/parser/identity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "identity.h" 19 | #include "util.h" 20 | 21 | t_identity::t_identity() : display(), uri() {} 22 | 23 | void t_identity::set_display(const string &d) { 24 | display = d; 25 | } 26 | 27 | void t_identity::set_uri(const string &u) { 28 | uri.set_url(u); 29 | } 30 | 31 | void t_identity::set_uri(const t_url &u) { 32 | uri = u; 33 | } 34 | 35 | string t_identity::encode(void) const { 36 | string s; 37 | 38 | if (display.size() > 0) { 39 | s += '"'; 40 | s += escape(display, '"'); 41 | s += '"'; 42 | s += ' '; 43 | } 44 | 45 | s += '<'; 46 | s += uri.encode(); 47 | s += '>'; 48 | 49 | return s; 50 | } 51 | -------------------------------------------------------------------------------- /src/parser/identity.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _IDENTITY_H 19 | #define _IDENTITY_H 20 | 21 | #include 22 | #include "sockets/url.h" 23 | 24 | using namespace std; 25 | 26 | class t_identity { 27 | public: 28 | string display; // display name 29 | t_url uri; 30 | 31 | t_identity(); 32 | void set_display(const string &d); 33 | void set_uri(const string &u); 34 | void set_uri(const t_url &u); 35 | 36 | string encode(void) const; 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/parser/milenage.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------- 2 | * Example algorithms f1, f1*, f2, f3, f4, f5, f5* 3 | *------------------------------------------------------------------- 4 | * 5 | * A sample implementation of the example 3GPP authentication and 6 | * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is 7 | * a byte-oriented implementation of the functions, and of the block 8 | * cipher kernel function Rijndael. 9 | * 10 | * This has been coded for clarity, not necessarily for efficiency. 11 | * 12 | * The functions f2, f3, f4 and f5 share the same inputs and have 13 | * been coded together as a single function. f1, f1* and f5* are 14 | * all coded separately. 15 | * 16 | *-----------------------------------------------------------------*/ 17 | 18 | #ifndef MILENAGE_H 19 | #define MILENAGE_H 20 | 21 | typedef unsigned char u8; 22 | 23 | 24 | void f1 ( u8 k[16], u8 rand[16], u8 sqn[6], u8 amf[2], 25 | u8 mac_a[8], u8 op[16] ); 26 | void f2345 ( u8 k[16], u8 rand[16], 27 | u8 res[8], u8 ck[16], u8 ik[16], u8 ak[6], u8 op[16] ); 28 | void f1star( u8 k[16], u8 rand[16], u8 sqn[6], u8 amf[2], 29 | u8 mac_s[8], u8 op[16] ); 30 | void f5star( u8 k[16], u8 rand[16], 31 | u8 ak[6], u8 op[16] ); 32 | void ComputeOPc( u8 op_c[16], u8 op[16] ); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/parser/rijndael.h: -------------------------------------------------------------------------------- 1 | /*------------------------------------------------------------------- 2 | * Example algorithms f1, f1*, f2, f3, f4, f5, f5* 3 | *------------------------------------------------------------------- 4 | * 5 | * A sample implementation of the example 3GPP authentication and 6 | * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is 7 | * a byte-oriented implementation of the functions, and of the block 8 | * cipher kernel function Rijndael. 9 | * 10 | * This has been coded for clarity, not necessarily for efficiency. 11 | * 12 | * The functions f2, f3, f4 and f5 share the same inputs and have 13 | * been coded together as a single function. f1, f1* and f5* are 14 | * all coded separately. 15 | * 16 | *-----------------------------------------------------------------*/ 17 | 18 | #ifndef RIJNDAEL_H 19 | #define RIJNDAEL_H 20 | 21 | 22 | void RijndaelKeySchedule( u8 key[16] ); 23 | void RijndaelEncrypt( u8 input[16], u8 output[16] ); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/parser/route.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "definitions.h" 19 | #include "route.h" 20 | #include "parse_ctrl.h" 21 | #include "util.h" 22 | 23 | void t_route::add_param(const t_parameter &p) { 24 | params.push_back(p); 25 | } 26 | 27 | void t_route::set_params(const list &l) { 28 | params = l; 29 | } 30 | 31 | string t_route::encode(void) const { 32 | string s; 33 | 34 | if (display.size() > 0) { 35 | s += '"'; 36 | s += escape(display, '"'); 37 | s += '"'; 38 | s += ' '; 39 | } 40 | 41 | s += '<'; 42 | s += uri.encode(); 43 | s += '>'; 44 | 45 | s += param_list2str(params); 46 | return s; 47 | } 48 | -------------------------------------------------------------------------------- /src/parser/route.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | // Route item 19 | 20 | #ifndef _H_ROUTE 21 | #define _H_ROUTE 22 | 23 | #include 24 | #include 25 | #include "parameter.h" 26 | 27 | using namespace std; 28 | 29 | class t_route { 30 | public: 31 | string display; 32 | t_url uri; 33 | list params; 34 | 35 | void add_param(const t_parameter &p); 36 | void set_params(const list &l); 37 | string encode(void) const; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/patterns/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-patterns) 2 | 3 | set(LIBTWINKLE_PATTERNS-SRCS 4 | observer.cpp 5 | ) 6 | 7 | add_library(libtwinkle-patterns OBJECT ${LIBTWINKLE_PATTERNS-SRCS}) 8 | -------------------------------------------------------------------------------- /src/presence/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-presence) 2 | 3 | set(LIBTWINKLE_PRESENCE-SRCS 4 | buddy.cpp 5 | pidf_body.cpp 6 | presence_dialog.cpp 7 | presence_epa.cpp 8 | presence_state.cpp 9 | presence_subscription.cpp 10 | ) 11 | 12 | add_library(libtwinkle-presence OBJECT ${LIBTWINKLE_PRESENCE-SRCS}) 13 | -------------------------------------------------------------------------------- /src/presence/presence_dialog.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "presence_dialog.h" 19 | 20 | #include "presence_subscription.h" 21 | #include "phone_user.h" 22 | #include "audits/memman.h" 23 | 24 | t_presence_dialog::t_presence_dialog(t_phone_user *_phone_user, t_presence_state *presence_state) : 25 | t_subscription_dialog(_phone_user) 26 | { 27 | subscription = new t_presence_subscription(this, presence_state); 28 | MEMMAN_NEW(subscription); 29 | } 30 | 31 | t_presence_dialog *t_presence_dialog::copy(void) { 32 | // Copy is not needed. 33 | assert(false); 34 | return NULL; 35 | } 36 | -------------------------------------------------------------------------------- /src/prohibit_thread.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #include "prohibit_thread.h" 19 | 20 | void i_prohibit_thread::add_prohibited_thread(void) { 21 | prohibited_mutex.lock(); 22 | prohibited_threads.insert(t_thread::self()); 23 | prohibited_mutex.unlock(); 24 | } 25 | 26 | void i_prohibit_thread::remove_prohibited_thread(void) { 27 | prohibited_mutex.lock(); 28 | prohibited_threads.erase(t_thread::self()); 29 | prohibited_mutex.unlock(); 30 | } 31 | 32 | bool i_prohibit_thread::is_prohibited_thread(void) const { 33 | prohibited_mutex.lock(); 34 | bool result = (prohibited_threads.find(t_thread::self()) != prohibited_threads.end()); 35 | prohibited_mutex.unlock(); 36 | 37 | return result; 38 | } 39 | -------------------------------------------------------------------------------- /src/sdp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-sdp) 2 | 3 | BISON_TARGET(MyParser sdp_parser.yxx ${CMAKE_CURRENT_BINARY_DIR}/sdp_parser.cxx COMPILE_FLAGS "-p yysdp") 4 | FLEX_TARGET(MyScanner sdp_scanner.lxx ${CMAKE_CURRENT_BINARY_DIR}/sdp_scanner.cxx COMPILE_FLAGS "-Pyysdp") 5 | ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser) 6 | 7 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 8 | 9 | set(LIBTWINKLE_SDP-SRCS 10 | sdp.cpp 11 | sdp_parse_ctrl.cpp 12 | ${CMAKE_CURRENT_BINARY_DIR}/sdp_parser.cxx 13 | ${CMAKE_CURRENT_BINARY_DIR}/sdp_scanner.cxx 14 | sdp_scanner.cxx 15 | ) 16 | 17 | add_library(libtwinkle-sdp OBJECT ${LIBTWINKLE_SDP-SRCS}) 18 | -------------------------------------------------------------------------------- /src/sender.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | /** 19 | * @file 20 | * Network sender threads. 21 | */ 22 | 23 | #ifndef _H_SENDER 24 | #define _H_SENDER 25 | 26 | /** Thread sending SIP messages */ 27 | void *sender_loop(void *arg); 28 | 29 | /** Thread for sending asynchronously over TCP */ 30 | void *tcp_sender_loop(void *arg); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/sockets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-sockets) 2 | 3 | set(LIBTWINKLE_SOCKETS-SRCS 4 | connection.cpp 5 | connection_table.cpp 6 | dnssrv.cpp 7 | interfaces.cpp 8 | socket.cpp 9 | url.cpp 10 | ) 11 | 12 | add_library(libtwinkle-sockets OBJECT ${LIBTWINKLE_SOCKETS-SRCS}) 13 | -------------------------------------------------------------------------------- /src/sockets/dnssrv.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _DNSSRV_H 19 | #define _DNSSRV_H 20 | 21 | #include 22 | #include 23 | 24 | using namespace std; 25 | 26 | typedef struct { 27 | string hostname; 28 | unsigned short port; 29 | } t_dns_result; 30 | 31 | void insrv_init (unsigned long flags); 32 | int insrv_lookup (const char *service, const char *proto, const char *domain, 33 | list &result); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/sockets/ipaddr.h: -------------------------------------------------------------------------------- 1 | #ifndef _H_IPADDR 2 | #define _H_IPADDR 3 | 4 | // IP address in host byte order 5 | typedef unsigned long IPaddr; 6 | // IP address in network byte order 7 | typedef unsigned long IPNaddr; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /src/stun/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-stun) 2 | 3 | set(LIBTWINKLE_STUN-SRCS 4 | stun.cxx 5 | stun_transaction.cpp 6 | udp.cxx 7 | ) 8 | 9 | add_library(libtwinkle-stun OBJECT ${LIBTWINKLE_STUN-SRCS}) 10 | -------------------------------------------------------------------------------- /src/threads/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-threads) 2 | 3 | set(LIBTWINKLE_THREADS-SRCS 4 | thread.cpp 5 | mutex.cpp 6 | sema.cpp 7 | ) 8 | 9 | add_library(libtwinkle-threads OBJECT ${LIBTWINKLE_THREADS-SRCS}) 10 | -------------------------------------------------------------------------------- /src/threads/sema.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2009 Michel de Boer 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | */ 17 | 18 | #ifndef _H_SEMAPHORE 19 | #define _H_SEMAPHORE 20 | 21 | #include 22 | 23 | class t_semaphore { 24 | private: 25 | sem_t sem; 26 | 27 | public: 28 | // Throws a string exception (error message) when failing. 29 | t_semaphore(unsigned int value); 30 | 31 | ~t_semaphore(); 32 | 33 | // Throws a string exception (error message) when failing. 34 | void up(void); 35 | 36 | void down(void); 37 | 38 | // Returns true if downing the semaphore succeeded. 39 | // Returns false if the semaphore was zero already. 40 | bool try_down(void); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(libtwinkle-utils) 2 | 3 | set(LIBTWINKLE_UTILS-SRCS 4 | file_utils.cpp 5 | mime_database.cpp 6 | ) 7 | 8 | add_library(libtwinkle-utils OBJECT ${LIBTWINKLE_UTILS-SRCS}) 9 | -------------------------------------------------------------------------------- /twinkle_config.h.in: -------------------------------------------------------------------------------- 1 | #cmakedefine WITH_DIAMONDCARD 2 | #cmakedefine HAVE_SPEEX 3 | #cmakedefine HAVE_ILBC 4 | #cmakedefine HAVE_ILBC_CPP 5 | #cmakedefine HAVE_ZRTP 6 | #cmakedefine HAVE_BCG729 7 | #cmakedefine HAVE_BCG729_ANNEX_B 8 | #cmakedefine HAVE_GSM 9 | 10 | #cmakedefine HAVE_UNISTD_H 11 | #cmakedefine HAVE_LINUX_TYPES_H 12 | #cmakedefine HAVE_LINUX_ERRQUEUE_H 13 | #cmakedefine HAVE_STRERROR_R 14 | #cmakedefine STRERROR_R_CHAR_P 15 | #cmakedefine HAVE_RES_INIT 16 | #cmakedefine WORDS_BIGENDIAN 17 | #cmakedefine HAVE_LIBASOUND 18 | #cmakedefine HAVE_DBUS 19 | #cmakedefine HAVE_AKONADI 20 | 21 | #define VERSION "${PRODUCT_VERSION}" 22 | #define VERSION_DATE "${PRODUCT_DATE}" 23 | 24 | #define DATADIR "${datadir}" 25 | --------------------------------------------------------------------------------