Changeset 80ddb522d75cca49a7337c62431709be670c9bdd
- Timestamp:
- 05/10/08 11:29:25
(2 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1210411765 +0300
- git-parent:
[5cf8c8914099fbdd678ddb071d4f410abace65e8]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1210411765 +0300
- Message:
Move some internal message stuff to src/
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r973f2f0 |
r80ddb52 |
|
| 41 | 41 | * @{ |
|---|
| 42 | 42 | */ |
|---|
| 43 | | |
|---|
| 44 | | /** Internal message stack context */ |
|---|
| 45 | | typedef struct |
|---|
| 46 | | { |
|---|
| 47 | | int i_code; |
|---|
| 48 | | char * psz_message; |
|---|
| 49 | | } msg_context_t; |
|---|
| 50 | | |
|---|
| 51 | | void msg_StackSet ( int, const char*, ... ); |
|---|
| 52 | | void msg_StackAdd ( const char*, ... ); |
|---|
| 53 | | const char* msg_StackMsg ( void ); |
|---|
| 54 | 43 | |
|---|
| 55 | 44 | /** |
|---|
| … | … | |
| 116 | 105 | __msg_Generic( VLC_OBJECT(p_this), MSG_QUEUE_NORMAL, VLC_MSG_DBG, \ |
|---|
| 117 | 106 | MODULE_STRING, __VA_ARGS__ ) |
|---|
| 118 | | |
|---|
| 119 | | #define msg_Create(a) __msg_Create(VLC_OBJECT(a)) |
|---|
| 120 | | #define msg_Flush(a) __msg_Flush(VLC_OBJECT(a)) |
|---|
| 121 | | #define msg_Destroy(a) __msg_Destroy(VLC_OBJECT(a)) |
|---|
| 122 | | void __msg_Create ( vlc_object_t * ); |
|---|
| 123 | | void __msg_Flush ( vlc_object_t * ); |
|---|
| 124 | | void __msg_Destroy ( vlc_object_t * ); |
|---|
| 125 | 107 | |
|---|
| 126 | 108 | #define msg_Subscribe(a,b) __msg_Subscribe(VLC_OBJECT(a),b) |
|---|
| r3e1fea3 |
r80ddb52 |
|
| 90 | 90 | |
|---|
| 91 | 91 | /** |
|---|
| 92 | | * Store all data requiered by messages interfaces. |
|---|
| | 92 | * Store all data required by messages interfaces. |
|---|
| 93 | 93 | */ |
|---|
| 94 | 94 | typedef struct msg_bank_t |
|---|
| … | … | |
| 97 | 97 | msg_queue_t queues[NB_QUEUES]; |
|---|
| 98 | 98 | } msg_bank_t; |
|---|
| | 99 | |
|---|
| | 100 | void msg_Create (libvlc_int_t *); |
|---|
| | 101 | void msg_Flush (libvlc_int_t *); |
|---|
| | 102 | void msg_Destroy (libvlc_int_t *); |
|---|
| | 103 | |
|---|
| | 104 | /** Internal message stack context */ |
|---|
| | 105 | typedef struct |
|---|
| | 106 | { |
|---|
| | 107 | int i_code; |
|---|
| | 108 | char * psz_message; |
|---|
| | 109 | } msg_context_t; |
|---|
| | 110 | |
|---|
| | 111 | void msg_StackSet ( int, const char*, ... ); |
|---|
| | 112 | void msg_StackAdd ( const char*, ... ); |
|---|
| | 113 | const char* msg_StackMsg ( void ); |
|---|
| 99 | 114 | |
|---|
| 100 | 115 | /* |
|---|
| rf9b6eba |
r80ddb52 |
|
| 83 | 83 | * This function initializes all message queues |
|---|
| 84 | 84 | */ |
|---|
| 85 | | void __msg_Create( vlc_object_t *p_this ) |
|---|
| 86 | | { |
|---|
| 87 | | libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc); |
|---|
| | 85 | void msg_Create (libvlc_int_t *p_libvlc) |
|---|
| | 86 | { |
|---|
| | 87 | libvlc_priv_t *priv = libvlc_priv (p_libvlc); |
|---|
| 88 | 88 | vlc_mutex_init( &priv->msg_bank.lock ); |
|---|
| 89 | 89 | |
|---|
| … | … | |
| 111 | 111 | * Flush all message queues |
|---|
| 112 | 112 | */ |
|---|
| 113 | | void __msg_Flush( vlc_object_t *p_this ) |
|---|
| 114 | | { |
|---|
| 115 | | libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc); |
|---|
| | 113 | void msg_Flush (libvlc_int_t *p_libvlc) |
|---|
| | 114 | { |
|---|
| | 115 | libvlc_priv_t *priv = libvlc_priv (p_libvlc); |
|---|
| 116 | 116 | |
|---|
| 117 | 117 | for( int i = 0 ; i < NB_QUEUES ; i++ ) |
|---|
| … | … | |
| 130 | 130 | * No other messages interface functions should be called after this one. |
|---|
| 131 | 131 | */ |
|---|
| 132 | | void __msg_Destroy( vlc_object_t *p_this ) |
|---|
| 133 | | { |
|---|
| 134 | | libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc); |
|---|
| | 132 | void msg_Destroy (libvlc_int_t *p_libvlc) |
|---|
| | 133 | { |
|---|
| | 134 | libvlc_priv_t *priv = libvlc_priv (p_libvlc); |
|---|
| 135 | 135 | |
|---|
| 136 | 136 | for( int i = NB_QUEUES -1 ; i >= 0; i-- ) |
|---|
| 137 | 137 | { |
|---|
| 138 | 138 | if( QUEUE(i).i_sub ) |
|---|
| 139 | | msg_Err( p_this, "stale interface subscribers" ); |
|---|
| | 139 | msg_Err( p_libvlc, "stale interface subscribers" ); |
|---|
| 140 | 140 | |
|---|
| 141 | 141 | FlushMsg( &QUEUE(i) ); |
|---|