Class GroupBase

Definition

Namespace:
Tizen.Applications.Cion
Assembly:
Tizen.Applications.Cion.dll
API Level:
9

An abstract class to represent cion group.

C#
Copy
public abstract class GroupBase : IDisposable
Inheritance
System.Object
GroupBase
Implements
System.IDisposable

Constructors

View Source

GroupBase(String)

The constructor of GroupBase class.

Declaration
C#
Copy
public GroupBase(string topicName)
Parameters
Type Name Description
System.String topicName

The topic of group.

Remarks

The maximum length of topic name is 512.

Exceptions
Type Condition
System.ArgumentException

Thrown when the given topic name is too long.

System.InvalidOperationException

Thrown when there is not enough memory to continue the execution of the method.

API Level: 9
View Source

GroupBase(String, SecurityInfo)

The constructor of GroupBase class.

Declaration
C#
Copy
public GroupBase(string topicName, SecurityInfo security)
Parameters
Type Name Description
System.String topicName

The topic of group.

SecurityInfo security

The security configuration.

Remarks

The maximum length of topic name is 512.

Exceptions
Type Condition
System.ArgumentException

Thrown when the given topic name is too long.

System.InvalidOperationException

Thrown when there is not enough memory to continue the execution of the method.

API Level: 9

Properties

View Source

Topic

Gets the topic of current cion group.

Declaration
C#
Copy
public string Topic { get; }
Property Value
Type Description
System.String
API Level: 9

Methods

View Source

Dispose()

Releases all resources used by the GroupBase class.

Declaration
C#
Copy
public void Dispose()
API Level: 9
View Source

Dispose(Boolean)

Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

If true, disposes any disposable objects. If false, does not dispose disposable objects.

API Level: 9
View Source

OnJoined(PeerInfo)

The callback invoked when another peer joined in the current group.

Declaration
C#
Copy
protected abstract void OnJoined(PeerInfo peerInfo)
Parameters
Type Name Description
PeerInfo peerInfo

The peer info of joined in the current group.

API Level: 9
View Source

OnLeft(PeerInfo)

The callback invoked when another peer left from the current group.

Declaration
C#
Copy
protected abstract void OnLeft(PeerInfo peerInfo)
Parameters
Type Name Description
PeerInfo peerInfo

The peer info of left from the current group.

API Level: 9
View Source

OnPayloadReceived(Payload, PeerInfo)

The callback invoked when payload received.

Declaration
C#
Copy
protected abstract void OnPayloadReceived(Payload payload, PeerInfo peer)
Parameters
Type Name Description
Payload payload
PeerInfo peer
API Level: 9
View Source

Publish(Payload)

Publishes payload to current group.

Declaration
C#
Copy
public void Publish(Payload payload)
Parameters
Type Name Description
Payload payload

The payload to publish.

Exceptions
Type Condition
System.ArgumentException

Thrown when the payload is invalid.

System.InvalidOperationException

Thrown when failed to publish.

API Level: 9
View Source

Subscribe()

Subscribes the topic.

Declaration
C#
Copy
public void Subscribe()
Exceptions
Type Condition
System.InvalidOperationException

Thrown when failed to subscribe.

UnauthorizedAccessException

Thrown when an application does not have the privilege to access this method.

API Level: 9
Privilege Level: public
Privilege: http://tizen.org/privilege/d2d.datasharinghttp://tizen.org/privilege/internet
View Source

Unsubscribe()

Unsubscribes the topic.

Declaration
C#
Copy
public void Unsubscribe()
API Level: 9

Implements

System.IDisposable