Inter-Addon Communication
Mods talking to an addon or more than one addon in Nitrocid
Inter-Addon Communication allows your mods to execute the publicly-available functions of a kernel addon. It allows your mods to talk to the kernel addons in a mechanism that doesn't interfere with the other end's operations.
When getting the name of an addon, you can consult the GetAddonName()
function, indicating what addon you want to use, such as KnownAddons.ExtrasAmusements
for Extras - Amusements
.
How to call a publicly accessible addon function?
To execute custom addon functions in your mod, you must specify the full addon name, such as Extras - RSS Shell
, and the function to execute in the ExecuteCustomAddonFunction()
method:
You must specify the main addon name in the above function, since it uses that name to query an addon for available functions. Remember, you can use the KnownAddons
enumeration to simplify things!
ExecuteCustomAddonFunction()
returns null
under the following conditions:
There are no functions in all the mod parts from your mod.
There is a function, but the delegate is unspecified.
It throws an exception if these conditions are true:
There is no function that goes by the name of the specified function name that you plan to execute.
How can I get/set a value from/to a property or a field?
To get a property value or a field value from an addon, you can call the following functions:
Similarly, to set a property value or a field value declared publicly by an addon, you can call the following functions:
You must specify the main addon name in the above function, since it uses that name to query an addon for available properties or fields. Remember, you can use the KnownAddons
enumeration to simplify things!
GetCustomModPropertyValue()
and GetCustomModFieldValue()
return null
under the following conditions:
There are no properties or fields in all the mod parts from your mod.
There is a property or field, but the delegate is unspecified.
It throws an exception if these conditions are true:
There is no property or field that goes by the name of the specified name that you plan to execute.
Listing functions, properties, and fields
You can now list all the available functions, properties, and fields from a specific mod using one of the following functions:
You must specify the main mod name in the above functions, since they use that name to fetch all mod parts and query them for available functions, fields, or properties.
The three functions return an empty array under the following conditions:
There are no properties or fields in all the mod parts from your mod.
Listing function and set property parameters
You can list all the function and set property parameters in depth by using the following functions:
Supported addons
Items that are marked in green, yellow, and red resemble functions, properties, and fields respectively. The following addons support inter-addon communication:
Nitrocid.Extras.ArchiveShell
ListArchiveEntries
ExtractFileEntry
PackFile
ChangeWorkingArchiveDirectory
ChangeWorkingArchiveLocalDirectory
Nitrocid.Extras.Calendar
PrintCalendar
PrintCalendar2
PrintCalendar3
AddEvent
RemoveEvent
ListEvents
LoadEvents
LoadEvent
SaveEvents
SaveEvents2
SaveEvent
SaveEvent2
AddReminder
RemoveReminder
ListReminders
LoadReminders
LoadReminder
SaveReminders
SaveReminders2
SaveReminder
SaveReminder2
Nitrocid.Extras.Contacts
GetContacts
ImportContacts
InstallContacts
InstallContacts2
InstallContactFromMeCard
RemoveContact
RemoveContacts
GetContact
SearchNext
SearchNext2
SearchPrevious
SearchPrevious2
Nitrocid.Extras.Diagnostics
GetThreadBacktraces
Nitrocid.Extras.Docking
DockScreen
DockScreen2
DoesDockScreenExist
GetDockScreenNames
GetDockScreens
Nitrocid.Extras.Forecast
GetWeatherInfo
GetWeatherInfo2
PrintWeatherInfo
PrintWeatherInfo2
GetWeatherInfoOwm
GetWeatherInfoOwm2
GetWeatherInfoOwm3
GetWeatherInfoOwm4
PrintWeatherInfoOwm
PrintWeatherInfoOwm2
PreferredUnit
Nitrocid.Extras.FtpShell
FTPListRemote
FTPListRemote2
FTPDeleteRemote
FTPChangeRemoteDir
FTPMoveItem
FTPCopyItem
FTPChangePermissions
FTPGetHash
FTPGetHashes
FTPGetHashes2
FTPGetFile
FTPGetFile2
FTPGetFolder
FTPGetFolder2
FTPUploadFile
FTPUploadFile2
FTPUploadFolder
FTPUploadFolder2
FTPDownloadToString
PromptForPassword
TryToConnect
FileProgress
MultipleProgress
Nitrocid.Extras.HttpShell
HttpDelete
HttpGetString
HttpGet
HttpPutString
HttpPutFile
HttpPostString
HttpPostFile
HttpAddHeader
HttpRemoveHeader
HttpListHeaders
HttpGetCurrentUserAgent
HttpSetUserAgent
NeutralizeUri
Nitrocid.Extras.JsonShell
OpenJsonFile
CloseJsonFile
SaveFile
SaveFile2
WasJsonEdited
DetermineRootType
DetermineType
GetToken
GetTokenSafe
GetTokenSafe2
Add
Set
Remove
SerializeToString
Nitrocid.Extras.MailShell
CreateMailDirectory
DeleteMailDirectory
RenameMailDirectory
OpenFolder
MailListDirectories
MailListMessages
MailListMessages2
MailRemoveMessage
MailRemoveAllBySender
MailMoveAllBySender
DecryptMessage
MailSendMessage
MailSendMessage2
MailSendEncryptedMessage
PopulateMessages
ShowPreview
Nitrocid.Extras.RssShell
GetFirstArticle
SearchArticles
AddRSSFeedToBookmark
AddRSSFeedToBookmark2
RemoveRSSFeedFromBookmark
RemoveRSSFeedFromBookmark2
GetBookmarks
GetBookmark
Nitrocid.Extras.SftpShell
SFTPListRemote
SFTPListRemote2
SFTPDeleteRemote
SFTPChangeRemoteDir
SFTPChangeLocalDir
SFTPGetCanonicalPath
SFTPGetFile
SFTPUploadFile
SFTPDownloadToString
PromptConnectionInfo
SFTPTryToConnect
Nitrocid.Extras.SqlShell
IsSql
SqlEdit_OpenSqlFile
SqlEdit_CheckSqlFile
SqlEdit_SqlCommand
Nitrocid.Extras.Ssh
PromptConnectionInfo
GetConnectionInfo
InitializeSSH
OpenShell
OpenShell2
OpenCommand
OpenCommand2
Nitrocid.Extras.ToDoList
AddTask
RemoveTask
GetTask
GetTaskIndex
TaskExists
SetDone
SetUndone
GetTaskNames
SaveTasks
LoadTasks
Last updated