diff options
author | Gabor X Toth <*@tg-x.net> | 2016-02-21 13:41:29 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-02-21 13:41:29 +0000 |
commit | 1f2325002d2d0bfa1f91710346376ac00a1d28ae (patch) | |
tree | 223def8632571ef6cd7876cc0efbd9aa9a724952 /src/social | |
parent | 9b8f3b8f3553b5b2f67cd14ad9a4f431f98d505d (diff) | |
download | gnunet-1f2325002d2d0bfa1f91710346376ac00a1d28ae.tar.gz gnunet-1f2325002d2d0bfa1f91710346376ac00a1d28ae.zip |
social: relay + save doc
Diffstat (limited to 'src/social')
-rw-r--r-- | src/social/gnunet-service-social.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index a15f8bdc1..04042784c 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -777,6 +777,16 @@ psyc_recv_message (void *cls, | |||
777 | } | 777 | } |
778 | 778 | ||
779 | 779 | ||
780 | /** | ||
781 | * Relay a message part received from a guest to the the place. | ||
782 | * | ||
783 | * @param hst | ||
784 | * Host. | ||
785 | * @param pmsg | ||
786 | * Message part. | ||
787 | * @param nym_pub_key | ||
788 | * Nym the message is received from. | ||
789 | */ | ||
780 | static void | 790 | static void |
781 | host_relay_message_part (struct Host *hst, | 791 | host_relay_message_part (struct Host *hst, |
782 | const struct GNUNET_MessageHeader *pmsg, | 792 | const struct GNUNET_MessageHeader *pmsg, |
@@ -813,6 +823,9 @@ host_relay_message_part (struct Host *hst, | |||
813 | } | 823 | } |
814 | 824 | ||
815 | 825 | ||
826 | /** | ||
827 | * Received a method to be relayed from a guest. | ||
828 | */ | ||
816 | static void | 829 | static void |
817 | place_recv_relay_method (void *cls, | 830 | place_recv_relay_method (void *cls, |
818 | const struct GNUNET_PSYC_MessageHeader *msg, | 831 | const struct GNUNET_PSYC_MessageHeader *msg, |
@@ -831,6 +844,9 @@ place_recv_relay_method (void *cls, | |||
831 | } | 844 | } |
832 | 845 | ||
833 | 846 | ||
847 | /** | ||
848 | * Received a modifier to be relayed from a guest. | ||
849 | */ | ||
834 | static void | 850 | static void |
835 | place_recv_relay_modifier (void *cls, | 851 | place_recv_relay_modifier (void *cls, |
836 | const struct GNUNET_PSYC_MessageHeader *msg, | 852 | const struct GNUNET_PSYC_MessageHeader *msg, |
@@ -852,6 +868,9 @@ place_recv_relay_modifier (void *cls, | |||
852 | } | 868 | } |
853 | } | 869 | } |
854 | 870 | ||
871 | /** | ||
872 | * Received a data fragment to be relayed from a guest. | ||
873 | */ | ||
855 | static void | 874 | static void |
856 | place_recv_relay_data (void *cls, | 875 | place_recv_relay_data (void *cls, |
857 | const struct GNUNET_PSYC_MessageHeader *msg, | 876 | const struct GNUNET_PSYC_MessageHeader *msg, |
@@ -871,6 +890,9 @@ place_recv_relay_data (void *cls, | |||
871 | } | 890 | } |
872 | 891 | ||
873 | 892 | ||
893 | /** | ||
894 | * Received end of message to be relayed from a guest. | ||
895 | */ | ||
874 | static void | 896 | static void |
875 | place_recv_relay_eom (void *cls, | 897 | place_recv_relay_eom (void *cls, |
876 | const struct GNUNET_PSYC_MessageHeader *msg, | 898 | const struct GNUNET_PSYC_MessageHeader *msg, |
@@ -889,6 +911,12 @@ place_recv_relay_eom (void *cls, | |||
889 | } | 911 | } |
890 | 912 | ||
891 | 913 | ||
914 | /** | ||
915 | * Received a method to be saved to disk. | ||
916 | * | ||
917 | * Create a new file for writing the data part of the message into, | ||
918 | * if the file does not yet exist. | ||
919 | */ | ||
892 | static void | 920 | static void |
893 | place_recv_save_method (void *cls, | 921 | place_recv_save_method (void *cls, |
894 | const struct GNUNET_PSYC_MessageHeader *msg, | 922 | const struct GNUNET_PSYC_MessageHeader *msg, |
@@ -929,6 +957,11 @@ place_recv_save_method (void *cls, | |||
929 | } | 957 | } |
930 | 958 | ||
931 | 959 | ||
960 | /** | ||
961 | * Received a data fragment to be saved to disk. | ||
962 | * | ||
963 | * Append data fragment to the file. | ||
964 | */ | ||
932 | static void | 965 | static void |
933 | place_recv_save_data (void *cls, | 966 | place_recv_save_data (void *cls, |
934 | const struct GNUNET_PSYC_MessageHeader *msg, | 967 | const struct GNUNET_PSYC_MessageHeader *msg, |
@@ -972,6 +1005,11 @@ place_recv_save_data (void *cls, | |||
972 | } | 1005 | } |
973 | 1006 | ||
974 | 1007 | ||
1008 | /** | ||
1009 | * Received end of message to be saved to disk. | ||
1010 | * | ||
1011 | * Remove .part ending from the filename. | ||
1012 | */ | ||
975 | static void | 1013 | static void |
976 | place_recv_save_eom (void *cls, | 1014 | place_recv_save_eom (void *cls, |
977 | const struct GNUNET_PSYC_MessageHeader *msg, | 1015 | const struct GNUNET_PSYC_MessageHeader *msg, |