diff --git a/data/core.telegram.org/tdlib/docs.html b/data/core.telegram.org/tdlib/docs.html index 7830ff3297..a6dad42d1a 100644 --- a/data/core.telegram.org/tdlib/docs.html +++ b/data/core.telegram.org/tdlib/docs.html @@ -83,7 +83,6 @@ $(function() {
  • Examples and documentation
  • Dependencies
  • Building
  • -
  • Installing dependencies
  • Using in CMake C++ projects
  • Using in Java projects
  • Using in .NET projects
  • @@ -93,7 +92,7 @@ $(function() {

    Features

    TDLib has many advantages. Notably TDLib is:

    Building

    The simplest way to build TDLib is to use our TDLib build instructions generator. You need only to choose your programming language and target operating system to receive complete build instructions.

    -

    In general, you need to install all TDLib dependencies as described in Installing dependencies. Then enter directory containing TDLib sources and compile them using CMake:

    +

    In general, you need to install all TDLib dependencies, enter directory containing TDLib sources and compile them using CMake:

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    cmake --build .

    To build TDLib on low memory devices you can run SplitSource.php script before compiling main TDLib source code and compile only needed targets:

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    cmake --build . --target prepare_cross_compiling
    cd ..
    php SplitSource.php
    cd build
    cmake --build . --target tdjson
    cmake --build . --target tdjson_static
    cd ..
    php SplitSource.php --undo

    In our tests clang 6.0 with libc++ required less than 500 MB of RAM per file and GCC 4.9/6.3 used less than 1 GB of RAM per file.

    -

    Installing dependencies

    -

    macOS

    - -

    Windows

    - -

    To build 32-bit/64-bit TDLib using MSVC, you will need to additionally specify parameter -A Win32/-A x64 to CMake. To build TDLib in Release mode using MSVC, you will need to additionally specify parameter --config Release to the cmake --build . command.

    -

    Linux

    -

    Using in CMake C++ projects

    For C++ projects that use CMake, the best approach is to build TDLib as part of your project or to install it system-wide.

    There are several libraries that you could use in your CMake project:

    -

    For example, part of your CMakeLists.txt may look like this:

    add_subdirectory(td)
    target_link_libraries(YourTarget PRIVATE Td::TdStatic)

    Or you could install TDLib and then reference it in your CMakeLists.txt like this:

    find_package(Td 1.7.0 REQUIRED)
    target_link_libraries(YourTarget PRIVATE Td::TdStatic)

    See example/cpp/CMakeLists.txt.

    +

    For example, part of your CMakeLists.txt may look like this:

    add_subdirectory(td)
    target_link_libraries(YourTarget PRIVATE Td::TdStatic)

    Or you could install TDLib and then reference it in your CMakeLists.txt like this:

    find_package(Td 1.8.0 REQUIRED)
    target_link_libraries(YourTarget PRIVATE Td::TdStatic)

    See example/cpp/CMakeLists.txt.

    Using in Java projects

    TDLib provides native Java interface through JNI. To enable it, specify option -DTD_ENABLE_JNI=ON to CMake.

    See example/java for example of using TDLib from Java and detailed build and usage instructions.

    @@ -160,7 +137,7 @@ $(function() {

    TDLib provides native .NET interface through C++/CLI and C++/CX. To enable it, specify option -DTD_ENABLE_DOTNET=ON to CMake. .NET Core supports C++/CLI only since version 3.1 and only on Windows, so if older .NET Core is used or portability is needed, then TDLib JSON interface should be used through P/Invoke instead.

    See example/csharp for example of using TDLib from C# and detailed build and usage instructions. See example/uwp for example of using TDLib from C# UWP application and detailed build and usage instructions for Visual Studio Extension "TDLib for Universal Windows Platform".

    When TDLib is built with TD_ENABLE_DOTNET option enabled, C++ documentation is removed from some files. You need to checkout these files to return C++ documentation back:

    git checkout td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h

    Using from other programming languages

    -

    TDLib provides efficient native C++, Java, and .NET interfaces. But for most use cases we suggest to use the JSON interface, which can be easily used with any programming language that is able to execute C functions. See td_json_client and td_log documentation for detailed JSON interface description, the td_api.tl scheme or the automatically generated HTML documentation for a list of all available TDLib methods and classes.

    +

    TDLib provides efficient native C++, Java, and .NET interfaces. But for most use cases we suggest to use the JSON interface, which can be easily used with any programming language that is able to execute C functions. See td_json_client documentation for detailed JSON interface description, the td_api.tl scheme or the automatically generated HTML documentation for a list of all available TDLib methods and classes.

    TDLib JSON interface adheres to semantic versioning and versions with the same major version number are binary and backward compatible, but the underlying TDLib API can be different for different minor and even patch versions. If you need to support different TDLib versions, then you can use a value of the version option to find exact TDLib version to use appropriate API methods.

    See example/python/tdjson_example.py for an example of such usage.

    License

    diff --git a/data/core.telegram.org/tdlib/docs/td__api_8h.html b/data/core.telegram.org/tdlib/docs/td__api_8h.html index 9a21a99408..fe0dbfe185 100644 --- a/data/core.telegram.org/tdlib/docs/td__api_8h.html +++ b/data/core.telegram.org/tdlib/docs/td__api_8h.html @@ -101,6 +101,8 @@ Classes   class  animatedChatPhoto   +class  animatedEmoji +  class  animation   class  animations @@ -119,6 +121,8 @@ Classes   class  authenticationCodeTypeFlashCall   +class  authenticationCodeTypeMissedCall +  class  AuthorizationState   class  authorizationStateWaitTdlibParameters @@ -155,6 +159,8 @@ Classes   class  backgroundFillGradient   +class  backgroundFillFreeformGradient +  class  BackgroundType   class  backgroundTypeWallpaper @@ -175,7 +181,23 @@ Classes   class  botCommand   -class  botInfo +class  BotCommandScope +  +class  botCommandScopeDefault +  +class  botCommandScopeAllPrivateChats +  +class  botCommandScopeAllGroupChats +  +class  botCommandScopeAllChatAdministrators +  +class  botCommandScopeChat +  +class  botCommandScopeChatAdministrators +  +class  botCommandScopeChatMember +  +class  botCommands   class  call   @@ -275,6 +297,8 @@ Classes   class  chatActionUploadingDocument   +class  chatActionChoosingSticker +  class  chatActionChoosingLocation   class  chatActionChoosingContact @@ -285,6 +309,8 @@ Classes   class  chatActionUploadingVideoNote   +class  chatActionWatchingAnimations +  class  chatActionCancel   class  ChatActionBar @@ -293,12 +319,16 @@ Classes   class  chatActionBarReportUnrelatedLocation   +class  chatActionBarInviteMembers +  class  chatActionBarReportAddBlock   class  chatActionBarAddContact   class  chatActionBarSharePhoneNumber   +class  chatActionBarJoinRequest +  class  chatAdministrator   class  chatAdministrators @@ -319,6 +349,10 @@ Classes   class  chatEventMemberJoined   +class  chatEventMemberJoinedByInviteLink +  +class  chatEventMemberJoinedByRequest +  class  chatEventMemberLeft   class  chatEventMemberInvited @@ -343,14 +377,34 @@ Classes   class  chatEventSlowModeDelayChanged   +class  chatEventMessageTtlChanged +  class  chatEventSignMessagesToggled   +class  chatEventHasProtectedContentToggled +  class  chatEventStickerSetChanged   class  chatEventLocationChanged   class  chatEventIsAllHistoryAvailableToggled   +class  chatEventInviteLinkEdited +  +class  chatEventInviteLinkRevoked +  +class  chatEventInviteLinkDeleted +  +class  chatEventVideoChatCreated +  +class  chatEventVideoChatEnded +  +class  chatEventVideoChatParticipantIsMutedToggled +  +class  chatEventVideoChatParticipantVolumeLevelChanged +  +class  chatEventVideoChatMuteNewParticipantsToggled +  class  chatEventLogFilters   class  chatEvents @@ -361,8 +415,24 @@ Classes   class  chatInviteLink   +class  chatInviteLinkCount +  +class  chatInviteLinkCounts +  class  chatInviteLinkInfo   +class  chatInviteLinkMember +  +class  chatInviteLinkMembers +  +class  chatInviteLinks +  +class  chatJoinRequest +  +class  chatJoinRequests +  +class  chatJoinRequestsInfo +  class  ChatList   class  chatListMain @@ -437,6 +507,8 @@ Classes   class  chatReportReasonUnrelatedLocation   +class  chatReportReasonFake +  class  chatReportReasonCustom   class  ChatSource @@ -459,6 +531,8 @@ Classes   class  chatStatisticsMessageSenderInfo   +class  chatTheme +  class  ChatType   class  chatTypePrivate @@ -485,6 +559,16 @@ Classes   class  checkChatUsernameResultPublicGroupsUnavailable   +class  CheckStickerSetNameResult +  +class  checkStickerSetNameResultOk +  +class  checkStickerSetNameResultNameInvalid +  +class  checkStickerSetNameResultNameOccupied +  +class  closedVectorPath +  class  connectedWebsite   class  connectedWebsites @@ -613,6 +697,26 @@ Classes   class  gameHighScores   +class  groupCall +  +class  groupCallId +  +class  groupCallParticipant +  +class  groupCallParticipantVideoInfo +  +class  groupCallRecentSpeaker +  +class  GroupCallVideoQuality +  +class  groupCallVideoQualityThumbnail +  +class  groupCallVideoQualityMedium +  +class  groupCallVideoQualityFull +  +class  groupCallVideoSourceGroup +  class  hashtags   class  httpUrl @@ -639,6 +743,8 @@ Classes   class  inlineKeyboardButtonTypeBuy   +class  inlineKeyboardButtonTypeUser +  class  InlineQueryResult   class  inlineQueryResultArticle @@ -687,10 +793,10 @@ Classes   class  inputCredentialsNew   -class  inputCredentialsAndroidPay -  class  inputCredentialsApplePay   +class  inputCredentialsGooglePay +  class  InputFile   class  inputFileId @@ -825,6 +931,56 @@ Classes   class  inputThumbnail   +class  InternalLinkType +  +class  internalLinkTypeActiveSessions +  +class  internalLinkTypeAuthenticationCode +  +class  internalLinkTypeBackground +  +class  internalLinkTypeBotStart +  +class  internalLinkTypeBotStartInGroup +  +class  internalLinkTypeChangePhoneNumber +  +class  internalLinkTypeChatInvite +  +class  internalLinkTypeFilterSettings +  +class  internalLinkTypeGame +  +class  internalLinkTypeLanguagePack +  +class  internalLinkTypeMessage +  +class  internalLinkTypeMessageDraft +  +class  internalLinkTypePassportDataRequest +  +class  internalLinkTypePhoneNumberConfirmation +  +class  internalLinkTypeProxy +  +class  internalLinkTypePublicChat +  +class  internalLinkTypeQrCodeAuthentication +  +class  internalLinkTypeSettings +  +class  internalLinkTypeStickerSet +  +class  internalLinkTypeTheme +  +class  internalLinkTypeThemeSettings +  +class  internalLinkTypeUnknownDeepLink +  +class  internalLinkTypeUnsupportedProxy +  +class  internalLinkTypeVideoChat +  class  invoice   class  jsonObjectMember @@ -909,6 +1065,10 @@ Classes   class  message   +class  messageCalendar +  +class  messageCalendarDay +  class  MessageContent   class  messageText @@ -939,6 +1099,8 @@ Classes   class  messageContact   +class  messageAnimatedEmoji +  class  messageDice   class  messageGame @@ -949,6 +1111,14 @@ Classes   class  messageCall   +class  messageVideoChatScheduled +  +class  messageVideoChatStarted +  +class  messageVideoChatEnded +  +class  messageInviteVideoChatParticipants +  class  messageBasicGroupChatCreate   class  messageSupergroupChatCreate @@ -963,6 +1133,8 @@ Classes   class  messageChatJoinByLink   +class  messageChatJoinByRequest +  class  messageChatDeleteMember   class  messageChatUpgradeTo @@ -973,6 +1145,8 @@ Classes   class  messageScreenshotTaken   +class  messageChatSetTheme +  class  messageChatSetTtl   class  messageCustomServiceAction @@ -997,6 +1171,14 @@ Classes   class  messageCopyOptions   +class  MessageFileType +  +class  messageFileTypePrivate +  +class  messageFileTypeGroup +  +class  messageFileTypeUnknown +  class  messageForwardInfo   class  MessageForwardOrigin @@ -1009,12 +1191,18 @@ Classes   class  messageForwardOriginChannel   +class  messageForwardOriginMessageImport +  class  messageInteractionInfo   class  messageLink   class  messageLinkInfo   +class  messagePosition +  +class  messagePositions +  class  messageReplyInfo   class  MessageSchedulingState @@ -1289,6 +1477,8 @@ Classes   class  paymentForm   +class  paymentFormTheme +  class  paymentReceipt   class  paymentResult @@ -1307,6 +1497,8 @@ Classes   class  photoSize   +class  point +  class  poll   class  pollOption @@ -1383,10 +1575,14 @@ Classes   class  pushMessageContentChatChangeTitle   +class  pushMessageContentChatSetTheme +  class  pushMessageContentChatDeleteMember   class  pushMessageContentChatJoinByLink   +class  pushMessageContentChatJoinByRequest +  class  pushMessageContentMessageForwards   class  pushMessageContentMediaAlbum @@ -1411,6 +1607,14 @@ Classes   class  replyMarkupInlineKeyboard   +class  ResetPasswordResult +  +class  resetPasswordResultOk +  +class  resetPasswordResultPending +  +class  resetPasswordResultDeclined +  class  RichText   class  richTextPlain @@ -1473,10 +1677,6 @@ Classes   class  searchMessagesFilterChatPhoto   -class  searchMessagesFilterCall -  -class  searchMessagesFilterMissedCall -  class  searchMessagesFilterVideoNote   class  searchMessagesFilterVoiceAndVideoNote @@ -1507,6 +1707,8 @@ Classes   class  shippingOption   +class  sponsoredMessage +  class  StatisticalGraph   class  statisticalGraphData @@ -1539,8 +1741,16 @@ Classes   class  suggestedActionEnableArchiveAndMuteNewChats   +class  suggestedActionCheckPassword +  class  suggestedActionCheckPhoneNumber   +class  suggestedActionViewChecksHint +  +class  suggestedActionConvertToBroadcastGroup +  +class  suggestedActionSetPassword +  class  supergroup   class  supergroupFullInfo @@ -1639,12 +1849,16 @@ Classes   class  textEntityTypeMentionName   +class  textEntityTypeMediaTimestamp +  class  TextParseMode   class  textParseModeMarkdown   class  textParseModeHTML   +class  themeSettings +  class  thumbnail   class  ThumbnailFormat @@ -1715,34 +1929,46 @@ Classes   class  updateChatPosition   -class  updateChatIsMarkedAsUnread -  -class  updateChatIsBlocked -  -class  updateChatHasScheduledMessages -  -class  updateChatDefaultDisableNotification -  class  updateChatReadInbox   class  updateChatReadOutbox   -class  updateChatUnreadMentionCount +class  updateChatActionBar +  +class  updateChatDraftMessage +  +class  updateChatMessageSender +  +class  updateChatMessageTtl   class  updateChatNotificationSettings   -class  updateScopeNotificationSettings -  -class  updateChatActionBar +class  updateChatPendingJoinRequests   class  updateChatReplyMarkup   -class  updateChatDraftMessage +class  updateChatTheme +  +class  updateChatUnreadMentionCount +  +class  updateChatVideoChat +  +class  updateChatDefaultDisableNotification +  +class  updateChatHasProtectedContent +  +class  updateChatHasScheduledMessages +  +class  updateChatIsBlocked +  +class  updateChatIsMarkedAsUnread   class  updateChatFilters   class  updateChatOnlineMemberCount   +class  updateScopeNotificationSettings +  class  updateNotification   class  updateNotificationGroup @@ -1753,7 +1979,7 @@ Classes   class  updateDeleteMessages   -class  updateUserChatAction +class  updateChatAction   class  updateUserStatus   @@ -1781,6 +2007,10 @@ Classes   class  updateCall   +class  updateGroupCall +  +class  updateGroupCallParticipant +  class  updateNewCallSignalingData   class  updateUserPrivacySettingRules @@ -1805,6 +2035,8 @@ Classes   class  updateSelectedBackground   +class  updateChatThemes +  class  updateLanguagePackStrings   class  updateConnectionState @@ -1815,6 +2047,8 @@ Classes   class  updateDiceEmojis   +class  updateAnimatedEmojiMessageClicked +  class  updateAnimationSearchParameters   class  updateSuggestedActions @@ -1839,6 +2073,10 @@ Classes   class  updatePollAnswer   +class  updateChatMember +  +class  updateNewChatJoinRequest +  class  updates   class  user @@ -1911,10 +2149,18 @@ Classes   class  validatedOrderInfo   +class  VectorPathCommand +  +class  vectorPathCommandLine +  +class  vectorPathCommandCubicBezierCurve +  class  venue   class  video   +class  videoChat +  class  videoNote   class  voiceNote @@ -1965,12 +2211,16 @@ Classes   class  answerShippingQuery   +class  banChatMember +  class  blockMessageSenderFromReplies   class  canTransferOwnership   class  cancelDownloadFile   +class  cancelPasswordReset +  class  cancelUploadFile   class  changeImportedContacts @@ -1985,6 +2235,8 @@ Classes   class  checkAuthenticationPassword   +class  checkAuthenticationPasswordRecoveryCode +  class  checkChangePhoneNumberCode   class  checkChatInviteLink @@ -1997,12 +2249,16 @@ Classes   class  checkEmailAddressVerificationCode   +class  checkPasswordRecoveryCode +  class  checkPhoneNumberConfirmationCode   class  checkPhoneNumberVerificationCode   class  checkRecoveryEmailAddressCode   +class  checkStickerSetName +  class  cleanFileName   class  clearAllDraftMessages @@ -2013,6 +2269,8 @@ Classes   class  clearRecentlyFoundChats   +class  clickAnimatedEmojiMessage +  class  close   class  closeChat @@ -2027,6 +2285,8 @@ Classes   class  createChatFilter   +class  createChatInviteLink +  class  createNewBasicGroupChat   class  createNewSecretChat @@ -2043,16 +2303,28 @@ Classes   class  createTemporaryPassword   +class  createVideoChat +  class  deleteAccount   +class  deleteAllCallMessages +  +class  deleteAllRevokedChatInviteLinks +  +class  deleteChat +  class  deleteChatFilter   class  deleteChatHistory   -class  deleteChatMessagesFromUser +class  deleteChatMessagesByDate +  +class  deleteChatMessagesBySender   class  deleteChatReplyMarkup   +class  deleteCommands +  class  deleteFile   class  deleteLanguagePack @@ -2063,12 +2335,12 @@ Classes   class  deleteProfilePhoto   +class  deleteRevokedChatInviteLink +  class  deleteSavedCredentials   class  deleteSavedOrderInfo   -class  deleteSupergroup -  class  destroy   class  disableProxy @@ -2083,6 +2355,8 @@ Classes   class  editChatFilter   +class  editChatInviteLink +  class  editCustomLanguagePackInfo   class  editInlineMessageCaption @@ -2111,12 +2385,16 @@ Classes   class  enableProxy   +class  endGroupCall +  +class  endGroupCallRecording +  +class  endGroupCallScreenSharing +  class  finishFileGeneration   class  forwardMessages   -class  generateChatInviteLink -  class  getAccountTtl   class  getActiveLiveLocationMessages @@ -2125,8 +2403,12 @@ Classes   class  getAllPassportElements   +class  getAnimatedEmoji +  class  getApplicationConfig   +class  getApplicationDownloadLink +  class  getArchivedStickerSets   class  getAttachedStickerSets @@ -2155,6 +2437,8 @@ Classes   class  getChatAdministrators   +class  getChatAvailableMessageSenders +  class  getChatEventLog   class  getChatFilter @@ -2163,12 +2447,24 @@ Classes   class  getChatHistory   +class  getChatInviteLink +  +class  getChatInviteLinkCounts +  +class  getChatInviteLinkMembers +  +class  getChatInviteLinks +  +class  getChatJoinRequests +  class  getChatListsToAddChat   class  getChatMember   class  getChatMessageByDate   +class  getChatMessageCalendar +  class  getChatMessageCount   class  getChatNotificationSettingsExceptions @@ -2177,12 +2473,16 @@ Classes   class  getChatScheduledMessages   +class  getChatSparseMessagePositions +  +class  getChatSponsoredMessage +  class  getChatStatistics   -class  getChatStatisticsUrl -  class  getChats   +class  getCommands +  class  getConnectedWebsites   class  getContacts @@ -2201,6 +2501,10 @@ Classes   class  getEmojiSuggestionsUrl   +class  getExternalLink +  +class  getExternalLinkInfo +  class  getFavoriteStickers   class  getFile @@ -2213,6 +2517,12 @@ Classes   class  getGameHighScores   +class  getGroupCall +  +class  getGroupCallInviteLink +  +class  getGroupCallStreamSegment +  class  getGroupsInCommon   class  getImportedContactCount @@ -2225,7 +2535,7 @@ Classes   class  getInstalledStickerSets   -class  getInviteText +class  getInternalLinkType   class  getJsonString   @@ -2261,6 +2571,10 @@ Classes   class  getMessageEmbeddingCode   +class  getMessageFileType +  +class  getMessageImportConfirmationText +  class  getMessageLink   class  getMessageLinkInfo @@ -2275,6 +2589,8 @@ Classes   class  getMessageThreadHistory   +class  getMessageViewers +  class  getMessages   class  getNetworkStatistics @@ -2295,6 +2611,8 @@ Classes   class  getPhoneNumberInfo   +class  getPhoneNumberInfoSync +  class  getPollVoters   class  getPreferredCountryLanguage @@ -2309,6 +2627,8 @@ Classes   class  getRecentStickers   +class  getRecentlyOpenedChats +  class  getRecentlyVisitedTMeUrls   class  getRecommendedChatFilters @@ -2339,6 +2659,10 @@ Classes   class  getStorageStatisticsFast   +class  getSuggestedFileName +  +class  getSuggestedStickerSetName +  class  getSuitableDiscussionChats   class  getSupergroup @@ -2365,6 +2689,8 @@ Classes   class  getUserProfilePhotos   +class  getVideoChatAvailableParticipants +  class  getWebPageInstantView   class  getWebPagePreview @@ -2373,12 +2699,24 @@ Classes   class  importContacts   +class  importMessages +  +class  inviteGroupCallParticipants +  class  joinChat   class  joinChatByInviteLink   +class  joinGroupCall +  class  leaveChat   +class  leaveGroupCall +  +class  loadChats +  +class  loadGroupCallParticipants +  class  logOut   class  openChat @@ -2395,6 +2733,10 @@ Classes   class  pingProxy   +class  processChatJoinRequest +  +class  processChatJoinRequests +  class  processPushNotification   class  readAllChatMentions @@ -2439,8 +2781,12 @@ Classes   class  reorderInstalledStickerSets   +class  replacePrimaryChatInviteLink +  class  reportChat   +class  reportChatPhoto +  class  reportSupergroupSpam   class  requestAuthenticationPasswordRecovery @@ -2469,6 +2815,12 @@ Classes   class  resetNetworkStatistics   +class  resetPassword +  +class  revokeChatInviteLink +  +class  revokeGroupCallInviteLink +  class  saveApplicationLogEvent   class  searchBackground @@ -2521,8 +2873,6 @@ Classes   class  sendChatScreenshotTakenNotification   -class  sendChatSetTtlMessage -  class  sendCustomRequest   class  sendEmailAddressVerificationCode @@ -2567,6 +2917,10 @@ Classes   class  setChatMemberStatus   +class  setChatMessageSender +  +class  setChatMessageTtl +  class  setChatNotificationSettings   class  setChatPermissions @@ -2575,6 +2929,8 @@ Classes   class  setChatSlowModeDelay   +class  setChatTheme +  class  setChatTitle   class  setCommands @@ -2589,6 +2945,14 @@ Classes   class  setGameScore   +class  setGroupCallParticipantIsSpeaking +  +class  setGroupCallParticipantVolumeLevel +  +class  setGroupCallTitle +  +class  setInactiveSessionTtl +  class  setInlineGameScore   class  setLocation @@ -2635,8 +2999,16 @@ Classes   class  setUsername   +class  setVideoChatDefaultParticipant +  class  sharePhoneNumber   +class  startGroupCallRecording +  +class  startGroupCallScreenSharing +  +class  startScheduledGroupCall +  class  stopPoll   class  synchronizeLanguagePack @@ -2673,14 +3045,36 @@ Classes   class  toggleChatDefaultDisableNotification   +class  toggleChatHasProtectedContent +  class  toggleChatIsMarkedAsUnread   class  toggleChatIsPinned   +class  toggleGroupCallEnabledStartNotification +  +class  toggleGroupCallIsMyVideoEnabled +  +class  toggleGroupCallIsMyVideoPaused +  +class  toggleGroupCallMuteNewParticipants +  +class  toggleGroupCallParticipantIsHandRaised +  +class  toggleGroupCallParticipantIsMuted +  +class  toggleGroupCallScreenSharingIsPaused +  class  toggleMessageSenderIsBlocked   +class  toggleSessionCanAcceptCalls +  +class  toggleSessionCanAcceptSecretChats +  class  toggleSupergroupIsAllHistoryAvailable   +class  toggleSupergroupIsBroadcastGroup +  class  toggleSupergroupSignMessages   class  transferChatOwnership @@ -2738,6 +3132,9 @@ Functions template<class T > std::string to_string (const object_ptr< T > &value)   +template<class T > +std::string to_string (const std::vector< object_ptr< T >> &values) + 

    Typedef Documentation

    @@ -2924,7 +3321,7 @@ Functions -

    ◆ to_string() [1/2]

    +

    ◆ to_string() [1/3]

    @@ -2938,7 +3335,7 @@ Functions
    -

    Returns a string representation of the TDLib API object.

    Parameters
    +

    Returns a string representation of a TDLib API object.

    Parameters
    [in]valueThe object.
    @@ -2949,7 +3346,7 @@ Functions
    -

    ◆ to_string() [2/2]

    +

    ◆ to_string() [2/3]

    @@ -2963,7 +3360,7 @@ Functions
    -

    Returns a string representation of the TDLib API object.

    Template Parameters
    +

    Returns a string representation of a TDLib API object.

    Template Parameters
    TObject type, auto-deduced.
    @@ -2977,6 +3374,37 @@ Functions
    Returns
    Object string representation.
    +
    +
    + +

    ◆ to_string() [3/3]

    + +
    +
    + + + + + + + + +
    std::string td::td_api::to_string (const std::vector< object_ptr< T >> & values)
    +
    +

    Returns a string representation of a list of TDLib API objects.

    Template Parameters
    + + +
    TObject type, auto-deduced.
    +
    +
    +
    Parameters
    + + +
    [in]valuesThe objects.
    +
    +
    +
    Returns
    Objects string representation.
    +
    diff --git a/data/core.telegram.org/tdlib/docs/td__json__client_8h.html b/data/core.telegram.org/tdlib/docs/td__json__client_8h.html index 3726a4ae9a..e3c9c656b8 100644 --- a/data/core.telegram.org/tdlib/docs/td__json__client_8h.html +++ b/data/core.telegram.org/tdlib/docs/td__json__client_8h.html @@ -77,6 +77,7 @@ $(function() {
    +Typedefs | Functions
    td_json_client.h File Reference
    @@ -84,13 +85,33 @@ $(function() {

    Description

    C interface for interaction with TDLib via JSON-serialized objects. Can be used to easily integrate TDLib with any programming language which supports calling C functions and is able to work with JSON.

    -

    The JSON serialization of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names. The object type name is stored in the special field "@type" which is optional in places where type is uniquely determined by the context. Fields of Bool type are stored as Boolean, fields of int32, int53, and double types are stored as Number, fields of int64 and string types are stored as String, fields of bytes type are base64 encoded and then stored as String, fields of array type are stored as Array. The main TDLib interface is asynchronous. To match requests with a corresponding response a field "@extra" can be added to the request object. The corresponding response will have an "@extra" field with exactly the same value.

    +

    The JSON serialization of TDLib API objects is straightforward: all API objects are represented as JSON objects with the same keys as the API object field names. The object type name is stored in the special field "@type" which is optional in places where type is uniquely determined by the context. Fields of Bool type are stored as Boolean, fields of int32, int53, and double types are stored as Number, fields of int64 and string types are stored as String, fields of bytes type are base64 encoded and then stored as String, fields of array type are stored as Array.

    +

    The main TDLib interface is asynchronous. To match requests with a corresponding response, the field "@extra" can be added to the request object. The corresponding response will have an "@extra" field with exactly the same value. Each returned object will have an "@client_id" field, containing the identifier of the client for which a response or an update was received.

    +

    A TDLib client instance can be created through td_create_client_id. Requests can be sent using td_send and the received client identifier. New updates and responses to requests can be received through td_receive from any thread after the first request has been sent to the client instance. This function must not be called simultaneously from two different threads. Also note that all updates and responses to requests must be applied in the order they were received for consistency. Some TDLib requests can be executed synchronously from any thread using td_execute. TDLib client instances are destroyed automatically after they are closed. All TDLib client instances must be closed before application termination to ensure data consistency.

    +

    General pattern of usage:

    int client_id = td_create_client_id();
    // share the client_id with other threads, which will be able to send requests via td_send
    const double WAIT_TIMEOUT = 10.0; // seconds
    while (true) {
    const char *result = td_receive(WAIT_TIMEOUT);
    if (result) {
    // parse the result as a JSON object and process it as an incoming update or the answer to a previously sent request
    }
    }

    Alternatively, you can use old TDLib JSON interface, which will be removed in TDLib 2.0.0.

    +

    Objects and functions serialization to JSON is the same for both JSON interfaces.

    +

    The main TDLib interface is asynchronous. To match requests with a corresponding response a field "@extra" can be added to the request object. The corresponding response will have an "@extra" field with exactly the same value.

    A TDLib client instance can be created through td_json_client_create. Requests then can be sent using td_json_client_send from any thread. New updates and request responses can be received through td_json_client_receive from any thread. This function must not be called simultaneously from two different threads. Also note that all updates and request responses must be applied in the order they were received to ensure consistency. Given this information, it's advisable to call this function from a dedicated thread. Some service TDLib requests can be executed synchronously from any thread by using td_json_client_execute. The TDLib client instance can be destroyed via td_json_client_destroy.

    General pattern of usage:

    void *client = td_json_client_create();
    // somehow share the client with other threads, which will be able to send requests via td_json_client_send
    const double WAIT_TIMEOUT = 10.0; // seconds
    int is_closed = 0; // should be set to 1, when updateAuthorizationState with authorizationStateClosed is received
    while (!is_closed) {
    const char *result = td_json_client_receive(client, WAIT_TIMEOUT);
    if (result) {
    // parse the result as JSON object and process it as an incoming update or an answer to a previously sent request
    }
    }

    Go to the source code of this file.

    + + + +

    +Typedefs

    typedef void(* td_log_message_callback_ptr) (int verbosity_level, const char *message)
     
    + + + + + + + + + + @@ -101,16 +122,170 @@ Functions - - - - - - - -

    Functions

    int td_create_client_id ()
     
    void td_send (int client_id, const char *request)
     
    const char * td_receive (double timeout)
     
    const char * td_execute (const char *request)
     
    void td_set_log_message_callback (int max_verbosity_level, td_log_message_callback_ptr callback)
     
    void * td_json_client_create ()
     
    void td_json_client_send (void *client, const char *request)
     
    void td_json_client_destroy (void *client)
     
    int td_create_client_id ()
     
    void td_send (int client_id, const char *request)
     
    const char * td_receive (double timeout)
     
    const char * td_execute (const char *request)
     
    +

    Typedef Documentation

    + +

    ◆ td_log_message_callback_ptr

    + +
    +
    + + + + +
    typedef void(* td_log_message_callback_ptr) (int verbosity_level, const char *message)
    +
    +

    A type of callback function that will be called when a message is added to the internal TDLib log.

    +
    Parameters
    + + + +
    verbosity_levelLog verbosity level with which the message was added (-1 - 1024). If 0, then TDLib will crash as soon as the callback returns. None of the TDLib methods can be called from the callback.
    messageNull-terminated string with the logged message.
    +
    +
    + +
    +

    Function Documentation

    + +

    ◆ td_create_client_id()

    + +
    +
    + + + + + + + +
    int td_create_client_id ()
    +
    +

    Returns an opaque identifier of a new TDLib instance. The TDLib instance will not send updates until the first request is sent to it.

    Returns
    Opaque identifier of a new TDLib instance.
    + +
    +
    + +

    ◆ td_send()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void td_send (int client_id,
    const char * request 
    )
    +
    +

    Sends request to the TDLib client. May be called from any thread.

    Parameters
    + + + +
    [in]client_idTDLib client identifier.
    [in]requestJSON-serialized null-terminated request to TDLib.
    +
    +
    + +
    +
    + +

    ◆ td_receive()

    + +
    +
    + + + + + + + + +
    const char* td_receive (double timeout)
    +
    +

    Receives incoming updates and request responses. Must not be called simultaneously from two different threads. The returned pointer can be used until the next call to td_receive or td_execute, after which it will be deallocated by TDLib.

    Parameters
    + + +
    [in]timeoutThe maximum number of seconds allowed for this function to wait for new data.
    +
    +
    +
    Returns
    JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires.
    + +
    +
    + +

    ◆ td_execute()

    + +
    +
    + + + + + + + + +
    const char* td_execute (const char * request)
    +
    +

    Synchronously executes a TDLib request. A request can be executed synchronously, only if it is documented with "Can be called synchronously". The returned pointer can be used until the next call to td_receive or td_execute, after which it will be deallocated by TDLib.

    Parameters
    + + +
    [in]requestJSON-serialized null-terminated request to TDLib.
    +
    +
    +
    Returns
    JSON-serialized null-terminated request response.
    + +
    +
    + +

    ◆ td_set_log_message_callback()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void td_set_log_message_callback (int max_verbosity_level,
    td_log_message_callback_ptr callback 
    )
    +
    +

    Sets the callback that will be called when a message is added to the internal TDLib log. None of the TDLib methods can be called from the callback. By default the callback is not set.

    +
    Parameters
    + + + +
    [in]max_verbosity_levelThe maximum verbosity level of messages for which the callback will be called.
    [in]callbackCallback that will be called when a message is added to the internal TDLib log. Pass nullptr to remove the callback.
    +
    +
    + +
    +

    ◆ td_json_client_create()

    @@ -258,109 +433,6 @@ Functions -
    -
    - -

    ◆ td_create_client_id()

    - -
    -
    - - - - - - - -
    int td_create_client_id ()
    -
    -

    Returns an opaque identifier of a new TDLib instance. The TDLib instance will not send updates until the first request is sent to it.

    Returns
    Opaque identifier of a new TDLib instance.
    - -
    -
    - -

    ◆ td_send()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void td_send (int client_id,
    const char * request 
    )
    -
    -

    Sends request to the TDLib client. May be called from any thread.

    Parameters
    - - - -
    [in]client_idTDLib client identifier.
    [in]requestJSON-serialized null-terminated request to TDLib.
    -
    -
    - -
    -
    - -

    ◆ td_receive()

    - -
    -
    - - - - - - - - -
    const char* td_receive (double timeout)
    -
    -

    Receives incoming updates and request responses. Must not be called simultaneously from two different threads. The returned pointer can be used until the next call to td_receive or td_execute, after which it will be deallocated by TDLib.

    Parameters
    - - -
    [in]timeoutThe maximum number of seconds allowed for this function to wait for new data.
    -
    -
    -
    Returns
    JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires.
    - -
    -
    - -

    ◆ td_execute()

    - -
    -
    - - - - - - - - -
    const char* td_execute (const char * request)
    -
    -

    Synchronously executes a TDLib request. A request can be executed synchronously, only if it is documented with "Can be called synchronously". The returned pointer can be used until the next call to td_receive or td_execute, after which it will be deallocated by TDLib.

    Parameters
    - - -
    [in]requestJSON-serialized null-terminated request to TDLib.
    -
    -
    -
    Returns
    JSON-serialized null-terminated request response.
    -
    diff --git a/data/core.telegram.org/tdlib/docs/td__log_8h.html b/data/core.telegram.org/tdlib/docs/td__log_8h.html deleted file mode 100644 index aaee065771..0000000000 --- a/data/core.telegram.org/tdlib/docs/td__log_8h.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - -TDLib: td/telegram/td_log.h File Reference - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -Typedefs | -Functions
    -
    -
    td_log.h File Reference
    -
    -
    -

    Description

    -

    C interface for managing the internal logging of TDLib. By default TDLib writes logs to stderr or an OS specific log and uses a verbosity level of 5. These functions are deprecated since TDLib 1.4.0 in favor of the setLogVerbosityLevel, setLogStream and other synchronous requests for managing the intrenal TDLib logging.

    -
    -

    Go to the source code of this file.

    - - - - -

    -Typedefs

    typedef void(* td_log_fatal_error_callback_ptr) (const char *error_message)
     
    - - - - - - - - - -

    -Functions

    TDJSON_DEPRECATED_EXPORT int td_set_log_file_path (const char *file_path)
     
    TDJSON_DEPRECATED_EXPORT void td_set_log_max_file_size (long long max_file_size)
     
    TDJSON_DEPRECATED_EXPORT void td_set_log_verbosity_level (int new_verbosity_level)
     
    void td_set_log_fatal_error_callback (td_log_fatal_error_callback_ptr callback)
     
    -

    Typedef Documentation

    - -

    ◆ td_log_fatal_error_callback_ptr

    - -
    -
    - - - - -
    typedef void(* td_log_fatal_error_callback_ptr) (const char *error_message)
    -
    -

    A type of callback function that will be called when a fatal error happens.

    -
    Parameters
    - - -
    error_messageNull-terminated string with a description of a happened fatal error.
    -
    -
    - -
    -
    -

    Function Documentation

    - -

    ◆ td_set_log_file_path()

    - -
    -
    - - - - - - - - -
    TDJSON_DEPRECATED_EXPORT int td_set_log_file_path (const char * file_path)
    -
    -

    Sets the path to the file where the internal TDLib log will be written. By default TDLib writes logs to stderr or an OS specific log. Use this method to write the log to a file instead.

    -
    Parameters
    - - -
    [in]file_pathNull-terminated path to a file where the internal TDLib log will be written. Use an empty path to switch back to the default logging behaviour.
    -
    -
    -
    Returns
    True 1 on success, or 0 otherwise, i.e. if the file can't be opened for writing.
    - -
    -
    - -

    ◆ td_set_log_max_file_size()

    - -
    -
    - - - - - - - - -
    TDJSON_DEPRECATED_EXPORT void td_set_log_max_file_size (long long max_file_size)
    -
    -

    Sets the maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. Unused if log is not written to a file. Defaults to 10 MB.

    -
    Parameters
    - - -
    [in]max_file_sizeThe maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. Should be positive.
    -
    -
    - -
    -
    - -

    ◆ td_set_log_verbosity_level()

    - -
    -
    - - - - - - - - -
    TDJSON_DEPRECATED_EXPORT void td_set_log_verbosity_level (int new_verbosity_level)
    -
    -

    Sets the verbosity level of the internal logging of TDLib. By default the TDLib uses a log verbosity level of 5.

    -
    Parameters
    - - -
    [in]new_verbosity_levelNew value of logging verbosity level. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1024 can be used to enable even more logging.
    -
    -
    - -
    -
    - -

    ◆ td_set_log_fatal_error_callback()

    - -
    -
    - - - - - - - - -
    void td_set_log_fatal_error_callback (td_log_fatal_error_callback_ptr callback)
    -
    -

    Sets the callback that will be called when a fatal error happens. None of the TDLib methods can be called from the callback. The TDLib will crash as soon as callback returns. By default the callback is not set.

    -
    Parameters
    - - -
    [in]callbackCallback that will be called when a fatal error happens. Pass NULL to remove the callback.
    -
    -
    - -
    -
    -
    - - - - - - -