Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
entrance_auth.c entrance_auth.h entrance_config.h
entrance_session.c entrance_session.h entrance_user.c
entrance_user.h main.c
Log Message:
yay ! most of this is all docced up now
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_auth.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- entrance_auth.c 3 Mar 2004 17:34:26 -0000 1.12
+++ entrance_auth.c 3 Mar 2004 18:16:15 -0000 1.13
@@ -268,9 +268,9 @@
}
/**
- * entrance_auth_set_user - set the username in the struct
- * @e - the Entrance_Auth to set the user of
- * @str - a string to set the user to, NULL is fine
+ * set the username in the struct
+ * @param e - the Entrance_Auth to set the user of
+ * @param str - a string to set the user to, NULL is fine
* @return 0 on success, 1 on failure(User not in system)
* Check to see if the user exists on the system, if they do, e->user is set
* to the passed in string, if they don't, e->user is unmodified.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_auth.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- entrance_auth.h 1 Jan 2004 20:58:55 -0000 1.6
+++ entrance_auth.h 3 Mar 2004 18:16:15 -0000 1.7
@@ -25,6 +25,11 @@
# include <shadow.h>
#endif
+/**
[EMAIL PROTECTED] entrance_auth.h
[EMAIL PROTECTED] Declares Entrance_Auth struct, and return value types
+*/
+
#define AUTH_SUCCESS 0
#define E_SUCCESS 0
#define ERROR_NO_PAM_INIT 1
@@ -34,6 +39,9 @@
#define ERROR_CRED_EXPIRED 5
#define ERROR_BAD_CRED 6
+/**
+ * Collection of data relating to authenticating off of the system
+ */
struct _Entrance_Auth
{
#ifdef HAVE_PAM
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_config.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- entrance_config.h 3 Mar 2004 15:09:03 -0000 1.10
+++ entrance_config.h 3 Mar 2004 18:16:15 -0000 1.11
@@ -1,6 +1,9 @@
#ifndef _ENTRANCE_CONFIG
#define _ENTRANCE_CONFIG
-
+/**
+ * @file entrance_config.h
+ * @brief Struct Definitions and shared function declarations
+ */
#include "../config.h"
#include <Edb.h>
#include <Evas.h>
@@ -15,6 +18,9 @@
#define ENTRANCE_USE_PAM 1
#define ENTRANCE_USE_SHADOW 2
+/**
+ * This contains all of the configuration options that the system can set
+ */
struct _Entrance_Config
{
/**
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- entrance_session.c 3 Mar 2004 17:34:26 -0000 1.34
+++ entrance_session.c 3 Mar 2004 18:16:15 -0000 1.35
@@ -425,10 +425,9 @@
}
/**
- * entrance_session_edje_object_set : Set the main edje for the session to
- * be the parameter passed in
+ * Set the main edje for the session to be the parameter passed in
* @param e - the entrance session you want to modify
- * @param o - the new edje you're specifying
+ * @param obj - the new edje you're specifying
*/
void
entrance_session_edje_object_set(Entrance_Session * e, Evas_Object * obj)
@@ -555,12 +554,12 @@
}
/**
- * _entrance_session_icon_load : given the filename, create a new evas
- * object(edje or image) with the contents of file. file can either bea
- * valid edje eet or anything your evas has images loaders for.
+ * given the filename, create a new evas object(edje or image) with the
+ * contents of file. file can either bea valid edje eet or anything your
+ * evas has images loaders for.
* FIXME: Should this be its own smart object, user images are done similar
* FIXME: Should it support a "key" paramater as well
- * @param e - the entrance session you're working with
+ * @param o - the entrance session you're working with
* @param file - the file in $pkgdatadir/images/sessions/ we want to load
*/
static Evas_Object *
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- entrance_session.h 3 Mar 2004 15:09:03 -0000 1.13
+++ entrance_session.h 3 Mar 2004 18:16:15 -0000 1.14
@@ -11,20 +11,27 @@
#include<string.h>
#include<unistd.h>
#include<syslog.h>
-
+/**
+ * @file entrance_session.h
+ * @brief Struct Definitions and shared function declarations
+ */
#include "entrance_auth.h"
#include "entrance_config.h"
#include "entrance_user.h"
+/**
+ * This is the handle to all of the data we've allocated in entrance
+ */
struct _Entrance_Session
{
- char *session;
+ char *session; /* the current session in context */
Ecore_Evas *ee; /* the ecore_evas */
- Evas_Object *edje; /* main theme edje */
- Entrance_Auth *auth; /* encapsulated auth shit */
+ Evas_Object *edje; /* the main theme edje */
+ Entrance_Auth *auth; /* encapsulated auth info */
Entrance_Config *config; /* configuration options */
- int authed;
+ int authed; /* whether or not the user has authenticated
+ * or not */
};
typedef struct _Entrance_Session Entrance_Session;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_user.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- entrance_user.c 3 Mar 2004 17:34:26 -0000 1.3
+++ entrance_user.c 3 Mar 2004 18:16:15 -0000 1.4
@@ -13,9 +13,6 @@
*/
-/**
- * protos
- */
static Evas_Object *_entrance_user_icon_load(Evas_Object * o, char *file);
extern void user_selected_cb(void *data, Evas_Object * o,
const char *emission, const char *source);
@@ -81,7 +78,7 @@
* entrance_user_edje_get : get the Evas_Object(edje||image) that is
* specified in config db. Their "EntranceFace"
* @param e - the Entrance_User to get the edje for
- * @para edje - a pointer to the main edje in entrance
+ * @param edje - a pointer to the main edje in entrance
* @return NULL on failure, a valid Evas_Object on success
*/
Evas_Object *
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_user.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- entrance_user.h 3 Mar 2004 15:09:34 -0000 1.1
+++ entrance_user.h 3 Mar 2004 18:16:15 -0000 1.2
@@ -1,10 +1,16 @@
#ifndef ENTRANCE_USER_H
#define ENTRANCE_USER_H
-
+/**
+ * @file entrance_user.h
+ * @brief Struct Definitions and shared function declarations
+ */
#include <Evas.h>
typedef struct _Entrance_User Entrance_User;
+/**
+ * @brief This contains all of the information we keep about users
+ */
struct _Entrance_User
{
char *name;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- main.c 3 Mar 2004 17:34:26 -0000 1.36
+++ main.c 3 Mar 2004 18:16:15 -0000 1.37
@@ -20,11 +20,10 @@
static Entrance_Session *session = NULL;
int _entrance_test_en = 0;
-/* Callbacks for entrance */
/**
- * get_my_hostname - get the hostname of the machine, surrounded by the
- * before and after strings the config specifies
- * Returns - a valid string for the hostname, Localhost on failure or
+ * get the hostname of the machine, surrounded by the before and after
+ * strings the config specifies
+ * @return - a valid string for the hostname, Localhost on failure or
* whatever the system provides
*/
static char *
@@ -55,10 +54,11 @@
}
/**
- * exit_cb - what to do if we SIGINT(^c) it
- * @data - no clue
- * @ev_type - kill event ?
- * @ev - event data
+ * what to do if we SIGINT(^c) it
+ * @param data - no clue
+ * @param ev_type - kill event ?
+ * @param ev - event data
+ * @return 1
* Obviously I want to exit here.
*/
static int
@@ -69,8 +69,8 @@
}
/**
- * window_del_cb - what to do when we receive a window delete event
- * @ee - the Ecore_Evas that received the event
+ * what to do when we receive a window delete event
+ * @param ee - the Ecore_Evas that received the event
*/
static void
window_del_cb(Ecore_Evas * ee)
@@ -79,8 +79,8 @@
}
/**
- * window_resize_cb - handle when the ecore_evas needs to be resized
- * @ee - The Ecore_Evas we're resizing
+ * handle when the ecore_evas needs to be resized
+ * @param ee - The Ecore_Evas we're resizing
*/
static void
window_resize_cb(Ecore_Evas * ee)
@@ -97,10 +97,9 @@
}
/**
- * focus_swap - swap key input focus between the password and user
- * entries
- * @o - the object we want to swap focus with
- * @selecto - whether to focus on o, or the other entry
+ * swap key input focus between the password and user entries
+ * @param o - the object we want to swap focus with
+ * @param selecto - whether to focus on o, or the other entry
*/
static void
focus_swap(Evas_Object * o, int selecto)
@@ -140,9 +139,9 @@
}
/**
- * interp_return_key - when Enter is hit on the keyboard we end up here
- * @data - The smart object that is this Entry
- * @str - The string that was in the buffer when Enter was pressed
+ * when Enter is hit on the keyboard we end up here
+ * @param data - The smart object that is this Entry
+ * @param str - The string that was in the buffer when Enter was pressed
*/
static void
interp_return_key(void *data, const char *str)
@@ -192,11 +191,11 @@
}
/**
- * focus - an edje signal emission
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * an edje signal emission
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
*/
static void
focus(void *data, Evas_Object * o, const char *emission, const char *source)
@@ -226,11 +225,11 @@
}
/**
- * set_date - an edje signal emission
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Set the "EntranceDate" part's text
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
* Attempt to set the Part named "EntranceDate" to the results of
* localtime. This way the interval is configurable via a program in
* the theme and not statically bound to a value.
@@ -252,11 +251,11 @@
}
/**
- * set_time - an edje signal emission
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Set the "EntranceTime" part's text
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
* Attempt to set the Part named "EntranceTime" to the results of
* localtime. This way the interval is configurable via a program in
* the theme and not statically bound to a value.
@@ -278,11 +277,11 @@
}
/**
- * done_cb - Executed when an EntranceAuthSuccessDone signal is emitted
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Executed when an EntranceAuthSuccessDone signal is emitted
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
* Ensure that the session is authed, and quit the main ecore_loop
*/
static void
@@ -295,11 +294,11 @@
}
/**
- * session_item_selected_cb - Executed when a Session is selected
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Executed when a Session is selected
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
* Attempt to set the Part named "EntranceTime" to the results of
* localtime. This way the interval is configurable via a program in
* the theme and not statically bound to a value.
@@ -315,11 +314,11 @@
}
/**
- * session_item_selected_cb - Executed when a Session is selected
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Executed when a Session is selected
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
* Attempt to set the Part named "EntranceTime" to the results of
* localtime. This way the interval is configurable via a program in
* the theme and not statically bound to a value.
@@ -335,11 +334,11 @@
}
/**
- * session_item_selected_cb - Executed when a Session is selected
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Executed when a Session is unselected
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
* Set the current EntranceFace part back to nothing
*/
void
@@ -353,11 +352,11 @@
}
/**
- * reboot_cb - Executed when an EntranceSystemReboot signal is emitted
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Executed when an EntranceSystemReboot signal is emitted
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
*/
static void
reboot_cb(void *data, Evas_Object * o, const char *emission,
@@ -391,11 +390,11 @@
}
/**
- * shutdown_cb - Executed when an EntranceSystemHalt signal is emitted
- * @data - the data passed when the callback was added
- * @o - the evas object(Edje) that created the signal
- * @emission - the signal "type" that was emitted
- * @source - the signal originated from this "part"
+ * Executed when an EntranceSystemHalt signal is emitted
+ * @param data - the data passed when the callback was added
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
*/
static void
shutdown_cb(void *data, Evas_Object * o, const char *emission,
@@ -427,6 +426,16 @@
}
}
}
+
+/**
+ * Executed when an SessionDefaultSet signal is emitted
+ * @param data - the Entrance_Session in context
+ * @param o - the evas object(Edje) that created the signal
+ * @param emission - the signal "type" that was emitted
+ * @param source - the signal originated from this "part"
+ * Save out the current Entrance_Session's EntranceSession as the user's new
+ * default session to be executed when they log in.
+ */
static void
_session_set(void *data, Evas_Object * o, const char *emission,
const char *source)
@@ -438,6 +447,11 @@
entrance_session_user_session_default_set(e);
}
}
+
+/**
+ * print the "Help" associated with the app, shows cli args etc
+ * @param argv the argv that was passed from the application
+ */
static void
entrance_help(char **argv)
{
@@ -479,7 +493,9 @@
}
/**
- * timer_cb - we handle this iteration outside of the theme
+ * we handle this iteration outside of the theme, update date and time
+ * @param data a pointer to the main edje in entrance
+ * @return 1 so the ecore_timer keeps going and going and ...
*/
int
timer_cb(void *data)
@@ -496,9 +512,10 @@
/**
* main - where it all starts !
- * @argc - the number of arguments entrance was called with
- * @argv - the args entrance was called with
- * <p>Entrance works like this:<ol>
+ * @param argc - the number of arguments entrance was called with
+ * @param argv - the args entrance was called with
+ * <p>Entrance works like this:</p>
+ * <ol>
* <li> Init Ecore </li>
* <li> Parse command line arguments </li>
* <li> Create a New Entrance_Session(Parses config for you) </li>
@@ -519,6 +536,7 @@
* <li> Run.............. until ecore_main_loop_quit is called</li>
* <li> If the user is authenticated, try to run their session</li>
* <li>Shut down edje, ecore_evas, ecore_x, ecore</li>
+ * </ol>
*/
int
main(int argc, char *argv[])
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs