A client first establishes an _application connection_ to the service using
GNUNET_SOCIAL_app_connect() providing its _application ID_, then receives the
-public keys of subscribed places and available egos and in response.
+public keys of subscribed places and available egos in response.
## Reconnecting to places
# Message methods
-## _message
+## _converse
-A message sent to the place.
+Human conversation in a private or public place.
### Environment
-#### _id_reply_to
+#### _id_reply
Message ID this message is in reply to.
#### _id_thread
#### _nym_author
Nym of the author.
+FIXME: Are nyms a different data type from egos and person entities?
+Do they have a different format than any other entity address?
+Questions and thoughts on how to fix this in "questions.org"
+
#### _sig_author
Signature of the message body and its variables by the author.
-## Data
+### Data
Message body.
##### _gns_place
GNS name of the place in a globally unique .zkey zone
+FIXME: A custom _gns PSYC data type should be avoidable by parsing
+and interpreting PSYC uniforms appropriately.
+Thoughts on this in "questions.org"
+
#### Without GNS
##### _key_pub_place
Public key of place
+FIXME: _key_pub can't be the data type for GNUnet-specific cryptographic
+addressing. Questions and thoughts on how to fix this in "questions.org"
+
##### _peer_origin
Peer ID of origin
#### _size_file
Size of file
-#### _mime_file
+#### _type_file
MIME type of file
#### _name_file
## _file
Messages with a _file method contain a file,
-which is saved to disk upon receipt at the following location:
-$GNUNET_DATA_HOME/social/files/<H(place_pub)>/<message_id>
+which is saved to disk upon reception at the following location:
+$GNUNET_DATA_HOME/social/files/<H(place_pub)>/<H(message_id)>
### Environment
#### _size_file
Size of file
-#### _mime_file
+#### _type_file
MIME type of file
#### _name_file
/**
- * Entry status of a place.
+ * Entry status of a place per application.
*/
-enum GNUNET_SOCIAL_PlaceState
+enum GNUNET_SOCIAL_AppPlaceState
{
/**
- * Place was once entered but left since.
+ * The place was once entered by the ego, but left since.
+ * It's possible to establish a local connection to the place
+ * without re-entering to fetch history from the PSYCstore.
+ * @see enum GNUNET_PSYC_SlaveJoinFlags and GNUNET_SOCIAL_guest_enter()
*/
GNUNET_SOCIAL_PLACE_STATE_ARCHIVED = 0,
+
/**
- * Place is entered but not subscribed.
+ * The place is entered by the ego,
+ * but this application is not subscribed to it.
*/
GNUNET_SOCIAL_PLACE_STATE_ENTERED = 1,
+
/**
- * Place is entered and subscribed.
+ * The place is entered by the ego and
+ * and this application is subscribed to it.
*/
GNUNET_SOCIAL_PLACE_STATE_SUBSCRIBED = 2,
};
+/**
+ * Called after receiving initial list of egos and places.
+ */
+typedef void
+(*GNUNET_SOCIAL_AppConnectedCallback) (void *cls);
+
+
/**
* Notification about a home.
*
* @param place_pub_key
* Public key of the place.
* @param place_state
- * @see enum GNUNET_SOCIAL_PlaceState
+ * @see enum GNUNET_SOCIAL_AppPlaceState
*/
typedef void
(*GNUNET_SOCIAL_AppHostPlaceCallback) (void *cls,
struct GNUNET_SOCIAL_HostConnection *hconn,
struct GNUNET_SOCIAL_Ego *ego,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
- enum GNUNET_SOCIAL_PlaceState place_state);
+ enum GNUNET_SOCIAL_AppPlaceState place_state);
/**
* Notification about a place.
* @param place_pub_key
* Public key of the place.
* @param place_state
- * @see enum GNUNET_SOCIAL_PlaceState
+ * @see enum GNUNET_SOCIAL_AppPlaceState
*/
typedef void
(*GNUNET_SOCIAL_AppGuestPlaceCallback) (void *cls,
struct GNUNET_SOCIAL_GuestConnection *gconn,
struct GNUNET_SOCIAL_Ego *ego,
const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key,
- enum GNUNET_SOCIAL_PlaceState place_state);
+ enum GNUNET_SOCIAL_AppPlaceState place_state);
/**
* Establish application connection to the social service.
*
- * The @host_place_cb and @guest_place_cb functions are
+ * The @host_cb and @guest_cb functions are
* initially called for each entered places,
* then later each time a new place is entered with the current app ID.
*
GNUNET_SOCIAL_AppEgoCallback ego_cb,
GNUNET_SOCIAL_AppHostPlaceCallback host_cb,
GNUNET_SOCIAL_AppGuestPlaceCallback guest_cb,
+ GNUNET_SOCIAL_AppConnectedCallback connected_cb,
void *cls);
/**
* Disconnect app.
*
- * @param c
- * App handle.
+ * @param app
+ * Application handle.
+ * @param disconnect_cb
+ * Disconnect callback.
+ * @param disconnect_cls
+ * Disconnect closure.
*/
void
-GNUNET_SOCIAL_app_disconnect (struct GNUNET_SOCIAL_App *app);
+GNUNET_SOCIAL_app_disconnect (struct GNUNET_SOCIAL_App *app,
+ GNUNET_ContinuationCallback disconnect_cb,
+ void *disconnect_cls);
/**
/**
* Stop hosting a home.
*
- * Sends a _notice_place_closed announcement to the home.
+ * Sends a _notice_place_closing announcement to the home.
* Invalidates host handle.
*
* @param hst