Commit a0d78a3d authored by Emmanuel Milou's avatar Emmanuel Milou

Doxygen documentation updated on client side

parent 2a19c4c0
......@@ -17,10 +17,9 @@ Makefile.in
*.mo
# Ignore rendered docs
doc/doxygen/html-everything
doc/doxygen/html-sflphoned
doc/doxygen/core-doc
doc/doxygen/gtk-gui-doc
doc/*.html
sflphone-gtk/doc/html/*
# Ignore buildsys stuff
/autom4te.cache
......
......@@ -10,7 +10,6 @@ sflphone_gtk_SOURCES = \
dialpad.c \
menus.c \
calltree.c \
screen.c \
actions.c \
configwindow.c \
accountlist.c \
......@@ -23,7 +22,7 @@ sflphone_gtk_SOURCES = \
MemManager.c
noinst_HEADERS = actions.h dbus.h sflnotify.h mainwindow.h calllist.h dialpad.h codeclist.h\
callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus.h calltree.h screen.h configwindow.h \
callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus.h calltree.h configwindow.h \
accountlist.h accountwindow.h marshaller.h sliders.h statusicon.h
EXTRA_DIST = marshaller.list
sflphone_gtk_LDADD = $(DEPS_LIBS) -lnotify
......
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -147,6 +147,7 @@ account_list_set_current_pos( guint n)
__CURRENT_ACCOUNT_ID = account_list_get_nth(n)->accountID;
}
const gchar * account_state_name(account_state_t s)
{
gchar * state;
......@@ -169,8 +170,7 @@ const gchar * account_state_name(account_state_t s)
break;
case ACCOUNT_STATE_ERROR_NETWORK:
state = _("Network unreachable");
break;
case ACCOUNT_STATE_ERROR_HOST:
state = _("Host unreachable");
break;
default:
......
......@@ -31,13 +31,21 @@
*/
typedef enum
{
/** Invalid state */
ACCOUNT_STATE_INVALID = 0,
/** The account is registered */
ACCOUNT_STATE_REGISTERED,
/** The account is not registered */
ACCOUNT_STATE_UNREGISTERED,
/** The account is trying to register */
ACCOUNT_STATE_TRYING,
/** Error state. The account is not registered */
ACCOUNT_STATE_ERROR,
/** An authentification error occured. Wrong password or wrong username. The account is not registered */
ACCOUNT_STATE_ERROR_AUTH,
/** The network is unreachable. The account is not registered */
ACCOUNT_STATE_ERROR_NETWORK,
/** Host is unreachable. The account is not registered */
ACCOUNT_STATE_ERROR_HOST
} account_state_t;
......@@ -57,63 +65,95 @@ typedef struct {
/** This function initialize the account list. */
/**
* This function initialize the account list.
*/
void account_list_init ();
/** This function empty and free the account list. */
/**
* This function empty and free the account list.
*/
void account_list_clean ();
/** This function append an account to list.
* @param a The account you want to add */
/**
* This function append an account to list.
* @param a The account you want to add
*/
void account_list_add (account_t * a);
/** This function remove an account from list.
* @param accountID The accountID of the account you want to remove
*/
/**
* This function remove an account from list.
* @param accountID The accountID of the account you want to remove
*/
void account_list_remove (const gchar * accountID);
/** Return the first account that corresponds to the state
* @param s The state
* @return An account or NULL */
/**
* Return the first account that corresponds to the state
* @param s The state
* @return account_t* An account or NULL
*/
account_t * account_list_get_by_state ( account_state_t state);
/** Return the number of accounts in the list
* @return The number of accounts in the list */
/**
* Return the number of accounts in the list
* @return guint The number of accounts in the list
*/
guint account_list_get_size ( );
/** Return the account at the nth position in the list
* @param n The position of the account you want
* @return An account or NULL */
/**
* Return the account at the nth position in the list
* @param n The position of the account you want
* @return An account or NULL
*/
account_t * account_list_get_nth ( guint n );
/** Return the current account struct
/**
* Return the current account struct
* @return The current account struct
*/
account_t * account_list_get_current( );
/** This function sets an account as the current one
/**
* This function sets an account as the current one
* @param accountID The ID of the current account
*/
void account_list_set_current_id(const gchar * accountID);
/** This function sets an account as the current one
/**
* This function sets an account as the current one
* @param n the position of the account you want to use
*/
void account_list_set_current_pos( guint n );
/** This function maps account_state_t enums to a description.
* @param s The state
* @return The full text description of the state */
/**
* This function maps account_state_t enums to a description.
* @param s The state
* @return The full text description of the state
*/
const gchar * account_state_name(account_state_t s);
/**
* This function clear the list
*/
void account_list_clear ( );
/** Return the account associated with an ID
/**
* Return the account associated with an ID
* @param accountID The ID of the account
* @return An account or NULL */
* @return An account or NULL
*/
account_t * account_list_get_by_id(gchar * accountID);
/**
* Move the account from an unit up in the account_list
* @param index The current index in the list
*/
void account_list_move_up( guint index );
/**
* Move the account from an unit down in the account_list
* @param index The current index in the list
*/
void account_list_move_down( guint index );
#endif
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -22,7 +23,11 @@
/** @file accountwindow.h
* @brief The window to edit account details.
*/
/**
* Display the main account widget
* @param a The account you want to edit or null for a new account
*/
void show_account_window ( account_t * a );
#endif
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -476,7 +476,7 @@ sflphone_keypad( guint keyval, gchar * key)
case 65307: /* ESCAPE */
dbus_hang_up(c);
break;
default: // TODO should this be here?
default:
// To play the dtmf when calling mail box for instance
dbus_play_dtmf(key);
if (keyval < 255 || (keyval >65453 && keyval < 65466))
......
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -54,12 +54,40 @@ gboolean sflphone_quit ( ) ;
*/
void sflphone_hang_up ();
/**
* Put the selected call on hold
*/
void sflphone_on_hold ();
/**
* Put the selected call off hold
*/
void sflphone_off_hold ();
/**
* Open a new call
* @return call_t* A pointer on the call structure
*/
call_t * sflphone_new_call();
/**
* Notify voice mails to the application
* @param accountID The account the voice mails are for
* @param count The number of voice mails
*/
void sflphone_notify_voice_mail ( const gchar* accountID , guint count );
/**
* Prepare SFLphone to transfer a call and wait for the user to dial the number to transfer to
* Put the selected call in Transfer state
*/
void sflphone_set_transfert();
/**
* Cancel the transfer and puts back the selected call to Current state
*/
void sflphone_unset_transfert();
/**
* Accept / dial the current call
*/
......@@ -67,36 +95,49 @@ void sflphone_pick_up ();
/**
* Put the call on hold state
* @param call_t* The current call
*/
void sflphone_hold ( call_t * c);
/**
* Put the call in Ringing state
* @param call_t* The current call
*/
void sflphone_ringing(call_t * c );
/**
* Put the call in Busy state
* @param call_t* The current call
*/
void sflphone_busy( call_t * c );
/**
* Put the call in Failure state
* @param call_t* The current call
*/
void sflphone_fail( call_t * c );
/**
* Put the call in Current state
* @param call_t* The current call
*/
void sflphone_current ( call_t * c);
/**
* The callee has hung up
* @param call_t* The current call
*/
void sflphone_hung_up( call_t * c);
/**
* Incoming call
* @param call_t* The incoming call
*/
void sflphone_incoming_call ( call_t * c);
/**
* Dial the number
* If the call is in DIALING state, the char will be append to the number
* @TODO If the call is in CURRENT state, the char will be also sent to the server
* @param keyval The unique int representing the key
* @param keyval The char value of the key
*/
......@@ -108,8 +149,20 @@ void sflphone_keypad ( guint keyval, gchar * key);
*/
void sflphone_place_call ( call_t * c );
/**
* Initialize the accounts data structure
*/
void sflphone_fill_account_list();
/**
* Set an account as current. The current account is to one used to place calls with by default
* The current account is the first in the account list ( index 0 )
*/
void sflphone_set_current_account();
/**
* Initialialize the codecs data structure
*/
void sflphone_fill_codec_list();
#endif
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -68,57 +68,81 @@ typedef struct {
call_state_t state;
} call_t;
/** This function initialize the call list. */
/**
* This function initialize the call list.
*/
void call_list_init ();
/** This function empty and free the call list. */
/**
* This function empty and free the call list.
*/
void call_list_clean ();
/** This function append a call to list.
* @param c The call you want to add */
/**
* This function append a call to list.
* @param c The call you want to add
*/
void call_list_add (call_t * c);
/** This function remove a call from list.
* @param callID The callID of the call you want to remove
*/
/**
* This function remove a call from list.
* @param callID The callID of the call you want to remove
*/
void call_list_remove (const gchar * callID);
/** Return the first call that corresponds to the state.
* This is usefull for unique states as DIALING and CURRENT.
* @param state The state
* @return A call or NULL */
/**
* Return the first call that corresponds to the state.
* This is usefull for unique states as DIALING and CURRENT.
* @param state The state
* @return A call or NULL
*/
call_t * call_list_get_by_state ( call_state_t state);
/** Return the number of calls in the list
* @return The number of calls in the list */
/**
* Return the number of calls in the list
* @return The number of calls in the list
*/
guint call_list_get_size ( );
/** Return the call at the nth position in the list
* @param n The position of the call you want
* @return A call or NULL */
/**
* Return the call at the nth position in the list
* @param n The position of the call you want
* @return A call or NULL
*/
call_t * call_list_get_nth ( guint n );
/** Return the call corresponding to the callID
* @param n The callID of the call you want
* @return A call or NULL */
/**
* Return the call corresponding to the callID
* @param n The callID of the call you want
* @return A call or NULL
*/
call_t * call_list_get ( const gchar * callID );
/** This function parse the call_t.from field to return the name
* @param c The call
* @return The full name of the caller or an empty string */
/**
* This function parse the call_t.from field to return the name
* @param c The call
* @return The full name of the caller or an empty string
*/
gchar * call_get_name (const call_t * c);
/** This function parse the call_t.from field to return the number
* @param c The call
* @return The number of the caller */
/**
* This function parse the call_t.from field to return the number
* @param c The call
* @return The number of the caller
*/
gchar * call_get_number (const call_t * c);
/** Mark a call as selected. There can be only one selected call. This call
* is the currently highlighted one in the list.
* @param c The call */
/**
* Mark a call as selected. There can be only one selected call. This call
* is the currently highlighted one in the list.
* @param c The call
*/
void call_select ( call_t * c );
/** Return the selected call.
* @return The number of the caller */
/**
* Return the selected call.
* @return The number of the caller
*/
call_t * call_get_selected ();
#endif
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
......
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc@squidy.info>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -26,14 +26,40 @@
/** @file calltree.h
* @brief The GtkTreeView that list calls in the main window.
*/
/**
* Create a new widget calltree
* @return GtkWidget* A new widget
*/
GtkWidget * create_call_tree();
/**
* Update the toolbar's buttons state, according to the call state
*/
void toolbar_update_buttons();
/**
* Add a call in the calltree
* @param c The call to add
*/
void update_call_tree_add (call_t * c);
/**
* Update the call tree if the call state changes
* @param c The call to update
*/
void update_call_tree (call_t * c);
/**
* Remove a call from the call tree
* @param c The call to remove
*/
void update_call_tree_remove (call_t * c);
/**
* Build the toolbar
* @return GtkWidget* The toolbar
*/
GtkWidget * create_toolbar();
#endif
......@@ -26,22 +26,72 @@
*/
typedef struct {
/** Payload of the codec */
int _payload;
/** Tells if the codec has been activated */
gboolean is_active;
/** String description */
gchar * name;
/** Sample rate */
int sample_rate;
/** Bitrate */
gdouble _bitrate;
/** Bandwidth */
gdouble _bandwidth;
}codec_t;
/** @struct codec_t
* @brief Codec information.
* This struct holds information about a codec.
* This match how the server internally works and the dbus API to save and retrieve the codecs details.
*/
/**
* This function initialize the codec list.
*/
void codec_list_init();
/**
* This function empty and free the codec list.
*/
void codec_list_clear();
/**
* This function append an codec to list.
* @param a The codec you want to add
*/
void codec_list_add(codec_t * c);
/**
* Set a codec active. An active codec will be used for codec negociation
* @param name The string description of the codec
*/
void codec_set_active(gchar* name);
/**
* Set a codec inactive. An active codec won't be used for codec negociation
* @param name The string description of the codec
*/
void codec_set_inactive(gchar* name);
/**
* Return the number of codecs in the list
* @return guint The number of codecs in the list
*/
guint codec_list_get_size();
/**
* Return the codec structure that corresponds to the string description
* @param name The string description of the codec
* @return codec_t* A codec or NULL
*/
codec_t * codec_list_get(const gchar * name);
//codec_t * codec_list_get(const int payload);
/**
* Return the codec at the nth position in the list
* @param index The position of the codec you want
* @return codec_t* A codec or NULL
*/
codec_t* codec_list_get_nth(guint index);
/**
......@@ -49,11 +99,22 @@ codec_t* codec_list_get_nth(guint index);
* @param index The position in the list of the prefered codec
*/
void codec_set_prefered_order(guint index);
//gchar * codec_get_name(codec_t * c);
//guint codec_get_rate(gchar * codec_name);