~thomas-voss/platform-api/fix-1202309

« back to all changes in this revision

Viewing changes to include/ubuntu/application/instance.h

Add first wave of doxygen documentation and make the documentation known to the packaging setup.

Approved by PS Jenkins bot, Ricardo Salveti.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 *
16
16
 * Authored by: Ricardo Mendoza <ricardo.mendoza@canonical.com>
17
 
 *              Thomas Voß <thomas.voss@canonical.com>           
 
17
 *              Thomas Voß <thomas.voss@canonical.com>
18
18
 */
19
19
 
20
20
#ifndef UBUNTU_APPLICATION_INSTANCE_H_
27
27
extern "C" {
28
28
#endif
29
29
 
 
30
    /** \defgroup application_support Functions and types to support application development. */
 
31
 
 
32
    /**
 
33
     * \brief Opaque type describing an application instance.
 
34
     * \ingroup application_support
 
35
     * An application instance encapsulates the event loop of an app.
 
36
     */
30
37
    typedef void UApplicationInstance;
31
 
    
 
38
 
 
39
    /**
 
40
     * \brief Creates a new application instance with a reference count of 1.
 
41
     * \ingroup application_support
 
42
     * \returns A new application instance or NULL in case of low-memory.
 
43
     * \param[in] desc A description object, must not be NULL.
 
44
     * \param[in] options An options object, must not be NULL.
 
45
     */
32
46
    UApplicationInstance*
33
47
    u_application_instance_new_from_description_with_options(
34
 
        UApplicationDescription *desc,
35
 
        UApplicationOptions *options);
36
 
    
 
48
        UApplicationDescription *desc,
 
49
        UApplicationOptions *options);
 
50
 
 
51
    /**
 
52
     * \brief Increments the reference count of an application instance.
 
53
     * \ingroup application_support
 
54
     * \param[in] instance The instance to increment the reference count for.
 
55
     */
37
56
    void
38
57
    u_application_instance_ref(
39
 
        UApplicationInstance *instance);
40
 
    
 
58
        UApplicationInstance *instance);
 
59
 
 
60
    /**
 
61
     * \brief Decrements the reference count of an application instance and releases all resources held by the object if the reference count reaches 0.
 
62
     * \ingroup application_support
 
63
     * \param[in] instance The instance to decrement the reference count for.
 
64
     */
41
65
    void
42
66
    u_application_instance_unref(
43
 
        UApplicationInstance *instance);
44
 
    
 
67
        UApplicationInstance *instance);
 
68
 
 
69
    /**
 
70
     * \brief Destroys the application instance and releases all its resources.
 
71
     * \ingroup application_support
 
72
     * \param[in] instance The instance to be destroyed.
 
73
     */
45
74
    void
46
75
    u_application_instance_destroy(
47
 
        UApplicationInstance *instance);
48
 
    
 
76
        UApplicationInstance *instance);
 
77
 
 
78
    /**
 
79
     * \brief Executes the event loop of the application instance
 
80
     * \ingroup application_support
 
81
     * \param[in] instance The instance to be executed.
 
82
     */
49
83
    void
50
84
    u_application_instance_run(
51
 
        UApplicationInstance *instance);
 
85
        UApplicationInstance *instance);
52
86
 
53
87
#ifdef __cplusplus
54
88
}
55
89
#endif
56
 
    
 
90
 
57
91
#endif /* UBUNTU_APPLICATION_INSTANCE_H_ */