/// <summary> /// We are receiver /// </summary> public ObjectTransfer(MSNObject obj, Contact remote) : base(remote.P2PVersionSupported, remote, remote.SelectBestEndPointId()) { msnObject = obj; if (msnObject.ObjectType == MSNObjectType.UserDisplay) { msnObject = new DisplayImage(); applicationId = 12; msnObject.SetContext(remote.UserTileLocation, false); } else if (msnObject.ObjectType == MSNObjectType.Scene) { msnObject = new SceneImage(); applicationId = 12; msnObject.SetContext(remote.SceneContext, false); } else if (msnObject.ObjectType == MSNObjectType.Emoticon || msnObject.ObjectType == MSNObjectType.Wink) { applicationId = 11; } else { applicationId = 1; } sending = false; }
/// <summary> /// P2PActivity constructor. /// </summary> /// <param name="remote"></param> /// <param name="applicationID"></param> /// <param name="activityName"></param> /// <param name="activityData"></param> public P2PActivity(Contact remote, uint applicationID, string activityName, string activityData) : base(remote.P2PVersionSupported, remote, remote.SelectBestEndPointId()) { this.applicationId = applicationID; this.activityName = activityName; this.activityData = activityData; sending = true; }
/// <summary> /// We are sender. /// </summary> /// <param name="remote"></param> /// <param name="data"></param> /// <param name="filename"></param> public FileTransfer(Contact remote, Stream data, string filename) : base(remote.P2PVersionSupported, remote, remote.SelectBestEndPointId()) { _context = new FTContext(filename, (ulong)data.Length); _dataStream = data; _sending = true; }