/// <summary>
        /// Create an NdnfsFile object to assemble the contents of segment packets
        /// into a single block of memory for the child version node. You should use
        /// nameSpace.addOnContentSet to add the callback which is called when the
        /// segmented content is complete for a child version node. After creating t
        /// his, you should call start().
        /// </summary>
        /// <param name="nameSpace">The Namespace node whose children are the names
        /// of versions of the file.</param>
        /// <param name="onVersionContentSet">(optional) When the segments are
        /// assembled for the file version, this calls
        /// onVersionContentSet(ndnfsFile, contentNamespace, content) where
        /// ndnfsFile is this object, contentNamespace is the Namespace node for
        /// the file version, and content is the assembled content Blob (which is
        /// the same as contentNamespace.getContent()). If omitted, don't call.</param>
        public NdnfsFile
            (Namespace nameSpace, OnVersionContentSet onVersionContentSet = null)
        {
            namespace_           = nameSpace;
            onVersionContentSet_ = onVersionContentSet;

            namespace_.addOnContentSet(onContentSet);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a SegmentStream object to attach to the given namespace. You can
        /// add callbacks and set options, then you should call start().
        /// </summary>
        /// <param name="nameSpace">The Namespace node whose children are the names
        /// of segment Data packets.</param>
        public SegmentStream(Namespace nameSpace)
        {
            namespace_ = nameSpace;

            namespace_.addOnContentSet(onContentSet);
        }