Commit 6e7976e7 authored by Nicolas Michon's avatar Nicolas Michon

Add sample program

parent 6c402209
......@@ -73,3 +73,10 @@ if (NOT IOS)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
set(TEST_SOURCE_FILES sip_client.cpp)
add_executable(sip_client ${TEST_SOURCE_FILES})
target_link_libraries(sip_client ${LINPHONE_LIBS_FOR_TOOLS} ortp mediastreamer bellesip bctoolbox "-lpthread" ${XSD_LIBRARIES})
set_target_properties(sip_client PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
set_target_properties(sip_client PROPERTIES LINKER_LANGUAGE CXX)
This diff is collapsed.
#pragma once
#include <thread>
#include <linphone/core.h>
#include <linphone/lpconfig.h>
//#include <linphone/types.h>
class SipClient {
public:
// SipClient(const Settings &settings, std::unique_ptr<AbstractMediaControls> &&controls);
void doIterate();
static void mainLoop(SipClient &client, bool &running);
LinphoneConfig *setupConfig() const;
void startLibLinphone();
void destroyLinphoneCore();
bool isInCall() const;
bool isRegistered() const;
void refresh();
void enableRegister(bool enable);
bool isRegistrationEnabled();
void terminateCall();
void setGlobalProxy();
bool mRunning;
bool mPrepareStop;
bool mTerminateCall;
std::thread mLoop;
LinphoneProxyConfig *mGlobalProxy;
LinphoneCore *mCore;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment