def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'pages'): self.pages = [] self.pages.append(Page(buffer, buffer.uint32())) elif category == 2: self.chapter_id = buffer.uint32() elif category == 3: if not hasattr(self, 'chapters'): self.chapters = [] self.chapters.append(Chapter(buffer, buffer.uint32())) elif category == 4: self.sns_info = SNS(buffer, buffer.uint32()) elif category == 5: self.title_name = buffer.string() elif category == 6: self.chapter_name = buffer.string() elif category == 7: self.number_of_comments = buffer.uint32() elif category == 8: self.is_vertical_only = buffer.boolean() elif category == 9: self.title_id = buffer.uint32() elif category == 10: self.start_from_right = buffer.boolean() elif category == 11: self.region_code = buffer.string() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.current_chapter = Chapter(buffer, buffer.uint32()) elif category == 2: self.next_chapter = Chapter(buffer, buffer.uint32()) elif category == 3: if not hasattr(self, 'top_comments'): self.top_comments = [] self.top_comments.append(Comment(buffer, buffer.uint32())) elif category == 4: self.subscribed = buffer.boolean() elif category == 5: self.next_time_stamp = buffer.uint32() elif category == 6: self.chapter_type = buffer.int32() elif category == 7: self.advertisement = AdNetwork(buffer, buffer.uint32()) elif category == 8: self.movieReward = Popup(buffer, buffer.uint32()) elif category == 9: if not hasattr(self, 'banners'): self.banners = [] self.banners.append(Banner(buffer, buffer.uint32())) elif category == 10: if not hasattr(self, 'ticket_titles'): self.ticket_titles = [] self.ticket_titles.append(Title(buffer, buffer.uint32())) elif category == 11: self.publisher_banner = Banner(buffer, buffer.uint32()) elif category == 12: self.user_ticket = UserTickets(buffer, buffer.uint32()) elif category == 13: self.is_next_chapter_read_by_ticket = buffer.boolean() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.title = Title(buffer, buffer.uint32()) elif category == 2: self.chapter_id = buffer.uint32() elif category == 3: self.chapter_name = buffer.string() elif category == 4: self.chapter_sub_title = buffer.string() elif category == 5: self.is_latest = buffer.boolean() elif category == 6: self.is_vertical_only = buffer.boolean() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.my_icon = CommentIcon(buffer, buffer.uint32()) elif category == 2: self.user_name = buffer.string() elif category == 3: self.notice_of_news_and_events = buffer.boolean() elif category == 4: self.notice_of_updates_of_subscribed_titles = buffer.boolean() elif category == 5: self.english_titles_count = buffer.uint32() elif category == 6: self.spanish_titles_count = buffer.uint32() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'comments'): self.comments = [] self.comments.append(Comment(buffer, buffer.uint32())) elif category == 2: self.is_set_username = buffer.boolean() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.gdpr_agreement_required = buffer.boolean() elif category == 2: self.english_titles_count = buffer.uint32() elif category == 3: self.spanish_titles_count = buffer.uint32() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.id = buffer.uint32() elif category == 2: self.index = buffer.uint32() elif category == 3: self.username = buffer.string() elif category == 4: self.icon_url = buffer.string() elif category == 6: self.is_my_comment = buffer.boolean() elif category == 7: self.already_liked = buffer.boolean() elif category == 9: self.number_of_likes = buffer.uint32() elif category == 10: self.body = buffer.string() elif category == 11: self.created = buffer.uint32() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.is_featured_update = buffer.boolean() elif category == 2: self.registration_data = RegistrationData(buffer, buffer.uint32()) elif category == 3: self.home_view = HomeView(buffer, buffer.uint32()) elif category == 4: self.featured_titles_view = FeaturedTitlesView( buffer, buffer.uint32()) elif category == 5: self.all_titles_view = AllTitlesView(buffer, buffer.uint32()) elif category == 6: self.title_ranking_view = TitleRankingView(buffer, buffer.uint32()) elif category == 7: self.subscribed_titles_view = SubscribedTitlesView( buffer, buffer.uint32()) elif category == 8: self.title_detail_view = TitleDetailView(buffer, buffer.uint32()) elif category == 9: self.comment_list_view = CommentListView(buffer, buffer.uint32()) elif category == 10: self.manga_viewer = MangaViewer(buffer, buffer.uint32()) elif category == 11: self.web_home_view = WebHomeView(buffer, buffer.uint32()) elif category == 12: self.settings_view = SettingsView(buffer, buffer.uint32()) elif category == 13: self.profile_settings_view = ProfileSettingsView( buffer, buffer.uint32()) elif category == 14: self.update_profile_results_view = UpdateProfileResultsView( buffer, buffer.uint32()) elif category == 15: self.service_announcements_view = ServiceAnnouncementsView( buffer, buffer.uint32()) elif category == 16: self.initial_view = InitialView(buffer, buffer.uint32()) elif category == 17: self.feedback_view = FeedbackView(buffer, buffer.uint32()) else: buffer.skip_type(skip)