- audioscrobbler_queue_t *p_first_queue; /* 1st queue */
- vlc_mutex_t lock; /* p_sys mutex */
-
-/* data about audioscrobbler session */
- int i_interval; /* last interval recorded */
- time_t time_last_interval; /* when was it recorded ? */
- char *psz_submit_host; /* where to submit data ? */
- int i_submit_port; /* at which port ? */
- char *psz_submit_file; /* in which file ? */
- char *psz_username; /* last.fm username */
- vlc_bool_t b_handshaked; /* did we handshake ? */
- int i_post_socket; /* socket for submission */
- char *psz_response_md5; /* md5 response to use */
-
-/* data about input elements */
- input_thread_t *p_input; /* previous p_input */
- audioscrobbler_song_t *p_current_song; /* song being played */
- time_t time_pause; /* time when vlc paused */
- time_t time_total_pauses; /* sum of time in pause */
- vlc_bool_t b_queued; /* has it been queud ? */
- vlc_bool_t b_metadata_read; /* did we read metadata ? */
- vlc_bool_t b_paused; /* are we playing ? */
+ audioscrobbler_song_t p_queue[QUEUE_MAX]; /**< songs not submitted yet*/
+ int i_songs; /**< number of songs */
+
+ vlc_mutex_t lock; /**< p_sys mutex */
+ vlc_cond_t wait; /**< song to submit event */
+
+ /* data about audioscrobbler session */
+ mtime_t next_exchange; /**< when can we send data */
+ unsigned int i_interval; /**< waiting interval (secs)*/
+
+ /* submission of played songs */
+ char *psz_submit_host; /**< where to submit data */
+ int i_submit_port; /**< port to which submit */
+ char *psz_submit_file; /**< file to which submit */
+
+ /* submission of playing song */
+#if 0 //NOT USED
+ char *psz_nowp_host; /**< where to submit data */
+ int i_nowp_port; /**< port to which submit */
+ char *psz_nowp_file; /**< file to which submit */
+#endif
+ bool b_handshaked; /**< are we authenticated ? */
+ char psz_auth_token[33]; /**< Authentication token */
+
+ /* data about song currently playing */
+ audioscrobbler_song_t p_current_song; /**< song being played */
+
+ mtime_t time_pause; /**< time when vlc paused */
+ mtime_t time_total_pauses; /**< total time in pause */
+
+ bool b_submit; /**< do we have to submit ? */
+
+ bool b_state_cb; /**< if we registered the
+ * "state" callback */
+
+ bool b_meta_read; /**< if we read the song's
+ * metadata already */