Commit 08b6f466 authored by jehan's avatar jehan

javadoc enhancements

parent 63117d28
......@@ -47,12 +47,29 @@ typedef struct _LinphoneCore LinphoneCore;
struct _LpConfig;
struct _LCSipTransports{
/**
* Linphone core SIP transport ports.
* Use with #linphone_core_set_sip_transports
* @ingroup initializing
*/
typedef struct _LCSipTransports{
/**
* udp port to listening on, negative value if not set
* */
int udp_port;
/**
* tcp port to listening on, negative value if not set
* */
int tcp_port;
/**
* dtls port to listening on, negative value if not set
* */
int dtls_port;
/**
* tls port to listening on, negative value if not set
* */
int tls_port;
};
} LCSipTransports;
typedef struct _LCSipTransports LCSipTransports;
......@@ -934,7 +951,12 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
/**
* @ingroup media_parameters
* Get default call parameters reflecting current linphone core configuration
* @param LinphoneCore object
* @return LinphoneCallParams
*/
LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc);
LinphoneCall *linphone_core_get_call_by_remote_address(LinphoneCore *lc, const char *remote_address);
......@@ -982,16 +1004,23 @@ const MSList *linphone_core_get_video_codecs(const LinphoneCore *lc);
int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs);
bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt);
/**
* Enable payload type
* @param linphone core
* @param pt payload type to enable, can be retrieve from #linphone_core_find_payload_type
* @param TRUE if enabled
* @return 0 if succed
*
*/
int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t enable);
/**
* Wildcard value used by #linphone_core_find_payload_type to ignore rate in search algirithm
* Wildcard value used by #linphone_core_find_payload_type to ignore rate in search algorithm
* @ingroup media_parameters
*/
#define LINPHONE_FIND_PAYLOAD_IGNORE_RATE -1
/**
* Wildcard value used by #linphone_core_find_payload_type to ignore channel in search algirithm
* Wildcard value used by #linphone_core_find_payload_type to ignore channel in search algorithm
* @ingroup media_parameters
*/
#define LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS -1
......@@ -1370,7 +1399,13 @@ void linphone_core_refresh_registers(LinphoneCore* lc);
/* Path to the file storing secrets cache */
void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file);
const char *linphone_core_get_zrtp_secrets_file(LinphoneCore *lc);
/**
* Search from the list of current calls if a remote address match uri
* @ingroup call_control
* @param lc
* @param uri which should match call remote uri
* @return LinphoneCall or NULL is no match is found
*/
const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri);
int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
......@@ -1385,8 +1420,19 @@ int linphone_core_terminate_conference(LinphoneCore *lc);
int linphone_core_get_conference_size(LinphoneCore *lc);
int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path);
int linphone_core_stop_conference_recording(LinphoneCore *lc);
/**
* Get the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
* @ingroup initializing
* @param lc core
* @return max number of simultaneous calls
*/
int linphone_core_get_max_calls(LinphoneCore *lc);
/**
* Set the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
* @ingroup initializing
* @param lc core
* @param max number of simultaneous calls
*/
void linphone_core_set_max_calls(LinphoneCore *lc, int max);
bool_t linphone_core_sound_resources_locked(LinphoneCore *lc);
......
......@@ -18,9 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.linphone.core;
/**
* Enum representing the direction of a call.
**/
public class CallDirection {
/**
* outgoing calls*
* */
public static CallDirection Outgoing = new CallDirection("CallOutgoing");
/**
* incoming calls
*/
public static CallDirection Incoming = new CallDirection("Callincoming");
private String mStringValue;
private CallDirection(String aStringValue) {
......
......@@ -39,21 +39,48 @@ public interface LinphoneAddress {
*/
public String getUserName();
/**
*
* Domain name
* @return null if not set
*/
public String getDomain();
/**
* Port as String
* @return null if not set
*/
public String getPort();
/**
* Port as integer value.
* @return negative value if not set if not set
*/
public int getPortInt();
/**
* set display name
* @param name
*/
public void setDisplayName(String name);
/**
* set user name
* @param username
*/
public void setUserName(String username);
/**
* set domain name
* @param domain
*/
public void setDomain(String domain);
/**
* set port as String
* @param port, null if not set
*/
public void setPort(String port);
/**
* set port as int
* @param port, negative value if not set
*/
public void setPortInt(int port);
/**
* Removes address's tags and uri headers so that it is displayable to the user.
**/
public void clean();
/**
......
......@@ -20,7 +20,7 @@ package org.linphone.core;
/**
* Object holding authentication information.
* In most case, authentication information consists of a username and password. Sometimes, a userid is required by proxy, and realm can be useful to discriminate different SIP domains.
*<br>This object is instanciated using {@link LinphoneCoreFactory#createAuthInfo(String, String, String)}.
*<br>This object is instantiated using either {@link LinphoneCoreFactory#createAuthInfo(String, String, String)} or {@link LinphoneCoreFactory#createAuthInfo(String, String, String, String, String)}.
*<br>
*Once created and filled, a LinphoneAuthInfo must be added to the LinphoneCore in order to become known and used automatically when needed.
*Use {@link LinphoneCore#addAuthInfo(LinphoneAuthInfo)} for that purpose.
......
......@@ -24,7 +24,11 @@ package org.linphone.core;
import java.util.Vector;
/**
* Object representing a call log.
*
*
**/
public interface LinphoneCallLog {
/**
* Represents call status
......@@ -91,26 +95,30 @@ public interface LinphoneCallLog {
public CallDirection getDirection();
/**
* get status of this call
* @return
* @return CallStatus
*/
public CallStatus getStatus();
/**
* @return a human readble String with the start date/time of the call
* A human readable String with the start date/time of the call
* @return String
*/
public String getStartDate();
/**
* @return a timestamp of the start date/time of the call in milliseconds since January 1st 1970
* A timestamp of the start date/time of the call in milliseconds since January 1st 1970
* @return long
*/
public long getTimestamp();
/**
* @return the call duration, in seconds
* The call duration, in seconds
* @return int
*/
public int getCallDuration();
/**
* @return the call id from signaling
* Call id from signaling
* @return int
*/
public int getCallId();
}
......@@ -48,6 +48,12 @@ abstract public class LinphoneCoreFactory {
}
return theLinphoneCoreFactory;
}
/**
* create {@link LinphoneAuthInfo}
* @param username
* @param userid user id as set in auth header
* @param passwd
* */
abstract public LinphoneAuthInfo createAuthInfo(String username,String password, String realm);
/**
* create {@link LinphoneAuthInfo}
......
......@@ -745,12 +745,6 @@ class LinphoneCoreImpl implements LinphoneCore {
deferCallUpdate(nativePtr, getCallPtr(aCall));
}
public synchronized void startRinging() {
if (!contextInitialized()) return;
if (Hacks.needGalaxySAudioHack()) {
mAudioManager.setMode(MODE_RINGTONE);
}
}
private native void setVideoPolicy(long nativePtr, boolean autoInitiate, boolean autoAccept);
public synchronized void setVideoPolicy(boolean autoInitiate, boolean autoAccept) {
......@@ -801,10 +795,17 @@ class LinphoneCoreImpl implements LinphoneCore {
public String getVersion() {
return getVersion(nativePtr);
}
/**
* Wildcard value used by #linphone_core_find_payload_type to ignore rate in search algorithm
*/
static int FIND_PAYLOAD_IGNORE_RATE = -1;
/**
* Wildcard value used by #linphone_core_find_payload_type to ignore channel in search algorithm
*/
static int FIND_PAYLOAD_IGNORE_CHANNELS = -1;
@Override
public synchronized PayloadType findPayloadType(String mime, int clockRate) {
return findPayloadType(mime, clockRate, 1);
return findPayloadType(mime, clockRate, FIND_PAYLOAD_IGNORE_CHANNELS);
}
private native void removeFriend(long ptr, long lf);
......@@ -908,4 +909,8 @@ class LinphoneCoreImpl implements LinphoneCore {
public void stopConferenceRecording() {
stopConferenceRecording(nativePtr);
}
@Override
public PayloadType findPayloadType(String mime) {
return findPayloadType(mime, FIND_PAYLOAD_IGNORE_RATE);
}
}
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