Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IXmppService.cs
1using System.Diagnostics.CodeAnalysis;
2using System.Reflection;
3using System.Xml;
4using EDaler;
5using EDaler.Events;
6using EDaler.Uris;
10using NeuroFeatures;
13using Waher.Content;
14using Waher.Events;
35using Waher.Things;
37
39{
43 [DefaultImplementation(typeof(XmppService))]
44 public interface IXmppService : ILoadableService
45 {
46 #region Lifecycle
47
53 Task<bool> WaitForConnectedState(TimeSpan timeout);
54
58 Task UnloadFast();
59
63 event EventHandlerAsync<XmppState> ConnectionStateChanged;
64
65 #endregion
66
67 #region State
68
72 bool IsOnline { get; }
73
78
82 string BareJid { get; }
83
87 string? LatestError { get; }
88
92 string? LatestConnectionError { get; }
93
94 #endregion
95
96 #region Connections
97
109 Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnect(string domain, bool isIpAddress, string hostName, int portNumber,
110 string languageCode, Assembly appAssembly, Func<XmppClient, Task> connectedFunc);
111
127 Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnectAndCreateAccount(string domain, bool isIpAddress, string hostName,
128 int portNumber, string userName, string password, string languageCode, string ApiKey, string ApiSecret,
129 Assembly appAssembly, Func<XmppClient, Task> connectedFunc);
130
145 Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnectAndConnectToAccount(string domain, bool isIpAddress, string hostName,
146 int portNumber, string userName, string password, string passwordMethod, string languageCode, Assembly appAssembly,
147 Func<XmppClient, Task> connectedFunc);
148
149 #endregion
150
151 #region Password
152
158 Task<bool> ChangePassword(string NewPassword);
159
160
166
167 #endregion
168
169 #region Components & Services
170
176 Task<ServiceDiscoveryEventArgs> SendServiceDiscoveryRequest(string FullJid);
177
183 Task<bool> DiscoverServices(XmppClient? Client = null);
184
185 #endregion
186
187 #region Transfer
188
193 Task AddTransferCode(string Code);
194
195 #endregion
196
197 #region IQ Stanzas (Information Query)
198
207 Task<XmlElement> IqSetAsync(string To, string Xml);
208
209 #endregion
210
211 #region Messages
212
228 public void SendMessage(QoSLevel QoS, MessageType Type, string Id, string To, string CustomXml,
229 string Body, string Subject, string Language, string ThreadId, string ParentThreadId,
230 EventHandlerAsync<DeliveryEventArgs>? DeliveryCallback, object? State);
231
232 #endregion
233
234 #region Presence
235
239 event EventHandlerAsync<PresenceEventArgs> OnPresence;
240
241 event EventHandlerAsync<PresenceEventArgs> OnPresenceSubscribe;
242
243 event EventHandlerAsync<PresenceEventArgs> OnPresenceUnsubscribed;
244
250
256 void RequestPresenceSubscription(string BareJid, string CustomXml);
257
263
269
270 #endregion
271
272 #region Roster
273
278
285
291
297
301 event EventHandlerAsync<RosterItem> OnRosterItemAdded;
302
306 event EventHandlerAsync<RosterItem> OnRosterItemUpdated;
307
311 event EventHandlerAsync<RosterItem> OnRosterItemRemoved;
312
313 #endregion
314
315 #region Push Notification
316
321
328
336
341
352 Task AddPushNotificationRule(MessageType MessageType, string LocalName, string Namespace, string Channel,
353 string MessageVariable, string PatternMatchingScript, string ContentScript);
354
355 #endregion
356
357 #region Tokens
358
366 Task<string?> GetApiToken(int Seconds);
367
377 Task<object> PostToProtectedApi(string LocalResource, object Data, params KeyValuePair<string, string>[] Headers);
378
379 #endregion
380
381 #region HTTP File Upload
382
387
394 Task<HttpFileUploadEventArgs> RequestUploadSlotAsync(string FileName, string ContentType, long ContentSize);
395
396 #endregion
397
398 #region Personal Eventing Protocol (PEP)
399
405 void RegisterPepHandler(Type PersonalEventType, EventHandlerAsync<PersonalEventNotificationEventArgs> Handler);
406
413 bool UnregisterPepHandler(Type PersonalEventType, EventHandlerAsync<PersonalEventNotificationEventArgs> Handler);
414
415 #endregion
416
417 #region Thing Registries & Discovery
418
422 string RegistryServiceJid { get; }
423
429 bool IsIoTDiscoClaimURI(string DiscoUri);
430
436 bool IsIoTDiscoSearchURI(string DiscoUri);
437
443 bool IsIoTDiscoDirectURI(string DiscoUri);
444
451 bool TryDecodeIoTDiscoClaimURI(string DiscoUri, [NotNullWhen(true)] out MetaDataTag[]? Tags);
452
460 bool TryDecodeIoTDiscoSearchURI(string DiscoUri, [NotNullWhen(true)] out SearchOperator[]? Operators, out string? RegistryJid);
461
472 bool TryDecodeIoTDiscoDirectURI(string DiscoUri, [NotNullWhen(true)] out string? Jid, out string? SourceId, out string? NodeId,
473 out string? PartitionId, [NotNullWhen(true)] out MetaDataTag[]? Tags);
474
481 Task<NodeResultEventArgs> ClaimThing(string DiscoUri, bool MakePublic);
482
492 Task<bool> Disown(string RegistryJid, string ThingJid, string SourceId, string Partition, string NodeId);
493
501 Task<(SearchResultThing[], string?, bool)> Search(int Offset, int MaxCount, string DiscoUri);
502
511 Task<(SearchResultThing[], bool)> Search(int Offset, int MaxCount, string? RegistryJid, params SearchOperator[] Operators);
512
518 Task<(SearchResultThing[], string?)> SearchAll(string DiscoUri);
519
526 Task<SearchResultThing[]> SearchAll(string RegistryJid, params SearchOperator[] Operators);
527
528 #endregion
529
530 #region Legal Identities
531
536
541 Task<IdApplicationAttributesEventArgs> GetIdApplicationAttributes();
542
550 Task<LegalIdentity> AddLegalIdentity(RegisterIdentityModel Model, bool GenerateNewKeys, params LegalIdentityAttachment[] Attachments);
551
559 Task<LegalIdentity> AddLegalIdentity(Property[] Props, bool GenerateNewKeys, params LegalIdentityAttachment[] Attachments);
560
566 Task<LegalIdentity[]> GetLegalIdentities(XmppClient? client = null);
567
573 Task<LegalIdentity> GetLegalIdentity(CaseInsensitiveString legalIdentityId);
574
580 Task<bool> IsContact(CaseInsensitiveString legalIdentityId);
581
587 Task<bool> HasPrivateKey(CaseInsensitiveString legalIdentityId);
588
594 Task<LegalIdentity> ObsoleteLegalIdentity(CaseInsensitiveString legalIdentityId);
595
601 Task<LegalIdentity> CompromiseLegalIdentity(CaseInsensitiveString legalIdentityId);
602
609 Task PetitionIdentity(CaseInsensitiveString LegalId, string PetitionId, string Purpose);
610
618 Task SendPetitionIdentityResponse(CaseInsensitiveString LegalId, string PetitionId, string RequestorFullJid, bool Response);
619
623 event EventHandlerAsync<LegalIdentityEventArgs> LegalIdentityChanged;
624
628 event EventHandlerAsync<LegalIdentityEventArgs> IdentityApplicationChanged;
629
633 event EventHandlerAsync<LegalIdentityPetitionEventArgs> PetitionForIdentityReceived;
634
638 event EventHandlerAsync<LegalIdentityPetitionResponseEventArgs> PetitionedIdentityResponseReceived;
639
644 Task ExportSigningKeys(XmlWriter Output);
645
651 Task<bool> ImportSigningKeys(XmlElement Xml);
652
659
660 #endregion
661
662 #region Smart Contracts
663
668
674 Task<Contract> GetContract(CaseInsensitiveString ContractId);
675
681
687
695 Task<Contract> SignContract(Contract Contract, string Role, bool Transferable);
696
702 Task<Contract> ObsoleteContract(CaseInsensitiveString ContractId);
703
719 Task<Contract> CreateContract(
720 CaseInsensitiveString TemplateId,
721 Part[] Parts,
722 Parameter[] Parameters,
723 ContractVisibility Visibility,
724 ContractParts PartsMode,
726 Duration ArchiveRequired,
727 Duration ArchiveOptional,
728 DateTime? SignAfter,
729 DateTime? SignBefore,
730 bool CanActAsTemplate);
731
737 Task<Contract> DeleteContract(CaseInsensitiveString ContractId);
738
745 Task PetitionContract(CaseInsensitiveString ContractId, string PetitionId, string Purpose);
746
754 Task SendPetitionContractResponse(CaseInsensitiveString ContractId, string PetitionId, string RequestorFullJid, bool Response);
755
759 event EventHandlerAsync<ContractProposalEventArgs> ContractProposalReceived;
760
764 event EventHandlerAsync<ContractReferenceEventArgs> ContractUpdated;
765
769 event EventHandlerAsync<ContractSignedEventArgs> ContractSigned;
770
774 event EventHandlerAsync<ContractPetitionEventArgs> PetitionForContractReceived;
775
779 event EventHandlerAsync<ContractPetitionResponseEventArgs> PetitionedContractResponseReceived;
780
787
795 Task SendContractProposal(Contract Contract, string Role, string To, string Message);
796
797 #endregion
798
799 #region Attachments
800
808 Task<KeyValuePair<string, TemporaryFile>> GetAttachment(string Url, SignWith SignWith, TimeSpan Timeout);
809
810 #endregion
811
812 #region Peer Review
813
821 Task PetitionPeerReviewId(CaseInsensitiveString LegalId, LegalIdentity Identity, string PetitionId, string Purpose);
822
830 Task<LegalIdentity> AddPeerReviewIdAttachment(LegalIdentity Identity, LegalIdentity ReviewerLegalIdentity, byte[] PeerSignature);
831
835 event EventHandlerAsync<SignaturePetitionEventArgs> PetitionForPeerReviewIdReceived;
836
840 event EventHandlerAsync<SignaturePetitionResponseEventArgs> PetitionedPeerReviewIdResponseReceived;
841
846 Task<ServiceProviderWithLegalId[]> GetServiceProvidersForPeerReviewAsync();
847
854 Task SelectPeerReviewService(string ServiceId, string ServiceProvider);
855
856 #endregion
857
858 #region Signatures
859
866 Task<byte[]> Sign(byte[] data, SignWith signWith);
867
877 bool? ValidateSignature(LegalIdentity legalIdentity, byte[] data, byte[] signature);
878
889 Task SendPetitionSignatureResponse(CaseInsensitiveString LegalId, byte[] Content, byte[] Signature, string PetitionId, string RequestorFullJid, bool Response);
890
894 event EventHandlerAsync<SignaturePetitionEventArgs> PetitionForSignatureReceived;
895
899 event EventHandlerAsync<SignaturePetitionResponseEventArgs> SignaturePetitionResponseReceived;
900
901 #endregion
902
903 #region Provisioning
904
909
921 void IsFriendResponse(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool IsFriend,
922 RuleRange Range, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
923
936 void CanControlResponseAll(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl,
937 string[]? ParameterNames, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
938
951 void CanControlResponseCaller(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
952 bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
953
966 void CanControlResponseDomain(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
967 bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
968
982 void CanControlResponseDevice(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
983 bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
984 object? State);
985
999 void CanControlResponseService(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
1000 bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1001 object? State);
1002
1016 void CanControlResponseUser(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
1017 bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1018 object? State);
1019
1033 void CanReadResponseAll(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead,
1034 FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
1035
1049 void CanReadResponseCaller(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead,
1050 FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
1051
1065 void CanReadResponseDomain(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead,
1066 FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback, object? State);
1067
1082 void CanReadResponseDevice(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
1083 bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1084 object? State);
1085
1100 void CanReadResponseService(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
1101 bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1102 object? State);
1103
1118 void CanReadResponseUser(string ProvisioningServiceJID, string JID, string RemoteJID, string Key,
1119 bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync<IqResultEventArgs> Callback,
1120 object? State);
1121
1132 void DeleteDeviceRules(string ServiceJID, string DeviceJID, string NodeId, string SourceId, string Partition,
1133 EventHandlerAsync<IqResultEventArgs> Callback, object? State);
1134
1143 void GetCertificate(string Token, EventHandlerAsync<CertificateEventArgs> Callback, object? State);
1144
1145 #endregion
1146
1147 #region IoT
1148
1155 Task<(SearchResultThing[], bool)> GetMyDevices(int Offset, int MaxCount);
1156
1161 Task<SearchResultThing[]> GetAllMyDevices();
1162
1171 void GetControlForm(string To, string Language, EventHandlerAsync<DataFormEventArgs> Callback, object? State,
1172 params ThingReference[] Nodes);
1173
1180 Task<SensorDataClientRequest> RequestSensorReadout(string Destination, FieldType Types);
1181
1189 Task<SensorDataClientRequest> RequestSensorReadout(string Destination, ThingReference[] Nodes, FieldType Types);
1190
1191 #endregion
1192
1193 #region e-Daler
1194
1202 bool TryParseEDalerUri(string Uri, out EDalerUri Parsed, out string Reason);
1203
1212 Task<string> TryDecryptMessage(byte[] EncryptedMessage, byte[] PublicKey, Guid TransactionId, string RemoteEndpoint,bool LocalIsRecipient = false);
1213
1220
1224 event EventHandlerAsync<BalanceEventArgs> EDalerBalanceUpdated;
1225
1231 Task<(AccountEvent[], bool)> GetEDalerAccountEvents(int MaxCount);
1232
1239 Task<(AccountEvent[], bool)> GetEDalerAccountEvents(int MaxCount, DateTime From);
1240
1245 Task<Balance> GetEDalerBalance();
1246
1251 Task<(decimal, string, PendingPayment[])> GetPendingEDalerPayments();
1252
1262 Task<string> CreateFullEDalerPaymentUri(string ToBareJid, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays);
1263
1274 Task<string> CreateFullEDalerPaymentUri(string ToBareJid, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays, string Message);
1275
1285 Task<string> CreateFullEDalerPaymentUri(LegalIdentity To, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays);
1286
1297 Task<string> CreateFullEDalerPaymentUri(LegalIdentity To, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays, string PrivateMessage);
1298
1308 string CreateIncompleteEDalerPayMeUri(string BareJid, decimal? Amount, decimal? AmountExtra, string Currency, string Message);
1309
1320 string CreateIncompleteEDalerPayMeUri(LegalIdentity To, decimal? Amount, decimal? AmountExtra, string Currency, string PrivateMessage);
1321
1326
1330 DateTime LastEDalerEvent { get; }
1331
1336 Task<IBuyEDalerServiceProvider[]> GetServiceProvidersForBuyingEDalerAsync();
1337
1345 Task<OptionsTransaction> InitiateBuyEDalerGetOptions(string ServiceId, string ServiceProvider);
1346
1352 void BuyEDalerGetOptionsCompleted(string TransactionId, IDictionary<CaseInsensitiveString, object>[] Options);
1353
1359 void BuyEDalerGetOptionsFailed(string TransactionId, string Message);
1360
1369 Task<PaymentTransaction> InitiateBuyEDaler(string ServiceId, string ServiceProvider, decimal Amount, string Currency);
1370
1378 Task<OptionsTransaction> InitiateSellEDalerGetOptions(string ServiceId, string ServiceProvider);
1379
1385 void SellEDalerGetOptionsCompleted(string TransactionId, IDictionary<CaseInsensitiveString, object>[] Options);
1386
1392 void SellEDalerGetOptionsFailed(string TransactionId, string Message);
1393
1400 void BuyEDalerCompleted(string TransactionId, decimal Amount, string Currency);
1401
1407 void BuyEDalerFailed(string TransactionId, string Message);
1408
1413 Task<ISellEDalerServiceProvider[]> GetServiceProvidersForSellingEDalerAsync();
1414
1423 Task<PaymentTransaction> InitiateSellEDaler(string ServiceId, string ServiceProvider, decimal Amount, string Currency);
1424
1431 void SellEDalerCompleted(string TransactionId, decimal Amount, string Currency);
1432
1438 void SellEDalerFailed(string TransactionId, string Message);
1439
1440 #endregion
1441
1442 #region Neuro-Features
1443
1448
1453
1457 event EventHandlerAsync<VariablesUpdatedEventArgs> NeuroFeatureVariablesUpdated;
1458
1462 event EventHandlerAsync<NewStateEventArgs>? NeuroFeatureStateUpdated;
1463
1467 DateTime LastNeuroFeatureEvent { get; }
1468
1473 Task<TokensEventArgs> GetNeuroFeatures();
1474
1481 Task<TokensEventArgs> GetNeuroFeatures(int Offset, int MaxCount);
1482
1488
1495 Task<string[]> GetNeuroFeatureReferences(int Offset, int MaxCount);
1496
1501 Task<TokenTotalsEventArgs> GetNeuroFeatureTotals();
1502
1508 Task<TokensEventArgs> GetNeuroFeaturesForContract(string ContractId);
1509
1517 Task<TokensEventArgs> GetNeuroFeaturesForContract(string ContractId, int Offset, int MaxCount);
1518
1524 Task<string[]> GetNeuroFeatureReferencesForContract(string ContractId);
1525
1533 Task<string[]> GetNeuroFeatureReferencesForContract(string ContractId, int Offset, int MaxCount);
1534
1540 Task<Token> GetNeuroFeature(string TokenId);
1541
1547 Task<TokenEvent[]> GetNeuroFeatureEvents(string TokenId);
1548
1556 Task<TokenEvent[]> GetNeuroFeatureEvents(string TokenId, int Offset, int MaxCount);
1557
1563 Task AddNeuroFeatureTextNote(string TokenId, string TextNote);
1564
1573 Task AddNeuroFeatureTextNote(string TokenId, string TextNote, bool Personal);
1574
1580 Task AddNeuroFeatureXmlNote(string TokenId, string XmlNote);
1581
1590 Task AddNeuroFeatureXmlNote(string TokenId, string XmlNote, bool Personal);
1591
1596 Task<CreationAttributesEventArgs> GetNeuroFeatureCreationAttributes();
1597
1602 Task<string> GenerateNeuroFeatureStateDiagramReport(string TokenId);
1603
1608 Task<VerticalStackLayout> GenerateNeuroFeatureStateDiagramReportMaui(string TokenId);
1609
1614 Task<string> GenerateNeuroFeatureProfilingReport(string TokenId);
1615
1620 Task<VerticalStackLayout> GenerateNeuroFeatureProfilingReportMaui(string TokenId);
1621
1626 Task<string> GenerateNeuroFeaturePresentReport(string TokenId);
1627
1631 Task<VerticalStackLayout> GenerateNeuroFeaturePresentReportMaui(string TokenId);
1632
1637 Task<string> GenerateNeuroFeatureHistoryReport(string TokenId);
1638
1642 Task<VerticalStackLayout> GenerateNeuroFeatureHistoryReportMaui(string TokenId);
1643
1649 Task<CurrentStateEventArgs> GetNeuroFeatureCurrentState(string TokenId);
1650
1651 #endregion
1652
1653 #region Private XML
1654
1662 Task SavePrivateXml(string Xml);
1663
1671 Task SavePrivateXml(XmlElement Xml);
1672
1680 Task<XmlElement?> LoadPrivateXml(string LocalName, string Namespace);
1681
1687 Task DeletePrivateXml(string LocalName, string Namespace);
1688
1689 #endregion
1690
1691 #region PubSub
1692
1696 Task<Item[]?> GetAllNodeIdsAsync();
1697
1701 Task<PubSubItem[]?> GetItemsAsync(string NodeId);
1702
1706 Task<PubSubItem[]?> GetItemsAsync(string NodeId, string[] ItemIds);
1707
1717 Task<PubSubPageResult?> GetItemsPageAsync(string NodeId, string? ServiceAddress = null, string? After = null, string? Before = null, int? Index = null, int? Max = null);
1718
1722 Task<PubSubItem?> GetItemAsync(string NodeId, string ItemId);
1723
1727 Task<PubSubItem[]?> GetLatestItemsAsync(string NodeId, int Count);
1728
1733
1738
1742 Task<Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> DeleteNodeAsync(string NodeId, string? RedirectUri = null);
1743
1747 Task<Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryDeleteNodeAsync(string NodeId, string? RedirectUri = null);
1748
1752 Task<SubscriptionEventArgs> SubscribeAsync(string NodeId, string? Jid = null, SubscriptionOptions? Options = null);
1753
1757 Task<SubscriptionEventArgs?> TrySubscribeAsync(string NodeId, string? Jid = null, SubscriptionOptions? Options = null);
1758
1762 Task<SubscriptionEventArgs> UnsubscribeAsync(string NodeId, string? Jid = null, string? SubscriptionId = null);
1763
1767 Task<SubscriptionEventArgs?> TryUnsubscribeAsync(string NodeId, string? Jid = null, string? SubscriptionId = null);
1768
1772 Task<ItemResultEventArgs> PublishAsync(string NodeId, string? ItemId = null, string PayloadXml = "");
1773
1777 Task<ItemResultEventArgs?> TryPublishAsync(string NodeId, string? ItemId = null, string PayloadXml = "");
1778
1782 Task<IqResultEventArgs> RetractAsync(string NodeId, string ItemId);
1783
1787 Task<IqResultEventArgs?> TryRetractAsync(string NodeId, string ItemId);
1788
1793
1798
1799
1800 /*
1801 // Server-pushed events:
1803 event EventHandlerAsync<ItemNotificationEventArgs> ItemNotification;
1805 event EventHandlerAsync<ItemNotificationEventArgs> ItemRetracted;
1807 event EventHandlerAsync<NodeNotificationEventArgs> NodePurged;
1809 event EventHandlerAsync<SubscriptionNotificationEventArgs> SubscriptionStatusChanged;
1811 event EventHandlerAsync<SubscriptionRequestEventArgs> SubscriptionRequest;
1813 event EventHandlerAsync<AffiliationNotificationEventArgs> AffiliationNotification;
1814 */
1815 #endregion
1816
1817 #region Debugging
1818
1823
1824 #endregion
1825 }
1826}
Account event
Definition: AccountEvent.cs:16
Contains information about a balance.
Definition: Balance.cs:11
Contains information about a pending payment.
Represents a transaction in the eDaler network.
Definition: Transaction.cs:36
Abstract base class for eDaler URIs
Definition: EDalerUri.cs:14
Contains information about a push notification token.
Event arguments for token events.
Neuro-Feature Token
Definition: Token.cs:46
Contains the definition of a contract
Definition: Contract.cs:22
Adds support for legal identities, smart contracts and signatures to an XMPP client.
Abstract base class for contractual parameters
Definition: Parameter.cs:17
Class defining a part in a contract
Definition: Part.cs:30
Class defining a role
Definition: Role.cs:7
Contains information about a service provider.
Abstract base class of signatures
Definition: Signature.cs:10
Abstract base class for all meta-data tags.
Definition: MetaDataTag.cs:10
Abstract base class for all search operators.
Contains information about a thing in a search result.
Event arguments for node callback events.
Definition: NodeEventArgs.cs:9
Contains information about the configuration of a node.
Contains options for a node subscription
Maintains information about an item in the roster.
Definition: RosterItem.cs:75
Contains information about an identity of an entity.
Definition: Identity.cs:11
Contains information about an item of an entity.
Definition: Item.cs:11
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
Definition: XmppClient.cs:58
Represents a case-insensitive string.
Static class that dynamically manages types and interfaces available in the runtime environment.
Definition: Types.cs:15
Contains a reference to a thing
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...
Represents an abstraction of a connection to an XMPP Server.
Definition: IXmppService.cs:45
RosterItem? GetRosterItem(string BareJid)
Gets a roster item.
Task< object > PostToProtectedApi(string LocalResource, object Data, params KeyValuePair< string, string >[] Headers)
Performs an HTTP POST to a protected API on the server, over the current XMPP connection,...
void BuyEDalerFailed(string TransactionId, string Message)
Registers an initiated payment as failed.
void SellEDalerGetOptionsCompleted(string TransactionId, IDictionary< CaseInsensitiveString, object >[] Options)
Registers an initiated getting of payment options for selling eDaler as completed.
Task< bool > DiscoverServices(XmppClient? Client=null)
Run this method to discover services for any given XMPP server.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs > PurgeNodeAsync(string NodeId)
Purges (deletes all items from) a node; throws on failure.
Task< TokenEvent[]> GetNeuroFeatureEvents(string TokenId, int Offset, int MaxCount)
Gets events relating to a specific token.
Task< KeyValuePair< string, TemporaryFile > > GetAttachment(string Url, SignWith SignWith, TimeSpan Timeout)
Gets an attachment for a contract.
string BareJid
The Bare Jid of the current connection, or null.
Definition: IXmppService.cs:82
Task< CreationAttributesEventArgs > GetNeuroFeatureCreationAttributes()
Gets token creation attributes from the broker.
Task SavePrivateXml(XmlElement Xml)
Saves Private XML to the server. Private XML are separated by Local Name and Namespace of the root el...
void SendMessage(QoSLevel QoS, MessageType Type, string Id, string To, string CustomXml, string Body, string Subject, string Language, string ThreadId, string ParentThreadId, EventHandlerAsync< DeliveryEventArgs >? DeliveryCallback, object? State)
Sends a message
Task< NodeResultEventArgs > ClaimThing(string DiscoUri, bool MakePublic)
Claims a think in accordance with parameters defined in a iotdisco claim URI.
Task< ServiceProviderWithLegalId[]> GetServiceProvidersForPeerReviewAsync()
Gets available service providers for buying eDaler.
Task< string > CreateFullEDalerPaymentUri(LegalIdentity To, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays)
Creates a full payment URI.
Task< Balance > GetEDalerBalance()
Gets the current account balance.
Task<(SearchResultThing[], bool)> Search(int Offset, int MaxCount, string? RegistryJid, params SearchOperator[] Operators)
Searches for devices in accordance with settings in a iotdisco-URI.
Task SendPetitionContractResponse(CaseInsensitiveString ContractId, string PetitionId, string RequestorFullJid, bool Response)
Sends a response to a petitioning contract request.
void CanControlResponseCaller(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on the JID of the caller.
Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnectAndConnectToAccount(string domain, bool isIpAddress, string hostName, int portNumber, string userName, string password, string passwordMethod, string languageCode, Assembly appAssembly, Func< XmppClient, Task > connectedFunc)
To be used during the second phase of the startup/registration procedure. Tries to connect (and then ...
Task< PubSubItem[]?> GetLatestItemsAsync(string NodeId, int Count)
Retrieves the latest Count items for a specified node, or null on failure.
Task< LegalIdentity[]> GetLegalIdentities(XmppClient? client=null)
Returns a list of legal identities.
Task< TokensEventArgs > GetNeuroFeatures()
Gets available tokens
Task< Contract > GetContract(CaseInsensitiveString ContractId)
Gets the contract with the specified id.
ISniffer[] RemoteSniffers
Any remote sniffers used for remote debugging.
Task DeletePrivateXml(string LocalName, string Namespace)
Deletes private XML previously saved to the account.
Task< string?> GetApiToken(int Seconds)
Gets a token for use with APIs that are either distributed or use different protocols,...
Task< IqResultEventArgs > RetractAsync(string NodeId, string ItemId)
Retracts (deletes) a specific item from a node; throws on failure.
void CanReadResponseDevice(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on a device token.
Task< bool > TryGenerateAndChangePassword()
Generates and changes the password of the account.
EventHandlerAsync< LegalIdentityEventArgs > IdentityApplicationChanged
An event that fires when an ID Application has changed.
Task< IBuyEDalerServiceProvider[]> GetServiceProvidersForBuyingEDalerAsync()
Gets available service providers for buying eDaler.
Task< IqResultEventArgs?> TryRetractAsync(string NodeId, string ItemId)
Attempts to retract an item; returns result or null on error.
void BuyEDalerGetOptionsFailed(string TransactionId, string Message)
Registers an initiated getting of payment options for buying eDaler as failed.
void CanReadResponseDomain(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on the domain of the caller.
Task< string[]> GetSignedContractReferences()
Gets references to signed contracts.
bool TryDecodeIoTDiscoDirectURI(string DiscoUri, [NotNullWhen(true)] out string? Jid, out string? SourceId, out string? NodeId, out string? PartitionId, [NotNullWhen(true)] out MetaDataTag[]? Tags)
Tries to decode an IoTDisco Direct Reference URI (subset of all possible IoTDisco URIs).
RosterItem[] Roster
Items in the roster.
Task< bool > HasPrivateKey(CaseInsensitiveString legalIdentityId)
Checks if the client has access to the private keys of the specified legal identity.
Task< VerticalStackLayout > GenerateNeuroFeatureProfilingReportMaui(string TokenId)
Generates a Maui report for a timing diagram corresponding to the token.
EventHandlerAsync< SignaturePetitionEventArgs > PetitionForSignatureReceived
An event that fires when a petition for a signature is received.
Task GenerateNewKeys()
Generates new keys
Task<(AccountEvent[], bool)> GetEDalerAccountEvents(int MaxCount, DateTime From)
Gets account events available for the wallet.
Task< TokenEvent[]> GetNeuroFeatureEvents(string TokenId)
Gets events relating to a specific token.
bool TryParseEDalerUri(string Uri, out EDalerUri Parsed, out string Reason)
Tries to parse an eDaler URI.
DateTime LastNeuroFeatureEvent
Timepoint of last Neuro-Feature token event.
Task< SubscriptionEventArgs > UnsubscribeAsync(string NodeId, string? Jid=null, string? SubscriptionId=null)
Unsubscribes from a node for the current or specified JID/subscription ID; throws on failure.
Task< string > CreateFullEDalerPaymentUri(string ToBareJid, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays)
Creates a full payment URI.
Task< LegalIdentity > CompromiseLegalIdentity(CaseInsensitiveString legalIdentityId)
Marks the legal identity as compromised.
DateTime LastEDalerEvent
Timepoint of last eDaler event.
Task AddPushNotificationRule(MessageType MessageType, string LocalName, string Namespace, string Channel, string MessageVariable, string PatternMatchingScript, string ContentScript)
Adds a push-notification rule in the broker.
Task< bool > ImportSigningKeys(XmlElement Xml)
Imports keys
Task< LegalIdentity > GetLegalIdentity(CaseInsensitiveString legalIdentityId)
Gets a specific legal identity.
Task< PaymentTransaction > InitiateSellEDaler(string ServiceId, string ServiceProvider, decimal Amount, string Currency)
Initiates the selling of eDaler using a service provider that does not use a smart contract.
void CanReadResponseAll(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, for all future requests.
Task< string > GenerateNeuroFeatureStateDiagramReport(string TokenId)
Generates a XAML report for a state diagram corresponding to the token.
Task< string > GenerateNeuroFeatureProfilingReport(string TokenId)
Generates a XAML report for a timing diagram corresponding to the token.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> DeleteNodeAsync(string NodeId, string? RedirectUri=null)
Deletes an existing PubSub node with optional redirect URI, or null on failure.
Task< OptionsTransaction > InitiateBuyEDalerGetOptions(string ServiceId, string ServiceProvider)
Initiates the process of getting available options for buying of eDaler using a service provider that...
Task< SearchResultThing[]> GetAllMyDevices()
Gets the full list of my devices.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryCreateNodeAsync(string NodeId, NodeConfiguration? Config=null)
Attempts to create a new PubSub node; returns result or null on error.
Task UnloadFast()
Perform a shutdown in critical situations. Attempts to shut down XMPP connection as fast as possible.
Task ReportNewPushNotificationToken(string Token, PushMessagingService Service, ClientType ClientType)
Reports a new push-notification token to the broker.
Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnectAndCreateAccount(string domain, bool isIpAddress, string hostName, int portNumber, string userName, string password, string languageCode, string ApiKey, string ApiSecret, Assembly appAssembly, Func< XmppClient, Task > connectedFunc)
To be used during the second phase of the startup/registration procedure. Tries to connect (and then ...
EventHandlerAsync< ContractProposalEventArgs > ContractProposalReceived
Event raised when a contract proposal has been received.
void CanControlResponseService(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on a service token.
Task< VerticalStackLayout > GenerateNeuroFeatureStateDiagramReportMaui(string TokenId)
Generates a MAUI report for a state diagram corresponding to the token.
EventHandlerAsync< LegalIdentityPetitionResponseEventArgs > PetitionedIdentityResponseReceived
An event that fires when a petitioned identity response is received.
void IsFriendResponse(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool IsFriend, RuleRange Range, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Is Friend" question.
EventHandlerAsync< ContractPetitionEventArgs > PetitionForContractReceived
An event that fires when a petition for a contract is received.
void GetControlForm(string To, string Language, EventHandlerAsync< DataFormEventArgs > Callback, object? State, params ThingReference[] Nodes)
Gets a control form from an actuator.
Task< TokensEventArgs > GetNeuroFeaturesForContract(string ContractId)
Gets tokens created by a smart contract
void SellEDalerGetOptionsFailed(string TransactionId, string Message)
Registers an initiated getting of payment options for selling eDaler as failed.
Balance? LastEDalerBalance
Last reported balance
Task< CurrentStateEventArgs > GetNeuroFeatureCurrentState(string TokenId)
Gets the current state of a Neuro-Feature token.
void RequestRevokePresenceSubscription(string BareJid)
Requests a previous presence subscription request revoked.
Task PetitionContract(CaseInsensitiveString ContractId, string PetitionId, string Purpose)
Petitions a contract with the specified id and purpose.
Task<(AccountEvent[], bool)> GetEDalerAccountEvents(int MaxCount)
Gets account events available for the wallet.
bool IsIoTDiscoDirectURI(string DiscoUri)
Checks if a URI is a direct reference URI.
Task< string[]> GetCreatedContractReferences()
Gets references to created contracts.
Task< bool > Disown(string RegistryJid, string ThingJid, string SourceId, string Partition, string NodeId)
Disowns a thing
void BuyEDalerCompleted(string TransactionId, decimal Amount, string Currency)
Registers an initiated payment as completed.
Task< bool > NewPushNotificationToken(TokenInformation TokenInformation)
Registers a new token.
Task< LegalIdentity > ObsoleteLegalIdentity(CaseInsensitiveString legalIdentityId)
Marks the legal identity as obsolete.
Task< byte[]> Sign(byte[] data, SignWith signWith)
Signs binary data with the corresponding private key.
bool FileUploadIsSupported
Returns true if file upload is supported, false otherwise.
bool TryDecodeIoTDiscoSearchURI(string DiscoUri, [NotNullWhen(true)] out SearchOperator[]? Operators, out string? RegistryJid)
Tries to decode an IoTDisco Search URI (subset of all possible IoTDisco URIs).
bool? ValidateSignature(LegalIdentity legalIdentity, byte[] data, byte[] signature)
Validates a signature of binary data.
Task< string > GenerateNeuroFeaturePresentReport(string TokenId)
Generates a XAML present report for a token.
void AddRosterItem(RosterItem Item)
Adds an item to the roster. If an item with the same Bare JID is found in the roster,...
Task<(decimal, string, PendingPayment[])> GetPendingEDalerPayments()
Gets pending payments
Task< Contract > SignContract(Contract Contract, string Role, bool Transferable)
Signs a given contract.
Task< string[]> GetNeuroFeatureReferencesForContract(string ContractId, int Offset, int MaxCount)
Gets token references created by a smart contract
Task SelectPeerReviewService(string ServiceId, string ServiceProvider)
Selects a peer-review service as default, for the account, when sending a peer-review request to the ...
Task< string > GenerateNeuroFeatureHistoryReport(string TokenId)
Generates a XAML history report for a token.
Task AddTransferCode(string Code)
Registers a Transfer ID Code
Task SendPetitionSignatureResponse(CaseInsensitiveString LegalId, byte[] Content, byte[] Signature, string PetitionId, string RequestorFullJid, bool Response)
Sends a response to a petitioning signature request.
EventHandlerAsync< VariablesUpdatedEventArgs > NeuroFeatureVariablesUpdated
Event raised when variables have been updated in a state-machine.
Task< string > CreateFullEDalerPaymentUri(string ToBareJid, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays, string Message)
Creates a full payment URI.
void RequestPresenceSubscription(string BareJid)
Requests subscription of presence information from a contact.
Task< SubscriptionEventArgs?> TrySubscribeAsync(string NodeId, string? Jid=null, SubscriptionOptions? Options=null)
Attempts to subscribe to a node; returns result or null on error.
Task< IdApplicationAttributesEventArgs > GetIdApplicationAttributes()
Gets important attributes for a successful ID Application.
Task< SensorDataClientRequest > RequestSensorReadout(string Destination, ThingReference[] Nodes, FieldType Types)
Requests a sensor data readout.
Task AddNeuroFeatureTextNote(string TokenId, string TextNote)
Adds a text note on a token.
EventHandlerAsync< NeuroFeatures.EventArguments.TokenEventArgs > NeuroFeatureRemoved
Event raised when a token has been removed from the wallet.
EventHandlerAsync< RosterItem > OnRosterItemAdded
Event raised when a roster item has been added to the roster.
Task< Contract > ObsoleteContract(CaseInsensitiveString ContractId)
Obsoletes a contract.
EventHandlerAsync< SignaturePetitionResponseEventArgs > PetitionedPeerReviewIdResponseReceived
An event that fires when a petitioned peer review response is received.
bool SupportsPushNotification
If push notification is supported.
void CanControlResponseUser(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on a user token.
Task< LegalIdentity > AddLegalIdentity(RegisterIdentityModel Model, bool GenerateNewKeys, params LegalIdentityAttachment[] Attachments)
Adds a legal identity.
Task< string > TryDecryptMessage(byte[] EncryptedMessage, byte[] PublicKey, Guid TransactionId, string RemoteEndpoint, bool LocalIsRecipient=false)
Tries to decrypt an encrypted private message.
Task< Contract > DeleteContract(CaseInsensitiveString ContractId)
Deletes a contract.
Task< HttpFileUploadEventArgs > RequestUploadSlotAsync(string FileName, string ContentType, long ContentSize)
Uploads a file to the upload component.
void DeleteDeviceRules(string ServiceJID, string DeviceJID, string NodeId, string SourceId, string Partition, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Deletes the rules of a device.
Task< IdentityStatus > ValidateIdentity(LegalIdentity Identity)
Validates a legal identity.
DateTime GetTimeOfLastContractEvent(CaseInsensitiveString ContractId)
Gets the timestamp of the last event received for a given contract ID.
EventHandlerAsync< LegalIdentityPetitionEventArgs > PetitionForIdentityReceived
An event that fires when a petition for an identity is received.
Task< PubSubItem?> GetItemAsync(string NodeId, string ItemId)
Retrieves a single item by ID for a specified node, or null on failure.
Task< ItemResultEventArgs?> TryPublishAsync(string NodeId, string? ItemId=null, string PayloadXml="")
Attempts to publish an item; returns result or null on error.
EventHandlerAsync< ContractSignedEventArgs > ContractSigned
Event raised when contract was signed.
void SellEDalerCompleted(string TransactionId, decimal Amount, string Currency)
Registers an initiated payment as completed.
Task ClearPushNotificationRules()
Clears configured push notification rules in the broker.
bool TryDecodeIoTDiscoClaimURI(string DiscoUri, [NotNullWhen(true)] out MetaDataTag[]? Tags)
Tries to decode an IoTDisco Claim URI (subset of all possible IoTDisco URIs).
void RegisterPepHandler(Type PersonalEventType, EventHandlerAsync< PersonalEventNotificationEventArgs > Handler)
Registers an event handler of a specific type of personal events.
bool IsIoTDiscoClaimURI(string DiscoUri)
Checks if a URI is a claim URI.
Task< VerticalStackLayout > GenerateNeuroFeatureHistoryReportMaui(string TokenId)
Generates a MAUI history report for a token.
EventHandlerAsync< NewStateEventArgs >? NeuroFeatureStateUpdated
Event raised when a state-machine has received a new state.
Task< TokensEventArgs > GetNeuroFeatures(int Offset, int MaxCount)
Gets a section of available tokens
string ProvisioningServiceJid
JID of provisioning service.
EventHandlerAsync< XmppState > ConnectionStateChanged
An event that triggers whenever the connection state to the XMPP server changes.
Definition: IXmppService.cs:63
bool IsOnline
Determines whether the connection to the XMPP server is live or not.
Definition: IXmppService.cs:72
Task< PubSubPageResult?> GetItemsPageAsync(string NodeId, string? ServiceAddress=null, string? After=null, string? Before=null, int? Index=null, int? Max=null)
Retrieves a page of items for a specified node using XEP-0059 result set management parameters.
Task<(SearchResultThing[], string?, bool)> Search(int Offset, int MaxCount, string DiscoUri)
Searches for devices in accordance with settings in a iotdisco-URI.
Task< bool > ChangePassword(string NewPassword)
Changes the password of the account.
void CanReadResponseCaller(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on the JID of the caller.
Task AddNeuroFeatureXmlNote(string TokenId, string XmlNote, bool Personal)
Adds a xml note on a token.
Task< PubSubItem[]?> GetItemsAsync(string NodeId, string[] ItemIds)
Retrieves specific items by ID for a specified node, or null on failure.
Task< LegalIdentity > AddLegalIdentity(Property[] Props, bool GenerateNewKeys, params LegalIdentityAttachment[] Attachments)
Adds a legal identity.
Task<(SearchResultThing[], string?)> SearchAll(string DiscoUri)
Searches for all devices in accordance with settings in a iotdisco-URI.
void BuyEDalerGetOptionsCompleted(string TransactionId, IDictionary< CaseInsensitiveString, object >[] Options)
Registers an initiated getting of payment options for buying eDaler as completed.
Task<(bool Succeeded, string? ErrorMessage, string[]? Alternatives)> TryConnect(string domain, bool isIpAddress, string hostName, int portNumber, string languageCode, Assembly appAssembly, Func< XmppClient, Task > connectedFunc)
To be used during the very first phase of the startup/registration procedure. Tries to connect (and t...
EventHandlerAsync< ContractPetitionResponseEventArgs > PetitionedContractResponseReceived
An event that fires when a petitioned contract response is received.
void CanControlResponseDomain(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on the domain of the caller.
bool UnregisterPepHandler(Type PersonalEventType, EventHandlerAsync< PersonalEventNotificationEventArgs > Handler)
Unregisters an event handler of a specific type of personal events.
void CanControlResponseAll(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, for all future requests.
Task< SubscriptionEventArgs?> TryUnsubscribeAsync(string NodeId, string? Jid=null, string? SubscriptionId=null)
Attempts to unsubscribe from a node; returns result or null on error.
string? LatestError
The latest generic xmpp error, if any.
Definition: IXmppService.cs:87
EventHandlerAsync< NeuroFeatures.EventArguments.TokenEventArgs > NeuroFeatureAdded
Event raised when a token has been added to the wallet.
Task ExportSigningKeys(XmlWriter Output)
Exports Keys to XML.
void RequestPresenceSubscription(string BareJid, string CustomXml)
Requests subscription of presence information from a contact.
EventHandlerAsync< SignaturePetitionEventArgs > PetitionForPeerReviewIdReceived
An event that fires when a petition for peer review is received.
Task< TokenTotalsEventArgs > GetNeuroFeatureTotals()
Gets the value totals of tokens available in the wallet, grouped and ordered by currency.
string CreateIncompleteEDalerPayMeUri(string BareJid, decimal? Amount, decimal? AmountExtra, string Currency, string Message)
Creates an incomplete PayMe-URI.
EventHandlerAsync< RosterItem > OnRosterItemUpdated
Event raised when a roster item has been updated in the roster.
EventHandlerAsync< LegalIdentityEventArgs > LegalIdentityChanged
An event that fires when a legal identity changes.
EventHandlerAsync< PresenceEventArgs > OnPresence
Event raised when a new presence stanza has been received.
Task< SensorDataClientRequest > RequestSensorReadout(string Destination, FieldType Types)
Requests a sensor data readout.
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryPurgeNodeAsync(string NodeId)
Attempts to purge a node; returns result or null on error.
Task< VerticalStackLayout > GenerateNeuroFeaturePresentReportMaui(string TokenId)
Generates a MAUI present report for a token.
string? LatestConnectionError
The latest generic xmpp connection error, if any.
Definition: IXmppService.cs:92
Task PetitionPeerReviewId(CaseInsensitiveString LegalId, LegalIdentity Identity, string PetitionId, string Purpose)
Sends a petition to a third-party to review a legal identity.
Task< ISellEDalerServiceProvider[]> GetServiceProvidersForSellingEDalerAsync()
Gets available service providers for selling eDaler.
Task< string[]> GetNeuroFeatureReferences(int Offset, int MaxCount)
Gets references to a section of available tokens
Task< bool > WaitForConnectedState(TimeSpan timeout)
Can be used to await the server's connection state, i.e. skipping all intermediate states but XmppSta...
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> TryDeleteNodeAsync(string NodeId, string? RedirectUri=null)
Attempts to delete a PubSub node; returns result or null on error.
Task< string[]> GetNeuroFeatureReferencesForContract(string ContractId)
Gets token references created by a smart contract
Task< Waher.Networking.XMPP.PubSub.Events.NodeEventArgs?> CreateNodeAsync(string NodeId, NodeConfiguration? Config=null)
Creates a new PubSub node with optional configuration, or null on failure.
Task AddNeuroFeatureTextNote(string TokenId, string TextNote, bool Personal)
Adds a text note on a token.
void CanControlResponseDevice(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanControl, string[]? ParameterNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Control" question, based on a device token.
Task< ServiceDiscoveryEventArgs > SendServiceDiscoveryRequest(string FullJid)
Performs a Service Discovery on a remote entity.
Task< SearchResultThing[]> SearchAll(string RegistryJid, params SearchOperator[] Operators)
Searches for all devices in accordance with settings in a iotdisco-URI.
string CreateIncompleteEDalerPayMeUri(LegalIdentity To, decimal? Amount, decimal? AmountExtra, string Currency, string PrivateMessage)
Creates an incomplete PayMe-URI.
bool IsIoTDiscoSearchURI(string DiscoUri)
Checks if a URI is a search URI.
void CanReadResponseService(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on a service token.
Task< string[]> GetNeuroFeatureReferences()
Gets references to available tokens
Task SendPetitionIdentityResponse(CaseInsensitiveString LegalId, string PetitionId, string RequestorFullJid, bool Response)
Sends a response to a petitioning identity request.
EventHandlerAsync< SignaturePetitionResponseEventArgs > SignaturePetitionResponseReceived
Event raised when a response to a signature petition has been received.
Task< bool > IsContact(CaseInsensitiveString legalIdentityId)
Checks if a legal identity is in the contacts list.
void GetCertificate(string Token, EventHandlerAsync< CertificateEventArgs > Callback, object? State)
Gets the certificate the corresponds to a token. This certificate can be used to identify services,...
void RemoveRosterItem(string BareJid)
Removes an item from the roster.
Task AddNeuroFeatureXmlNote(string TokenId, string XmlNote)
Adds a xml note on a token.
Task< SubscriptionEventArgs > SubscribeAsync(string NodeId, string? Jid=null, SubscriptionOptions? Options=null)
Subscribes to a node for the current or specified JID with options; throws on failure.
Task SavePrivateXml(string Xml)
Saves Private XML to the server. Private XML are separated by Local Name and Namespace of the root el...
Task< Contract > CreateContract(CaseInsensitiveString TemplateId, Part[] Parts, Parameter[] Parameters, ContractVisibility Visibility, ContractParts PartsMode, Duration Duration, Duration ArchiveRequired, Duration ArchiveOptional, DateTime? SignAfter, DateTime? SignBefore, bool CanActAsTemplate)
Creates a new contract.
Task< LegalIdentity > AddPeerReviewIdAttachment(LegalIdentity Identity, LegalIdentity ReviewerLegalIdentity, byte[] PeerSignature)
Adds an attachment for the peer review.
void SellEDalerFailed(string TransactionId, string Message)
Registers an initiated payment as failed.
XmppState State
The current state of the connection to the XMPP server.
Definition: IXmppService.cs:77
Task PetitionIdentity(CaseInsensitiveString LegalId, string PetitionId, string Purpose)
Petitions a legal identity.
Task< Token > GetNeuroFeature(string TokenId)
Gets a specific token.
EventHandlerAsync< RosterItem > OnRosterItemRemoved
Event raised when a roster item has been removed from the roster.
Task< ItemResultEventArgs > PublishAsync(string NodeId, string? ItemId=null, string PayloadXml="")
Publishes an item on a node with optional item ID and payload XML; throws on failure.
Task SendContractProposal(Contract Contract, string Role, string To, string Message)
Sends a contract proposal to a recipient.
void CanReadResponseUser(string ProvisioningServiceJID, string JID, string RemoteJID, string Key, bool CanRead, FieldType FieldTypes, string[]? FieldNames, string Token, IThingReference Node, EventHandlerAsync< IqResultEventArgs > Callback, object? State)
Sends a response to a previous "Can Read" question, based on a user token.
Task< Item[]?> GetAllNodeIdsAsync()
Returns all node IDs from the PubSub service, or null on failure.
Task< XmlElement > IqSetAsync(string To, string Xml)
Performs an asynchronous IQ Set request/response operation.
EventHandlerAsync< BalanceEventArgs > EDalerBalanceUpdated
Event raised when balance has been updated.
Task< PubSubItem[]?> GetItemsAsync(string NodeId)
Retrieves all items for a specified node, or null on failure.
Task< PaymentTransaction > InitiateBuyEDaler(string ServiceId, string ServiceProvider, decimal Amount, string Currency)
Initiates the buying of eDaler using a service provider that does not use a smart contract.
Task<(SearchResultThing[], bool)> GetMyDevices(int Offset, int MaxCount)
Gets a (partial) list of my devices.
void RequestPresenceUnsubscription(string BareJid)
Requests unssubscription of presence information from a contact.
Task< OptionsTransaction > InitiateSellEDalerGetOptions(string ServiceId, string ServiceProvider)
Initiates the process of getting available options for selling of eDaler using a service provider tha...
Task< TokensEventArgs > GetNeuroFeaturesForContract(string ContractId, int Offset, int MaxCount)
Gets tokens created by a smart contract
string RegistryServiceJid
JID of thing registry service.
Task< XmlElement?> LoadPrivateXml(string LocalName, string Namespace)
Loads private XML previously stored, given the local name and namespace of the XML.
Task< string > CreateFullEDalerPaymentUri(LegalIdentity To, decimal Amount, decimal? AmountExtra, string Currency, int ValidNrDays, string PrivateMessage)
Creates a full payment URI.
Task< EDaler.Transaction > SendEDalerUri(string Uri)
Sends an eDaler URI to the eDaler service.
EventHandlerAsync< ContractReferenceEventArgs > ContractUpdated
Event raised when contract was updated.
Interface for sniffers. Sniffers can be added to ICommunicationLayer classes to eavesdrop on communic...
Definition: ISniffer.cs:10
Interface for thing references.
delegate Task EventHandlerAsync(object Sender, EventArgs e)
Asynchronous version of EventArgs.
SignWith
Options on what keys to use when signing data.
Definition: Enumerations.cs:82
ContractParts
How the parts of the contract are defined.
Definition: Part.cs:9
ContractVisibility
Visibility types for contracts.
Definition: Enumerations.cs:56
RuleRange
Range of a rule change
Definition: RuleRange.cs:7
ClientType
Type of client requesting notification.
Definition: ClientType.cs:7
PushMessagingService
Push messaging service used.
QoSLevel
Quality of Service Level for asynchronous messages. Support for QoS Levels must be supported by the r...
Definition: QoSLevel.cs:8
MessageType
Type of message received.
Definition: MessageType.cs:7
XmppState
State of XMPP connection.
Definition: XmppState.cs:7
FieldType
Field Type flags
Definition: FieldType.cs:10
Definition: App.xaml.cs:4
Represents a duration value, as defined by the xsd:duration data type: http://www....
Definition: Duration.cs:14