00001 00309 //-------------------------------------------------------------------------------------------------- 00317 //-------------------------------------------------------------------------------------------------- 00318 00319 #ifndef LEGATO_MCC_H_INCLUDE_GUARD 00320 #define LEGATO_MCC_H_INCLUDE_GUARD 00321 00322 00323 #include "legato.h" 00324 #include "le_mdm_defs.h" 00325 #include "le_audio.h" 00326 00327 00328 00329 //-------------------------------------------------------------------------------------------------- 00330 // Symbol and Enum definitions. 00331 //-------------------------------------------------------------------------------------------------- 00332 00333 //-------------------------------------------------------------------------------------------------- 00337 //-------------------------------------------------------------------------------------------------- 00338 typedef enum 00339 { 00340 LE_MCC_PROFILE_NOT_AVAILABLE, 00341 LE_MCC_PROFILE_IDLE, 00342 LE_MCC_PROFILE_FORWARDED, 00343 LE_MCC_PROFILE_DND, 00344 LE_MCC_PROFILE_IN_USE 00345 } 00346 le_mcc_profile_State_t; 00347 00348 00349 //-------------------------------------------------------------------------------------------------- 00350 // API type definitions. 00351 //-------------------------------------------------------------------------------------------------- 00352 00353 //-------------------------------------------------------------------------------------------------- 00357 //-------------------------------------------------------------------------------------------------- 00358 typedef struct le_mcc_Profile* le_mcc_profile_Ref_t; 00359 00360 //-------------------------------------------------------------------------------------------------- 00364 //-------------------------------------------------------------------------------------------------- 00365 typedef struct le_mcc_profile_StateChangeHandler* le_mcc_profile_StateChangeHandlerRef_t; 00366 00367 //-------------------------------------------------------------------------------------------------- 00371 //-------------------------------------------------------------------------------------------------- 00372 typedef struct le_mcc_profile_CallEventHandler* le_mcc_profile_CallEventHandlerRef_t; 00373 00374 //-------------------------------------------------------------------------------------------------- 00378 //-------------------------------------------------------------------------------------------------- 00379 typedef struct le_mcc_Call* le_mcc_call_Ref_t; 00380 00381 00382 //-------------------------------------------------------------------------------------------------- 00383 // Event handler definitions. 00384 //-------------------------------------------------------------------------------------------------- 00385 00386 //-------------------------------------------------------------------------------------------------- 00393 //-------------------------------------------------------------------------------------------------- 00394 typedef void (*le_mcc_profile_StateChangeHandlerFunc_t) 00395 ( 00396 le_mcc_profile_State_t newState, 00397 void* contextPtr 00398 ); 00399 00400 //-------------------------------------------------------------------------------------------------- 00408 //-------------------------------------------------------------------------------------------------- 00409 typedef void (*le_mcc_profile_CallEventHandlerFunc_t) 00410 ( 00411 le_mcc_call_Ref_t callRef, 00412 le_mcc_call_Event_t event, 00413 void* contextPtr 00414 ); 00415 00416 00417 //-------------------------------------------------------------------------------------------------- 00418 // API Function definitions. 00419 //-------------------------------------------------------------------------------------------------- 00420 00421 00422 //-------------------------------------------------------------------------------------------------- 00423 // CALL PROFILE. 00424 //-------------------------------------------------------------------------------------------------- 00425 00426 //-------------------------------------------------------------------------------------------------- 00432 //-------------------------------------------------------------------------------------------------- 00433 le_mcc_profile_Ref_t le_mcc_profile_GetByName 00434 ( 00435 const char* profileNamePtr 00436 ); 00437 00438 //-------------------------------------------------------------------------------------------------- 00445 //-------------------------------------------------------------------------------------------------- 00446 void le_mcc_profile_Release 00447 ( 00448 le_mcc_profile_Ref_t profileRef 00449 ); 00450 00451 //-------------------------------------------------------------------------------------------------- 00460 //-------------------------------------------------------------------------------------------------- 00461 le_mcc_profile_State_t le_mcc_profile_GetState 00462 ( 00463 le_mcc_profile_Ref_t profileRef 00464 ); 00465 00466 //-------------------------------------------------------------------------------------------------- 00475 //-------------------------------------------------------------------------------------------------- 00476 le_mcc_profile_StateChangeHandlerRef_t le_mcc_profile_AddStateChangeHandler 00477 ( 00478 le_mcc_profile_Ref_t profileRef, 00479 le_mcc_profile_StateChangeHandlerFunc_t handlerFuncPtr, 00480 void* contextPtr 00481 ); 00482 00483 //-------------------------------------------------------------------------------------------------- 00490 //-------------------------------------------------------------------------------------------------- 00491 void le_mcc_profile_RemoveStateChangeHandler 00492 ( 00493 le_mcc_profile_StateChangeHandlerRef_t handlerRef 00494 ); 00495 00496 //-------------------------------------------------------------------------------------------------- 00508 //-------------------------------------------------------------------------------------------------- 00509 le_mcc_profile_CallEventHandlerRef_t le_mcc_profile_AddCallEventHandler 00510 ( 00511 le_mcc_profile_Ref_t profileRef, 00512 le_mcc_profile_CallEventHandlerFunc_t handlerFuncPtr, 00513 void* contextPtr 00514 ); 00515 00516 //-------------------------------------------------------------------------------------------------- 00523 //-------------------------------------------------------------------------------------------------- 00524 void le_mcc_profile_RemoveCallEventHandler 00525 ( 00526 le_mcc_profile_CallEventHandlerRef_t handlerRef 00527 ); 00528 00529 //-------------------------------------------------------------------------------------------------- 00530 // CALL. 00531 //-------------------------------------------------------------------------------------------------- 00532 00533 //-------------------------------------------------------------------------------------------------- 00544 //-------------------------------------------------------------------------------------------------- 00545 le_mcc_call_Ref_t le_mcc_profile_CreateCall 00546 ( 00547 le_mcc_profile_Ref_t profileRef, 00548 const char* destinationPtr 00549 ); 00550 00551 //-------------------------------------------------------------------------------------------------- 00561 //-------------------------------------------------------------------------------------------------- 00562 void le_mcc_call_Delete 00563 ( 00564 le_mcc_call_Ref_t callRef 00565 ); 00566 00567 //-------------------------------------------------------------------------------------------------- 00583 //-------------------------------------------------------------------------------------------------- 00584 le_result_t le_mcc_call_Start 00585 ( 00586 le_mcc_call_Ref_t callRef 00587 ); 00588 00589 //-------------------------------------------------------------------------------------------------- 00598 //-------------------------------------------------------------------------------------------------- 00599 bool le_mcc_call_IsConnected 00600 ( 00601 le_mcc_call_Ref_t callRef 00602 ); 00603 00604 //-------------------------------------------------------------------------------------------------- 00620 //-------------------------------------------------------------------------------------------------- 00621 le_result_t le_mcc_call_GetRemoteTel 00622 ( 00623 le_mcc_call_Ref_t callRef, 00624 char* telPtr, 00625 size_t len 00626 ); 00627 00628 //-------------------------------------------------------------------------------------------------- 00637 //-------------------------------------------------------------------------------------------------- 00638 le_mcc_call_TerminationReason_t le_mcc_call_GetTerminationReason 00639 ( 00640 le_mcc_call_Ref_t callRef 00641 ); 00642 00643 //-------------------------------------------------------------------------------------------------- 00653 //-------------------------------------------------------------------------------------------------- 00654 le_audio_StreamRef_t le_mcc_call_GetTxAudioStream 00655 ( 00656 le_mcc_call_Ref_t callRef 00657 ); 00658 00659 //-------------------------------------------------------------------------------------------------- 00669 //-------------------------------------------------------------------------------------------------- 00670 le_audio_StreamRef_t le_mcc_call_GetRxAudioStream 00671 ( 00672 le_mcc_call_Ref_t callRef 00673 ); 00674 00675 //-------------------------------------------------------------------------------------------------- 00685 //-------------------------------------------------------------------------------------------------- 00686 le_result_t le_mcc_call_Answer 00687 ( 00688 le_mcc_call_Ref_t callRef 00689 ); 00690 00691 //-------------------------------------------------------------------------------------------------- 00702 //-------------------------------------------------------------------------------------------------- 00703 le_result_t le_mcc_call_HangUp 00704 ( 00705 le_mcc_call_Ref_t callRef 00706 ); 00707 00708 00709 #endif // LEGATO_MCC_H_INCLUDE_GUARD