public static icm.XmlApi.attendeeType ToAttendee(icm.XmlApi.terminalType terminal) { icm.XmlApi.attendeeType attendee = new XmlApi.attendeeType(); attendee.AddressBookEnabled = terminal.AddressBookEnabled; attendee.AddressBookEnabledSpecified = terminal.AddressBookEnabledSpecified; attendee.AreaCode = terminal.AreaCode; attendee.CountryCode = terminal.CountryCode; attendee.Description = terminal.Description; //attendee.DialIn = terminal.DialIn; //attendee.Email = terminal.Email; //attendee.FirstName = terminal.FirstName; //attendee.LastName = terminal.LastName; attendee.LocationId = terminal.LocationId; attendee.MaxBandwidth = terminal.MaxBandwidth; attendee.MaxBandwidthSpecified = terminal.MaxBandwidthSpecified; attendee.MaxISDNBandwidth = terminal.MaxISDNBandwidth; attendee.MaxISDNBandwidthSpecified = terminal.MaxISDNBandwidthSpecified; attendee.MemberId = terminal.MemberId; attendee.Protocol = terminal.Protocol; attendee.RegisterGKId = terminal.RegisterGKId; attendee.TelephoneNumber = terminal.TelephoneNumber; attendee.Telepresence = terminal.Telepresence; //attendee.TerminalEmail = terminal.TerminalEmail; attendee.TerminalId = terminal.TerminalId; attendee.TerminalName = terminal.TerminalName; attendee.TerminalNumber = terminal.TerminalNumber; attendee.ThreeG = terminal.ThreeG; //attendee.UserId = terminal.UserId; attendee.VideoProfile = terminal.VideoProfile; attendee.VoiceOnly = terminal.VoiceOnly; return attendee; }
public XmlApi.userProfileType GetUserProfile(icm.XmlApi.userType userInfo) { if (userInfo == null) throw new ArgumentNullException("userInfo"); XmlApi.getUserProfileRequestType request = new XmlApi.getUserProfileRequestType(); request.MemberId = userInfo.MemberId; request.ProfileId = new String[1]{userInfo.UserProfileId}; XmlApi.getUserProfileResponseType response = this._Connector.Request(request) as XmlApi.getUserProfileResponseType; return response != null ? (response.UserProfile != null && response.UserProfile.Length > 0 ? response.UserProfile[0] : null) : null; }
public XmlApi.dialingInfoType GetDialingInfo(icm.XmlApi.userType userInfo, SchedulingInfo schedulingInfo, icm.XmlApi.virtualRoomType defaultVirtualRoom, bool isCreate, bool isDelete) { if (userInfo == null) throw new ArgumentNullException("userInfo"); if (userInfo.UserId == null) throw new ArgumentNullException("number"); string accessPIN = schedulingInfo.meetingPin; XmlApi.getDialingInfoRequestType request = new XmlApi.getDialingInfoRequestType(); request.MemberId = userInfo.MemberId; request.ItemElementName = XmlApi.ItemChoiceType5.UserId; request.Item = userInfo.UserId; if (!string.IsNullOrEmpty(accessPIN)) request.AccessPIN = Encoding.UTF8.GetBytes(accessPIN); else request.AccessPIN = defaultVirtualRoom.AccessPIN; if (null != defaultVirtualRoom.ServicePrefix) request.servicePrefix = defaultVirtualRoom.ServicePrefix; if (null != defaultVirtualRoom.ServiceTemplateId) request.ServiceTemplateId = defaultVirtualRoom.ServiceTemplateId; if (isCreate) { request.operation = XmlApi.operationPolicyType.CREATE; } else { request.operation = XmlApi.operationPolicyType.MODIFY; } if (isDelete) { request.operation = XmlApi.operationPolicyType.CANCEL; } request.operationSpecified = true; XmlApi.getDialingInfoResponseType response = this._Connector.Request(request) as XmlApi.getDialingInfoResponseType; return response != null ? response.DialingInfo : null; }
public XmlApi.netLocationType[] GetLocations( icm.XmlApi.userType userInfo ) { if( userInfo == null ) throw new ArgumentNullException( "userInfo" ); XmlApi.getLocationRequestType request = new icm.XmlApi.getLocationRequestType(); XmlApi.getLocationResponseType response = this._Connector.Request( request ) as XmlApi.getLocationResponseType; return response != null ? response.Location : null; }
public XmlApi.terminalType[] GetTerminals( icm.XmlApi.userType userInfo, string name ) { if( userInfo == null ) throw new ArgumentNullException( "userInfo" ); XmlApi.getTerminalRequestType request = new icm.XmlApi.getTerminalRequestType(); request.MemberId = userInfo.MemberId; request.SortBy = XmlApi.terminalSortByType.NAME; request.SortBySpecified = true; request.Ascending = true; request.AscendingSpecified = true; if (name == null) request.Length = "20"; else { icm.XmlApi.ItemsChoiceType2[] choice2s = new XmlApi.ItemsChoiceType2[1]; choice2s[0] = XmlApi.ItemsChoiceType2.Name; string[] items = new String[1]; items[0] = name; request.ItemsElementName = choice2s; request.Items = items; request.Length = "20"; } XmlApi.getTerminalResponseType response = this._Connector.Request( request ) as XmlApi.getTerminalResponseType; return response != null ? response.Terminal : null; }
public XmlApi.organizationType[] GetMembers( icm.XmlApi.userType userInfo ) { if( userInfo == null ) throw new ArgumentNullException( "userInfo" ); XmlApi.getOrganizationRequestType request = new icm.XmlApi.getOrganizationRequestType(); request.Item = userInfo.MemberId; request.ItemElementName = XmlApi.ItemChoiceType1.MemberId ; XmlApi.getOrganizationResponseType response = this._Connector.Request(request) as XmlApi.getOrganizationResponseType; return response != null ? response.Organization : null; }
public XmlApi.meetingServiceType[] GetMeetingTypes( icm.XmlApi.userType userInfo ) { if( userInfo == null ) throw new ArgumentNullException( "userInfo" ); XmlApi.getMeetingServiceRequestType request = new icm.XmlApi.getMeetingServiceRequestType(); request.MemberId = userInfo.MemberId; request.Item = userInfo.LoginID; request.ItemElementName = XmlApi.ItemChoiceType2.LoginId; XmlApi.getMeetingServiceResponseType response = this._Connector.Request( request ) as XmlApi.getMeetingServiceResponseType; return response != null ? response.MeetingService : null; }
public XmlApi.getVirtualRoomResponseType GetVirtualRooms( icm.XmlApi.userType userInfo ) { if( userInfo == null ) throw new ArgumentNullException( "userInfo" ); XmlApi.getVirtualRoomRequestType request = new icm.XmlApi.getVirtualRoomRequestType(); request.MemberId = userInfo.MemberId; request.Item = userInfo.LoginID; request.ItemElementName = icm.XmlApi.ItemChoiceType3.LoginId; XmlApi.getVirtualRoomResponseType response = this._Connector.Request( request ) as XmlApi.getVirtualRoomResponseType; //return response != null ? response.VirtualRoom : null; return response; }
private void AddRecurrenceInfo(icm.XmlApi.conferenceType conference, SchedulingInfo schedulingInfo) { if (conference == null) throw new ArgumentNullException("conference"); RecurrencePattern recurrencePattern = schedulingInfo.recurrencePattern; //StringBuilder patternString = new StringBuilder(""); //patternString.Append(appointment.Start.ToUniversalTime()).Append(appointment.End.ToUniversalTime()); if (recurrencePattern.hasEnd) { conference.RecurrenceEnd = new icm.XmlApi.conferenceTypeRecurrenceEnd(); conference.RecurrenceEnd.Item = recurrencePattern.numberOfOccurrences; //patternString.Append(recurrence.NumberOfOccurrences).Append(recurrence.StartDate.ToUniversalTime()); RvLogger.InfoWrite("Recurrence will be scheduled with end date " + recurrencePattern.endDate + " - Occurrences [" + recurrencePattern.numberOfOccurrences + "]."); } else RvLogger.InfoWrite("Recurrence will be scheduled without end date."); if (recurrencePattern.patternType == PatternType.DAILY) { icm.XmlApi.recurrenceDailyType recurrenceDailyType = new icm.XmlApi.recurrenceDailyType(); if (recurrencePattern.dailyInterval != -1) recurrenceDailyType.Item = recurrencePattern.dailyInterval; conference.Item = recurrenceDailyType; //patternString.Append("daily").Append(dailyPattern.Interval); } else if (recurrencePattern.patternType == PatternType.WEEKLY) { //patternString.Append("weekly").Append(weeklyPattern.Interval); if (recurrencePattern.weeklyInterval == 0) { icm.XmlApi.recurrenceDailyType recurrenceDailyType = new icm.XmlApi.recurrenceDailyType(); recurrenceDailyType.Item = true; conference.Item = recurrenceDailyType; } else { icm.XmlApi.recurrenceWeeklyType recurrenceWeeklyType = new icm.XmlApi.recurrenceWeeklyType(); recurrenceWeeklyType.NumberOfEveryWeek = recurrencePattern.weeklyInterval; recurrenceWeeklyType.DayOfWeek = recurrencePattern.daysOfWeek; conference.Item = recurrenceWeeklyType; } } else if (recurrencePattern.patternType == PatternType.MONTHLY) { icm.XmlApi.recurrenceMonthlyType recurrenceMonthlyType = new icm.XmlApi.recurrenceMonthlyType(); recurrenceMonthlyType.NumberOfEveryMonth = recurrencePattern.monthlyInterval; recurrenceMonthlyType.Item = recurrencePattern.dayOfMonth; conference.Item = recurrenceMonthlyType; //patternString.Append("monthly").Append(monthlyPattern.Interval).Append(monthlyPattern.DayOfMonth); } else if (recurrencePattern.patternType == PatternType.RELATIVE_MONTHLY) { icm.XmlApi.recurrenceMonthlyType recurrenceMonthlyType = new icm.XmlApi.recurrenceMonthlyType(); icm.XmlApi.recurrenceMonthlyTypeDayOfNumberOfEveryMonth dayOfNumberOfEveryMonth = new icm.XmlApi.recurrenceMonthlyTypeDayOfNumberOfEveryMonth(); dayOfNumberOfEveryMonth.WeekOfMonth = recurrencePattern.weekOfMonth; dayOfNumberOfEveryMonth.DayOfWeek = recurrencePattern.dayOfWeekOfMonthly; recurrenceMonthlyType.NumberOfEveryMonth = recurrencePattern.monthlyInterval; recurrenceMonthlyType.Item = dayOfNumberOfEveryMonth; conference.Item = recurrenceMonthlyType; //patternString.Append("relativeMonthly").Append(monthlyPattern.DayOfTheWeekIndex) // .Append(monthlyPattern.DayOfTheWeek) // .Append(monthlyPattern.Interval); } else if (recurrencePattern.patternType == PatternType.YEARLY || recurrencePattern.patternType == PatternType.RELATIVE_YEARLY) { RvLogger.FatalWrite("Trying to add NOT SUPPORTED yearly recurrence."); }else RvLogger.FatalWrite("Trying to add NOT SUPPORTED UNKNOWN recurrence."); //return patternString.ToString(); }
private icm.XmlApi.virtualRoomType[] getVirtualRoom(icm.XmlApi.userType userInfo) { icm.XmlApi.getVirtualRoomResponseType virtualRoomResponse = adapter.GetVirtualRooms(userInfo); return virtualRoomResponse.VirtualRoom; }
private icm.XmlApi.dialingInfoType getDialingInfo(SchedulingInfo schedulingInfo, icm.XmlApi.userType userInfo, icm.XmlApi.virtualRoomType defaultVirtualRoom) { bool isCreate = isCreateMeetingRequest(schedulingInfo); return adapter.GetDialingInfo(userInfo, schedulingInfo, defaultVirtualRoom, isCreate, schedulingInfo.requestType == RequestType.CancelMeeting); }
private static void saveConferenceInfoIntoAppointment(icm.XmlApi.scheduleReportType result, webServiceData.Appointment appointment, SchedulingInfo schedulingInfo, webServiceData.ExchangeService service, string dialingInfoStr, string uniqueId) { string hashString = RvScopiaMeeting.GetHashString(schedulingInfo, schedulingInfo.subject); if (schedulingInfo.requestType != RequestType.CancelMeeting) { string conferenceID = null == result || !result.Success ? "empty" : result.ConferenceId; if (isCreateMeetingRequest(schedulingInfo)) { if (!result.Success && IS_DELETE_ERROR) { appointment.Delete(webServiceData.DeleteMode.HardDelete, webServiceData.SendCancellationsMode.SendToNone); RvLogger.DebugWrite("delete appointment: " + schedulingInfo.subject); return; } appointment.MeetingWorkspaceUrl = CONFERENCE_ID + ":" + conferenceID + ":" + hashString + "$" + schedulingInfo.recurrenceHashInfo; if (USE_HTML) appointment.Body.BodyType = webServiceData.BodyType.HTML; List<webServiceData.Attachment> attachments = new List<webServiceData.Attachment>(appointment.Attachments.Count); foreach (webServiceData.Attachment attachment in appointment.Attachments) appointment.Body.Text = appointment.Body.Text.Replace(attachment.Name, ""); appointment.Body.Text = appointment.Body + Environment.NewLine + "<br>" + dialingInfoStr; if (schedulingInfo.meetingType == MeetingType.Reccurence) appointment.MeetingWorkspaceUrl = "#" + appointment.MeetingWorkspaceUrl; } else { if (!result.Success && IS_DELETE_ERROR) { appointment.Delete(webServiceData.DeleteMode.HardDelete, webServiceData.SendCancellationsMode.SendToNone); RvLogger.DebugWrite("delete appointment: " + schedulingInfo.subject); return; } } } updateAppointment(appointment); }
private static void updateAppointment(webServiceData.Appointment appointment, SchedulingInfo schedulingInfo, webServiceData.ExchangeService service, string dialingInfoStr, icm.XmlApi.scheduleReportType result) { if (null == appointment) return; string uniqueId = null; if (schedulingInfo.meetingType == MeetingType.Ocurrence) { appointment = webServiceData.Appointment.Bind(service, appointment.Id, new webServiceData.PropertySet(webServiceData.BasePropertySet.FirstClassProperties) { RequestedBodyType = webServiceData.BodyType.HTML }); } else if (appointment.AppointmentType == webServiceData.AppointmentType.RecurringMaster) { uniqueId = appointment.Id.UniqueId; appointment = webServiceData.Appointment.Bind(service, appointment.Id); } else appointment = webServiceData.Appointment.Bind(service, appointment.Id); saveConferenceInfoIntoAppointment(result, appointment, schedulingInfo, service, dialingInfoStr, uniqueId); }