def _decode(self, buffer: MPData, category, skip): if category == 1: self.id = buffer.uint32() elif category == 2: self.image_url = buffer.string() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.success = SuccessResult(buffer, buffer.uint32()) elif category == 2: self.error = ErrorResult(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'ad_networks'): self.ad_networks = [] self.ad_networks.append(AdNetwork(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'feedback_list'): self.feedback_list = [] self.feedback_list.append(Feedback(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.banner = Banner(buffer, buffer.uint32()) elif category == 2: self.title_list = TitleList(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'titles'): self.titles = [] self.titles.append(Title(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.os_default = OSDefault(buffer, buffer.uint32()) elif category == 2: self.app_default = AppDefault(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.text = buffer.string() elif category == 2: self.action = TransitionAction(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'service_announcements'): self.service_announcements = [] self.service_announcements.append( ServiceAnnouncement(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.list_name = buffer.string() elif category == 2: if not hasattr(self, 'featured_titles'): self.featured_titles = [] self.featured_titles.append(Title(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.banner_title = buffer.string() elif category == 2: if not hasattr(self, 'banners'): self.banners = [] self.banners.append(Banner(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.time_stamp = buffer.uint32() elif category == 2: self.body = buffer.string() elif category == 3: self.response_type = buffer.int32() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.title = buffer.string() elif category == 2: self.body = buffer.string() elif category == 3: self.date = buffer.int32() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.group_name = buffer.string() elif category == 2: if not hasattr(self, 'titles'): self.titles = [] self.titles.append(UpdatedTitle(buffer, 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: if not hasattr(self, 'icon_list'): self.icon_list = [] self.icon_list.append(CommentIcon(buffer, buffer.uint32())) elif category == 2: self.user_name = buffer.string() elif category == 3: self.my_icon = CommentIcon(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: if not hasattr(self, 'top_banners'): self.top_banners = [] self.top_banners.append(Banner(buffer, buffer.uint32())) elif category == 2: if not hasattr(self, 'groups'): self.groups = [] self.groups.append(UpdatedTitleGroup(buffer, buffer.uint32())) elif category == 3: if not hasattr(self, 'ranking'): self.ranking = [] self.ranking.append(Title(buffer, buffer.uint32())) 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: self.subject = buffer.string() elif category == 2: self.body = buffer.string() elif category == 3: self.ok_button = Button(buffer, buffer.uint32()) elif category == 4: self.neutral_button = Button(buffer, buffer.uint32()) elif category == 5: self.cancel_button = Button(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.image = buffer.string() elif category == 2: self.width = buffer.uint32() elif category == 3: self.height = buffer.uint32() elif category == 4: self.type = buffer.int32() elif category == 5: self.encryption_key = buffer.string() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.manga_page = MangaPage(buffer, buffer.uint32()) elif category == 2: self.banner_list = BannerList(buffer, buffer.uint32()) elif category == 3: self.last_page = LastPage(buffer, buffer.uint32()) elif category == 4: self.advertisement = AdNetworkList(buffer, buffer.uint32()) else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.action = buffer.int32() elif category == 2: self.english_popup = OSDefault(buffer, buffer.uint32()) elif category == 3: self.spanish_popup = OSDefault(buffer, buffer.uint32()) elif category == 4: self.debug_info = buffer.string() else: buffer.skip_type(skip)
def _decode(self, buffer: MPData, category, skip): if category == 1: self.main_banner = Banner(buffer, buffer.uint32()) elif category == 2: self.sub_banner_one = Banner(buffer, buffer.uint32()) elif category == 3: self.sub_banner_two = Banner(buffer, buffer.uint32()) elif category == 4: if not hasattr(self, 'contents'): self.contents = [] self.contents.append(Contents(buffer, buffer.uint32())) else: buffer.skip_type(skip)
def parse(buffer: bytes): data = MPData(list(buffer)) return Response(data, len(data))
def _decode(self, buffer: MPData, category, skip): if category == 1: self.placement_id = 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: 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.device_secret = buffer.string() else: buffer.skip_type(skip)