/** Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2011 Eric Haddad Koenig Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2011 Eric Haddad Koenig Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.all.core.events; import static com.all.event.EventType.ev; import java.io.File; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Set; import com.all.chat.ChatType; import com.all.client.model.DecoratedTwitterStatus; import com.all.client.model.DeviceBase; import com.all.client.model.Download; import com.all.core.actions.CloseType; import com.all.core.model.ContainerView; import com.all.core.model.Model; import com.all.core.model.ModelContainerView; import com.all.core.model.Profile; import com.all.core.model.SearchState; import com.all.core.model.SubViews; import com.all.downloader.search.SearchDataEvent; import com.all.downloader.search.SearchErrorEvent; import com.all.downloader.search.SearchProgressEvent; import com.all.event.EmptyEvent; import com.all.event.EventType; import com.all.event.ValueEvent; import com.all.shared.alert.Alert; import com.all.shared.alert.McRequestAlert; import com.all.shared.messages.FriendshipRequestStatus; import com.all.shared.model.ChatMessage; import com.all.shared.model.ContactInfo; import com.all.shared.model.Folder; import com.all.shared.model.ModelCollection; import com.all.shared.model.Playlist; import com.all.shared.model.Root; import com.all.shared.model.Track; import com.all.shared.model.TrackContainer; import com.all.shared.model.User; import com.all.shared.newsfeed.AllFeed; public interface Events { /** * Errores en acciones o en la aplicaci�n usualmente reaccionan clases para mostrar dialogos o notificar al usuario * con un popup imagen o algo. */ interface Errors { /** * se intent� invocar una acci�n que requiere uso de red por lo que la acci�n fall� pero arroj� este lindo evento */ String NETWORK_REQUIRED_FOR_ACTION_ID = "errors.networkRequiredForAction"; EventType<NetworkActionErrorEvent> NETWORK_REQUIRED_FOR_ACTION = ev(NETWORK_REQUIRED_FOR_ACTION_ID); /** Se intento importar de itunes pero faltaron algunos archivos. */ String IMPORT_FROM_ITUNES_MISSING_FILES_ID = "errors.importFromItunesHasMissingFiles"; EventType<ValueEvent<ModelCollection>> IMPORT_FROM_ITUNES_MISSING_FILES = ev(IMPORT_FROM_ITUNES_MISSING_FILES_ID); String SYNC_UPLOAD_FAILED_ID = "errors.syncUploadFailed"; EventType<EmptyEvent> SYNC_UPLOAD_FAILED = ev(SYNC_UPLOAD_FAILED_ID); String SYNC_DOWNLOAD_FAILED_ID = "errors.syncDownloadFailed"; EventType<LibrarySyncEvent> SYNC_DOWNLOAD_FAILED = ev(SYNC_DOWNLOAD_FAILED_ID); String ERROR_MESSAGE_ID = "errors.message"; EventType<ErrorMessageEvent> ERROR_MESSAGE = ev(ERROR_MESSAGE_ID); String DEVICE_FULL_ID = "errors.deviceFull"; EventType<EmptyEvent> DEVICE_FULL = ev(DEVICE_FULL_ID); String EXCEPTION_ID = "errors.exception"; EventType<ValueEvent<Exception>> EXCEPTION = ev(EXCEPTION_ID); String MODEL_IMPORT_INVALID_FILES_ID = "errors.modelImportInvalidFiles"; EventType<ValueEvent<List<File>>> MODEL_IMPORT_INVALID_FILES = ev(MODEL_IMPORT_INVALID_FILES_ID); } /** * Eventos que se originan por que la libreria del usuario est� siendo modificada. */ interface Library { String LOADING_LIBRARY_ID = "library.LoadingLibrary"; EventType<ValueEvent<String>> LOADING_LIBRARY = ev(LOADING_LIBRARY_ID); String IMPORTING_ITUNES_LIBRARY_ID = "library.ImportingItunes"; EventType<EmptyEvent> IMPORTING_ITUNES_LIBRARY = ev(IMPORTING_ITUNES_LIBRARY_ID); String IMPORTING_ITUNES_LIBRARY_DONE_ID = "library.ImportingItunesDone"; EventType<EmptyEvent> IMPORTING_ITUNES_LIBRARY_DONE = ev(IMPORTING_ITUNES_LIBRARY_DONE_ID); EventType<ValueEvent<Boolean>> ITUNES_UNIMPORTED_FILE_EXISTS_CHANGED = ev(Model.ITUNES_UNIMPORTED_FILE_EXISTS_ID); String RESTORE_SELECTION_ID = "library.restoreSelection"; EventType<ValueEvent<Object>> RESTORE_SELECTION = ev(RESTORE_SELECTION_ID); String PLAYLIST_CREATED_ID = "library.playlistCreated"; EventType<ValueEvent<Playlist>> PLAYLIST_CREATED = ev(PLAYLIST_CREATED_ID); String FOLDER_CREATED_ID = "library.folderCreated"; EventType<ValueEvent<Folder>> FOLDER_CREATED = ev(FOLDER_CREATED_ID); String EDIT_CURRENT_SELECTION_ID = "library.editRequested"; EventType<EmptyEvent> EDIT_CURRENT_SELECTION = ev(EDIT_CURRENT_SELECTION_ID); String IMPORT_PROGRESS_ID = "library.importProgress"; EventType<ImportProgressEvent> IMPORT_PROGRESS = ev(IMPORT_PROGRESS_ID); String IMPORT_COMPLETED_ID = "library.importCompleted"; EventType<EmptyEvent> IMPORT_COMPLETED = ev(IMPORT_COMPLETED_ID); String TREE_STRUCTURE_CHANGED_ID = "library.treeStructureChanged"; EventType<ValueEvent<Root>> TREE_STRUCTURE_CHANGED = ev(TREE_STRUCTURE_CHANGED_ID); String CONTAINER_MODIFIED_ID = "library.containerModified"; EventType<ContainerModifiedEvent> CONTAINER_MODIFIED = ev(CONTAINER_MODIFIED_ID); String TRACK_UPDATED_ID = "library.trackUpdated"; EventType<ValueEvent<Track>> TRACK_UPDATED = ev(TRACK_UPDATED_ID); String FOLDER_UPDATED_ID = "library.folderUpdated"; EventType<ValueEvent<Folder>> FOLDER_UPDATED = ev(FOLDER_UPDATED_ID); String SYNC_DOWNLOAD_EVENT_ID = "library.SyncDownloadEvent"; EventType<LibrarySyncEvent> SYNC_DOWNLOAD_EVENT = ev(SYNC_DOWNLOAD_EVENT_ID); String SYNC_DOWNLOAD_PROGRESS_EVENT_ID = "library.SyncDownloadEventProgress"; EventType<LibrarySyncProgressEvent> SYNC_DOWNLOAD_PROGRESS_EVENT = ev(SYNC_DOWNLOAD_PROGRESS_EVENT_ID); String SYNC_UPLOAD_EVENT_ID = "library.SyncUploadEvent"; EventType<ValueEvent<LibrarySyncEventType>> SYNC_UPLOAD_EVENT = ev(SYNC_UPLOAD_EVENT_ID); String LIBRARY_ROOT_ADDED_ID = "view.libraryRootAdded"; EventType<ValueEvent<Root>> LIBRARY_ROOT_ADDED = ev(LIBRARY_ROOT_ADDED_ID); String LIBRARY_ROOT_REMOVED_ID = "view.libraryRootRemoved"; EventType<ValueEvent<Root>> LIBRARY_ROOT_REMOVED = ev(LIBRARY_ROOT_REMOVED_ID); String NEW_CONTENT_AVAILABLE_ID = "library.newContentAvailable"; EventType<EmptyEvent> NEW_CONTENT_AVAILABLE = ev(NEW_CONTENT_AVAILABLE_ID); } /** * Eventos relacionados al estado de la aplicaci�n (cosas que se est�n mostrando, cosas seleccionadas, etc) */ interface Application { /** * Estado de la busqueda de tracks, indica cuando se empieza y se termina de buscar */ String SEARCH_TRACKS_ID = "app.SearchTracks"; EventType<ValueEvent<SearchState>> SEARCH_TRACKS = ev(SEARCH_TRACKS_ID); /** Notifica cuando cambian los tracks que est� viendo el usuario. */ EventType<ValueEvent<Integer>> DISPLAYED_ITEM_COUNT_CHANGED = ev(Model.DISPLAYED_ITEM_COUNT_ID); String STARTED_ID = "application.started"; /** * Notifica cuando la aplicaci�n est� lista para usarse (modelo inicializado y listo) */ EventType<ValueEvent<User>> STARTED = ev(STARTED_ID); String STOPED_ID = "application.userLogout"; /** Notifica cuando cambia el usuario hace logout */ EventType<ValueEvent<User>> STOPED = ev(STOPED_ID); EventType<ValueEvent<Collection<Alert>>> CURRENT_ALERTS_CHANGED = ev(Model.CURRENT_ALERTS_ID); String GENERIC_ERROR_MESSAGE_ID = "application.errorMessage"; EventType<ValueEvent<String>> GENERIC_ERROR_MESSAGE = ev(GENERIC_ERROR_MESSAGE_ID); String APP_CLOSE_ID = "application.close"; EventType<ValueEvent<CloseType>> APP_CLOSE = ev(APP_CLOSE_ID); } interface AutoUpdate { String UPDATE_FOUND_ID = "autoUpdate.updateFound"; EventType<ValueEvent<String>> UPDATE_FOUND = ev(UPDATE_FOUND_ID); String UPDATE_DOWNLOAD_PROGRESS_ID = "autoUpdate.updateDownloadProgress"; EventType<ValueEvent<Integer>> UPDATE_DOWNLOAD_PROGRESS = ev(UPDATE_DOWNLOAD_PROGRESS_ID); String UPDATE_DOWNLOAD_COMPLETED_ID = "autoUpdate.updateDownloadCompleted"; EventType<ValueEvent<File>> UPDATE_DOWNLOAD_COMPLETED = ev(UPDATE_DOWNLOAD_COMPLETED_ID); String UPDATE_NOT_FOUND_ID = "autoUpdate.updateNotFound"; EventType<EmptyEvent> UPDATE_NOT_FOUND = ev(UPDATE_NOT_FOUND_ID); String UPDATE_DOWNLOAD_ERROR_ID = "autoUpdate.updateDownloadError"; EventType<ValueEvent<String>> UPDATE_DOWNLOAD_ERROR = ev(UPDATE_DOWNLOAD_ERROR_ID); } /** Eventos que son originados por el player. */ interface Player { String VOLUME_CHANGED_ID = "player.volumeChanged"; EventType<ValueEvent<Integer>> VOLUME_CHANGED = ev(VOLUME_CHANGED_ID); String PROGRESS_CHANGED_ID = "player.progressChanged"; EventType<MediaPlayerProgressEvent> PROGRESS_CHANGED = ev(PROGRESS_CHANGED_ID); String PLAYCOUNT_CHANGED_ID = "player.playCountChanged"; EventType<ValueEvent<Track>> PLAYCOUNT_CHANGED = ev(PLAYCOUNT_CHANGED_ID); String TRACK_PLAYED_ID = "player.trackPlayed"; EventType<MediaPlayerTrackPlayedEvent> TRACK_PLAYED = ev(TRACK_PLAYED_ID); String PLAYING_PLAYLIST_CHANGED_ID = "player.playingPlaylistChanged"; EventType<ValueEvent<TrackContainer>> PLAYING_PLAYLIST_CHANGED = ev(PLAYING_PLAYLIST_CHANGED_ID); String STATE_CHANGED_ID = "player.stateChanged"; EventType<MediaPlayerStateEvent> STATE_CHANGED = ev(STATE_CHANGED_ID); String SELECTED_TRACKS_CHANGED_ID = "player.selectedTracksChanged"; EventType<ValueEvent<List<Track>>> SELECTED_TRACKS_CHANGED = ev(SELECTED_TRACKS_CHANGED_ID); String PLAY_ERROR_ID = "player.error"; EventType<MusicPlayerErrorEvent> PLAY_ERROR = ev(PLAY_ERROR_ID); } /** * Eventos que se originan para modificar la vista, son derivados de acciones. */ interface View { /** Mostrar mensaje en barra de status. */ String STATUS_BAR_MESSAGE_ID = "notifications.statusBarMessage"; EventType<ValueEvent<String>> STATUS_BAR_MESSAGE = ev(STATUS_BAR_MESSAGE_ID); /** Cambiar la vista del usuario, (el panel central) */ EventType<ValueEvent<ContainerView>> CURRENT_VIEW_CHANGED = ev(Model.CURRENT_VIEW_ID); /** Mostrar o ocultar el panel de alertas. */ EventType<ValueEvent<Boolean>> DRAWER_DISPLAYED_CHANGED = ev(Model.DRAWER_DISPLAYED_ID); EventType<ValueEvent<SubViews>> CURRENT_SUBVIEW_CHANGED = ev(Model.CURRENT_SUBVIEW_ID); String SELECTED_TRACKCONTAINER_CHANGED_ID = "view.SelectedTrackContainseChanged"; EventType<SelectTrackContainerEvent> SELECTED_TRACKCONTAINER_CHANGED = ev(SELECTED_TRACKCONTAINER_CHANGED_ID); String CLIPBOARD_SELECTION_CHANGED_ID = "clipboard.selectionChanged"; EventType<ValueEvent<List<?>>> CLIPBOARD_SELECTION_CHANGED = ev(CLIPBOARD_SELECTION_CHANGED_ID); String TOP_HUNDRED_CATEGORY_MODEL_SELECTION_ID = "topHundred.modelCategorySelection"; EventType<ValueEvent<ModelContainerView>> TOP_HUNDRED_CATEGORY_MODEL_SELECTION = ev(TOP_HUNDRED_CATEGORY_MODEL_SELECTION_ID); String TOP_HUNDRED_PLAYLIST_MODEL_SELECTION_ID = "topHundred.modelPlaylistSelection"; EventType<ValueEvent<ModelContainerView>> TOP_HUNDRED_PLAYLIST_MODEL_SELECTION = ev(TOP_HUNDRED_PLAYLIST_MODEL_SELECTION_ID); String SELECTED_PLAYING_TRACKCONTAINER_ID = "view.selectedPlayingTrackcontainer"; EventType<ValueEvent<TrackContainer>> SELECTED_PLAYING_TRACKCONTAINER = ev(SELECTED_PLAYING_TRACKCONTAINER_ID); } interface Social { String SHOW_SEND_CONTENT_DIALOG_ID = "social.showSendContentDialog"; EventType<SendContentEvent> SHOW_SEND_CONTENT_DIALOG = ev(SHOW_SEND_CONTENT_DIALOG_ID); String SHOW_POST_CONTENT_ON_FACEBOOK_DIALOG_ID = "social.showPostContentOnFacebookDialog"; EventType<FacebookPostContentEvent> SHOW_POST_CONTENT_ON_FACEBOOK_DIALOG = ev(SHOW_POST_CONTENT_ON_FACEBOOK_DIALOG_ID); String PROFILE_LOAD_ID = "social.profileLoad"; EventType<ProfileLoadEvent> PROFILE_LOAD = ev(PROFILE_LOAD_ID); EventType<ValueEvent<Profile>> CURRENT_PROFILE = ev(Model.CURRENT_PROFILE_ID); String TWITTER_NUMBER_OF_NEW_MESSAGES_RECEIVED_ID = "social.twitter.messagesUpdated"; EventType<ValueEvent<Long>> TWITTER_NUMBER_OF_NEW_MESSAGES_RECEIVED = ev(TWITTER_NUMBER_OF_NEW_MESSAGES_RECEIVED_ID); String TWITTER_LOGGED_ID = "social.twitter.loggedIn"; EventType<ValueEvent<Boolean>> TWITTER_LOGGED = ev(TWITTER_LOGGED_ID); String CONTACT_ADDED_ID = "social.contactAdded"; EventType<ValueEvent<ContactInfo>> CONTACT_ADDED = ev(CONTACT_ADDED_ID); String CONTACT_DELETED_ID = "social.contactDeleted"; EventType<ValueEvent<ContactInfo>> CONTACT_DELETED = ev(CONTACT_DELETED_ID); String CONTACT_UPDATED_ID = "social.contactUpdated"; EventType<ValueEvent<ContactInfo>> CONTACT_UPDATED = ev(CONTACT_UPDATED_ID); String EMAIL_INVITATION_SENT_ID = "social.pendingEmailConfirmation"; EventType<ValueEvent<List<String>>> EMAIL_INVITATION_SENT = ev(EMAIL_INVITATION_SENT_ID); String TWITTER_ERROR_ID = "social.twitterError"; EventType<ValueEvent<Integer>> TWITTER_ERROR = ev(TWITTER_ERROR_ID); String TWITTER_USER_TIMELINE_CHANGED_ID = "social.twitterTimelineChanged"; EventType<ValueEvent<List<DecoratedTwitterStatus>>> TWITTER_USER_TIMELINE_CHANGED = ev(TWITTER_USER_TIMELINE_CHANGED_ID); String REQUEST_FRIENDSHIP_RESPONSE_ID = "social.requestResult"; EventType<ValueEvent<FriendshipRequestStatus>> REQUEST_FRIENDSHIP_RESPONSE = ev(REQUEST_FRIENDSHIP_RESPONSE_ID); } interface Chat { String LOGIN_ID = "chat.facebook.logging"; EventType<ChatLoggingEvent> LOGIN = ev(LOGIN_ID); EventType<ValueEvent<ChatType>> SELECTED_CHAT_TYPE = ev(Model.SELECTED_CHAT_TYPE_ID); EventType<ValueEvent<List<ContactInfo>>> DISPLAYED_CONTACT_LIST_UPDATED = ev(Model.DISPLAYED_CONTACT_LIST_ID); String DISPLAY_FACEBOOK_AUTHORIZATION_DIALOG_ID = "chat.displayFacebookAuthorizationDialog"; EventType<EmptyEvent> DISPLAY_FACEBOOK_AUTHORIZATION_DIALOG = ev(DISPLAY_FACEBOOK_AUTHORIZATION_DIALOG_ID); String INCOMING_MESSAGE_ID = "chat.incomingMessage"; EventType<ValueEvent<ChatMessage>> INCOMING_MESSAGE = ev(INCOMING_MESSAGE_ID); } interface Downloads { String ADDED_ID = "download.added"; EventType<ValueEvent<Download>> ADDED = ev(ADDED_ID); String REMOVED_ID = "download.removed"; EventType<ValueEvent<Download>> REMOVED = ev(REMOVED_ID); String UPDATED_ID = "download.updated"; EventType<ValueEvent<Download>> UPDATED = ev(UPDATED_ID); String ALL_MODIFIED_ID = "download.all.modified"; EventType<EmptyEvent> ALL_MODIFIED = ev(ALL_MODIFIED_ID); String COMPLETED_ID = "download.completed"; EventType<ValueEvent<Download>> COMPLETED = ev(COMPLETED_ID); String TRACK_ALREADY_AVAILABLE_ID = "track.Already.Available"; EventType<EmptyEvent> TRACK_ALREADY_AVAILABLE = ev(TRACK_ALREADY_AVAILABLE_ID); } interface Search { String DATA_UPDATED_ID = "search.dataUpdated"; EventType<ValueEvent<SearchDataEvent>> DATA_UPDATED = ev(DATA_UPDATED_ID); String PROGRESS_ID = "search.progress"; EventType<ValueEvent<SearchProgressEvent>> PROGRESS = ev(PROGRESS_ID); String ERROR_ID = "search.error"; EventType<ValueEvent<SearchErrorEvent>> ERROR = ev(ERROR_ID); } interface Devices { String ADD_DEVICE_ID = "devices.addDevice"; EventType<ValueEvent<DeviceBase>> ADD_DEVICE = ev(ADD_DEVICE_ID); String REMOVE_DEVICE_ID = "devices.removeDevice"; EventType<ValueEvent<DeviceBase>> REMOVE_DEVICE = ev(REMOVE_DEVICE_ID); String FILE_PROGRESS_ID = "devices.fileProgress"; EventType<FileProgressEvent> FILE_PROGRESS = ev(FILE_PROGRESS_ID); String BYTE_PROGRESS_ID = "devices.byteProgress"; EventType<ByteProgressEvent> BYTE_PROGRESS = ev(BYTE_PROGRESS_ID); String START_COPY_ID = "devices.startCopy"; EventType<EmptyEvent> START_COPY = ev(START_COPY_ID); String FINISH_COPY_ID = "devices.finishCopy"; EventType<EmptyEvent> FINISH_COPY = ev(FINISH_COPY_ID); String CANNOT_COPY_ID = "devices.cannotCopy"; EventType<EmptyEvent> CANNOT_COPY = ev(CANNOT_COPY_ID); String DEVICE_FULL_ID = "devices.full"; EventType<EmptyEvent> DEVICE_FULL = ev(DEVICE_FULL_ID); } interface UserProfile { String USER_PROFILE_UPDATED_ID = "user.profileUpdated"; EventType<ValueEvent<User>> USER_PROFILE_UPDATED = ev(USER_PROFILE_UPDATED_ID); } interface Alerts { String CONFIRM_REQUEST_ALERT_ID = "alerts.sendRequestAlert"; EventType<ValueEvent<McRequestAlert>> CONFIRM_REQUEST_ALERT = ev(CONFIRM_REQUEST_ALERT_ID); String UPLOAD_CONTENT_STARTED_ID = "alerts.uploadContentStarted"; EventType<ValueEvent<Long>> UPLOAD_CONTENT_STARTED = ev(UPLOAD_CONTENT_STARTED_ID); String UPLOAD_CONTENT_DONE_ID = "alerts.uploadContentDone"; EventType<ValueEvent<Long>> UPLOAD_CONTENT_DONE = ev(UPLOAD_CONTENT_DONE_ID); String UPLOAD_CONTENT_PROGRESS_ID = "alerts.uploadContentProgress"; EventType<UploadContentProgressEvent> UPLOAD_CONTENT_PROGRESS = ev(UPLOAD_CONTENT_PROGRESS_ID); String NEW_ALERT_ID = "alerts.new"; EventType<EmptyEvent> NEW_ALERT = ev(NEW_ALERT_ID); String RECOMMENDATION_RESPONSE_ID = "alerts.facebookRecommendationId"; EventType<ValueEvent<Long>> RECOMMENDATION_RESPONSE = ev(RECOMMENDATION_RESPONSE_ID); } interface Feeds { String NEW_FEEDS_ID = "feeds.NewFeed"; EventType<ValueEvent<Set<AllFeed>>> NEW_FEEDS = ev(NEW_FEEDS_ID); String UPDATE_FEED_TIME_VIEW_ID = "feeds.updateFeedTimeView"; EventType<ValueEvent<Date>> UPDATE_FEED_TIME_VIEW = ev(UPDATE_FEED_TIME_VIEW_ID); } }