Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/antirez/botlib
/ functions
Functions
207 in github.com/antirez/botlib
⨍
Functions
207
◇
Types & classes
19
↓ 52 callers
Function
sdsfree
Free an sds string. No operation is performed if 's' is NULL. */
sds.c:165
↓ 39 callers
Function
sdslen
sds.h:87
↓ 31 callers
Function
cJSON_Delete
Delete a cJSON structure. */
cJSON.c:253
↓ 29 callers
Function
cJSON_Select
json_wrap.c:50
↓ 27 callers
Function
sdsnew
Create a new sds string starting from a null terminated C string. */
sds.c:154
↓ 23 callers
Function
sdscatlen
Append the specified binary-safe string pointed by 't' of 'len' bytes to the * end of the specified sds string 's'. * * After the call, the passed
sds.c:397
↓ 17 callers
Function
cJSON_New_Item
Internal constructor. */
cJSON.c:241
↓ 15 callers
Function
ensure
realloc printbuffer if necessary to have at least "needed" bytes more */
cJSON.c:439
↓ 12 callers
Function
add_item_to_object
cJSON.c:2007
↓ 10 callers
Function
buffer_skip_whitespace
Utility to jump whitespace and cr/lf */
cJSON.c:1034
↓ 10 callers
Function
sdsnewlen
Create a new sds string with the content specified by the 'init' pointer * and 'initlen'. * If NULL is used for 'init' the string is initialized wit
sds.c:89
↓ 9 callers
Function
sdsMakeRoomFor
Enlarge the free space at the end of the sds string so that the caller * is sure that after calling this function can overwrite up to addlen * bytes
sds.c:204
↓ 9 callers
Function
sdsavail
sds.h:104
↓ 9 callers
Function
sdscat
Append the specified null termianted C string to the sds string 's'. * * After the call, the passed sds string is no longer valid and all the * ref
sds.c:412
↓ 9 callers
Function
sdssetlen
sds.h:130
↓ 8 callers
Function
sdsHdrSize
sds.c:44
↓ 8 callers
Function
sdsempty
Create an empty (zero length) sds string. Even in this case the string * always has an implicit null term. */
sds.c:149
↓ 7 callers
Function
cJSON_strdup
cJSON.c:188
↓ 7 callers
Function
sdsfromlonglong
Create an sds string from a long long value. It is much faster than: * * sdscatprintf(sdsempty(),"%lld\n", value); */
sds.c:514
↓ 6 callers
Function
sdsdup
Duplicate an sds string. */
sds.c:160
↓ 6 callers
Function
sdsrange
Turn the string into a smaller (or equal) string containing only the * substring specified by the 'start' and 'end' indexes. * * start and end can
sds.c:739
↓ 5 callers
Function
cJSON_CreateArray
cJSON.c:2513
↓ 5 callers
Function
get_object_item
cJSON.c:1876
↓ 5 callers
Function
makeGETBotRequest
Make an HTTP request to the Telegram bot API, where 'req' is the specified * action name. This is a low level API that is used by other bot APIs * i
botlib.c:324
↓ 5 callers
Function
print_value
Render a value to text. */
cJSON.c:1363
↓ 5 callers
Function
sdsinclen
sds.h:154
↓ 5 callers
Function
sqlGenericQuery
This is the low level function that we use to model all the higher level * functions. * * Queries can contain ?s ?b ?i and ?d special specifiers th
sqlite_wrap.c:39
↓ 5 callers
Function
suffix_object
Utility for array list handling. */
cJSON.c:1924
↓ 4 callers
Function
add_item_to_array
cJSON.c:1952
↓ 4 callers
Function
cJSON_CreateNumber
cJSON.c:2420
↓ 4 callers
Function
cJSON_Parse
Default options for cJSON_Parse */
cJSON.c:1171
↓ 4 callers
Function
cast_away_const
helper function to cast away const */
cJSON.c:1998
↓ 4 callers
Function
get_array_item
cJSON.c:1847
↓ 4 callers
Function
sdscatprintf
Append to the sds string 's' a string obtained using printf-alike format * specifier. * * After the call, the modified sds string is no longer vali
sds.c:575
↓ 4 callers
Function
sdstrim
Remove the part of the string from left and from right composed just of * contiguous characters found in 'cset', that is a null terminted C string.
sds.c:708
↓ 4 callers
Function
update_offset
calculate the new length of the string in a printbuffer and update the offset */
cJSON.c:525
↓ 3 callers
Function
cJSON_DetachItemViaPointer
cJSON.c:2183
↓ 3 callers
Function
parse_value
Parser core - when encountering text, process appropriately. */
cJSON.c:1308
↓ 3 callers
Function
sdsReqType
sds.c:60
↓ 3 callers
Function
sdscmp
Compare two sds strings s1 and s2 with memcmp(). * * Return value: * * positive if s1 > s2. * negative if s1 < s2. * 0 if s1 and s2
sds.c:792
↓ 3 callers
Function
sqlEnd
This function should be called only if you don't get all the rows * till the end. It is safe to call anyway. */
sqlite_wrap.c:121
↓ 3 callers
Function
sqlNextRow
After sqlGenericQuery() returns SQLITE_ROW, you can call this function * with the 'row' object pointer in order to get the rows composing the * resu
sqlite_wrap.c:134
↓ 3 callers
Function
sqlQuery
Wrapper for sqlGenericQuery() returning 1 if the query resulted in * SQLITE_DONE, otherwise zero. This is good for UPDATE and DELETE * statements. *
sqlite_wrap.c:184
↓ 2 callers
Function
botSendMessage
Like botSendMessageWithInfo() but without returning by reference * the chat and message IDs that are only useful if you want to * edit the message l
botlib.c:461
↓ 2 callers
Function
botSendMessageAndGetInfo
Send a message to the specified channel, optionally as a reply to a * specific message (if reply_to is non zero). * Return 1 on success, 0 on error.
botlib.c:420
↓ 2 callers
Function
cJSON_CreateString
cJSON.c:2446
↓ 2 callers
Function
cJSON_GetObjectItem
cJSON.c:1908
↓ 2 callers
Function
cJSON_GetObjectItemCaseSensitive
cJSON.c:1913
↓ 2 callers
Function
cJSON_InitHooks
cJSON.c:209
↓ 2 callers
Function
cJSON_IsArray
cJSON.c:2947
↓ 2 callers
Function
cJSON_IsNumber
cJSON.c:2927
↓ 2 callers
Function
cJSON_IsObject
cJSON.c:2957
↓ 2 callers
Function
cJSON_IsString
cJSON.c:2937
↓ 2 callers
Function
cJSON_ParseWithLengthOpts
Parse an object - create a new root, and populate. */
cJSON.c:1091
↓ 2 callers
Function
cJSON_ReplaceItemViaPointer
cJSON.c:2288
↓ 2 callers
Function
cJSON_free
cJSON.c:3107
↓ 2 callers
Function
compare_double
securely comparison of floating-point variables */
cJSON.c:538
↓ 2 callers
Function
create_reference
Utility for handling references. */
cJSON.c:1931
↓ 2 callers
Function
dbInit
Create the SQLite tables if needed (if createdb is true), and return * the SQLite database handle. Return NULL on error. */
botlib.c:603
↓ 2 callers
Function
freeBotRequest
Free the bot request and associated data. */
botlib.c:561
↓ 2 callers
Function
get_decimal_point
get the decimal point character of the current locale */
cJSON.c:277
↓ 2 callers
Function
hex_digit_to_int
Helper function for sdssplitargs() that converts a hex digit into an * integer from 0 to 15 */
sds.c:918
↓ 2 callers
Function
is_hex_digit
Helper function for sdssplitargs() that returns non zero if 'c' * is a valid hex digit. */
sds.c:911
↓ 2 callers
Function
parse_hex4
parse 4 digit hexadecimal number */
cJSON.c:611
↓ 2 callers
Function
parse_string
Parse the input text into an unescaped cinput, and populate item. */
cJSON.c:769
↓ 2 callers
Function
print
cJSON.c:1183
↓ 2 callers
Function
print_string_ptr
Render the cstring provided to an escaped version that can be printed. */
cJSON.c:898
↓ 2 callers
Function
replace_item_in_object
cJSON.c:2347
↓ 2 callers
Function
sdsalloc
sdsalloc() = sdsavail() + sdslen() */
sds.h:180
↓ 2 callers
Function
sdscatfmt
This function is similar to sdscatprintf, but much faster as it does * not rely on sprintf() family functions implemented by the libc that * are oft
sds.c:600
↓ 2 callers
Function
sdscpy
Like sdscpylen() but 't' must be a null-termined string so that the length * of the string is obtained with strlen(). */
sds.c:439
↓ 2 callers
Function
sdsll2str
sds.c:450
↓ 2 callers
Function
sdssetalloc
sds.h:197
↓ 2 callers
Function
xfree
botlib.c:228
↓ 1 callers
Function
botEditMessageText
Send a message to the specified channel, optionally as a reply to a * specific message (if reply_to is non zero). * Return 1 on success, 0 on error.
botlib.c:468
↓ 1 callers
Function
botGetFile
This function should be called from the bot implementation callback. * If the bot request has a file (the user can see that by inspecting * the br->
botlib.c:499
↓ 1 callers
Function
botGetUsername
Return the bot username. */
botlib.c:402
↓ 1 callers
Function
botMain
This is the bot main loop: we get messages using getUpdates in blocking * mode, but with a timeout. Then we serve requests as needed, and every * ti
botlib.c:842
↓ 1 callers
Function
botProcessUpdates
Get the updates from the Telegram API, process them, and return the * ID of the highest processed update. * * The offset is the last ID already pro
botlib.c:655
↓ 1 callers
Function
cJSON_AddItemReferenceToArray
cJSON.c:2055
↓ 1 callers
Function
cJSON_AddItemToArray
Add item to array/object. */
cJSON.c:1986
↓ 1 callers
Function
cJSON_CreateBool
cJSON.c:2409
↓ 1 callers
Function
cJSON_CreateFalse
cJSON.c:2398
↓ 1 callers
Function
cJSON_CreateNull
Create basic types: */
cJSON.c:2376
↓ 1 callers
Function
cJSON_CreateObject
cJSON.c:2524
↓ 1 callers
Function
cJSON_CreateRaw
cJSON.c:2496
↓ 1 callers
Function
cJSON_CreateTrue
cJSON.c:2387
↓ 1 callers
Function
cJSON_DetachItemFromArray
cJSON.c:2219
↓ 1 callers
Function
cJSON_DetachItemFromObject
cJSON.c:2234
↓ 1 callers
Function
cJSON_DetachItemFromObjectCaseSensitive
cJSON.c:2241
↓ 1 callers
Function
cJSON_GetArrayItem
cJSON.c:1866
↓ 1 callers
Function
cJSON_IsBool
cJSON.c:2908
↓ 1 callers
Function
cJSON_IsInvalid
cJSON.c:2877
↓ 1 callers
Function
cJSON_IsNull
cJSON.c:2917
↓ 1 callers
Function
cJSON_ParseWithOpts
cJSON.c:1075
↓ 1 callers
Function
case_insensitive_strcmp
Case insensitive string comparison, doesn't consider two NULL pointers equal though */
cJSON.c:133
↓ 1 callers
Function
createBotRequest
Create a bot request object and return it to the caller. */
botlib.c:576
↓ 1 callers
Function
dbClose
Should be called every time a thread exits, so that if the thread has * an SQLite thread-local handle, it gets closed. */
botlib.c:627
↓ 1 callers
Function
kvGet
Get the specified key and return it as an SDS string. If the value is * expired or does not exist NULL is returned. */
sqlite_wrap.c:263
↓ 1 callers
Function
kvSet
Wrapper where the value len is obtained via strlen().*/
sqlite_wrap.c:257
next →
1–100 of 207, ranked by callers