You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
(22) |
May
(175) |
Jun
(188) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Jim V. <jim...@us...> - 2002-06-11 21:15:24
|
Update of /cvsroot/swapdv/swapdv/ReplayGuide
In directory usw-pr-cvs1:/tmp/cvs-serv401/ReplayGuide
Modified Files:
Channel.java
Log Message:
Added channel renaming.
Index: Channel.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayGuide/Channel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Channel.java 3 Jun 2002 23:03:03 -0000 1.2
+++ Channel.java 11 Jun 2002 21:15:19 -0000 1.3
@@ -260,6 +260,10 @@
public String getShowLabel() {
return Util.getString(this.szShowLabel);
}
+
+ public void setShowLabel(String label) {
+ Util.setString(szShowLabel, label);
+ }
protected Description description=null;
public Description getDescription() {
|
|
From: Jim V. <jim...@us...> - 2002-06-11 21:15:23
|
Update of /cvsroot/swapdv/swapdv
In directory usw-pr-cvs1:/tmp/cvs-serv401
Modified Files:
SwapDV.form SwapDV.java
Log Message:
Added channel renaming.
Index: SwapDV.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.form,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- SwapDV.form 11 Jun 2002 18:26:57 -0000 1.25
+++ SwapDV.form 11 Jun 2002 21:15:19 -0000 1.26
@@ -39,6 +39,18 @@
</MenuItem>
</SubComponents>
</Menu>
+ <MenuItem class="javax.swing.JMenuItem" name="jMenuItemRenameChan">
+ <Properties>
+ <Property name="mnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
+ <Connection type="value" value="'R'" valueType="int"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Rename"/>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemRenameChanActionPerformed"/>
+ </Events>
+ </MenuItem>
<MenuItem class="javax.swing.JSeparator" name="jSeparator4">
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="jMenuItemDelete">
@@ -545,6 +557,15 @@
</MenuItem>
</SubComponents>
</Menu>
+ <MenuItem class="javax.swing.JMenuItem" name="jMenuItemChanRename2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Item"/>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemChanRename2ActionPerformed"/>
+ </Events>
+ </MenuItem>
<MenuItem class="javax.swing.JSeparator" name="jSeparator2">
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="jMenuItemDelete2">
@@ -668,7 +689,6 @@
<SyntheticProperty name="generatePosition" type="boolean" value="true"/>
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
- <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-91,0,0,2,-121"/>
</SyntheticProperties>
<Events>
@@ -708,10 +728,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Shows & Channels" toolTip="">
- <Property name="tabTitle" type="java.lang.String" value="Shows & Channels"/>
- <Property name="tabToolTip" type="java.lang.String" value=""/>
- </JTabbedPaneConstraints>
+ <JTabbedPaneConstraints tabName="Shows & Channels" toolTip=""/>
</Constraint>
</Constraints>
@@ -808,10 +825,7 @@
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Downloads" toolTip="">
- <Property name="tabTitle" type="java.lang.String" value="Downloads"/>
- <Property name="tabToolTip" type="java.lang.String" value=""/>
- </JTabbedPaneConstraints>
+ <JTabbedPaneConstraints tabName="Downloads" toolTip=""/>
</Constraint>
</Constraints>
@@ -843,10 +857,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Uploads" toolTip="">
- <Property name="tabTitle" type="java.lang.String" value="Uploads"/>
- <Property name="tabToolTip" type="java.lang.String" value=""/>
- </JTabbedPaneConstraints>
+ <JTabbedPaneConstraints tabName="Uploads" toolTip=""/>
</Constraint>
</Constraints>
Index: SwapDV.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.java,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- SwapDV.java 11 Jun 2002 18:26:57 -0000 1.60
+++ SwapDV.java 11 Jun 2002 21:15:19 -0000 1.61
@@ -880,616 +880,657 @@
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
- private void initComponents() {//GEN-BEGIN:initComponents
- jPopupMenuChannels = new javax.swing.JPopupMenu();
- jMenuItemChannelMove = new javax.swing.JMenuItem();
- jMenuChanAdv = new javax.swing.JMenu();
- jMenuItemImport = new javax.swing.JMenuItem();
- jSeparator4 = new javax.swing.JSeparator();
- jMenuItemDelete = new javax.swing.JMenuItem();
- jPopupMenuShows = new javax.swing.JPopupMenu();
[...1407 lines suppressed...]
+ private javax.swing.JMenuItem jMenuItemCategoryAdd;
+ private javax.swing.JSeparator jSeparator7;
+ private javax.swing.JMenuItem jMenuItemCategoryDelete;
+ private javax.swing.JMenu jMenuScheduler;
+ private javax.swing.JMenuItem jNewEvent;
+ private javax.swing.JMenuItem jScheduleEditor;
+ private javax.swing.JMenu jMenuHelp;
+ private javax.swing.JMenuItem jMenuItemAbout;
+ private javax.swing.JTabbedPane jTabbedPane1;
+ private javax.swing.JSplitPane jSplitPaneContentGuide;
+ private javax.swing.JScrollPane jScrollPaneChannels;
+ private javax.swing.JTree jTree1;
+ private javax.swing.JScrollPane jScrollPaneShows;
+ private javax.swing.JTable jTableShows;
+ private javax.swing.JScrollPane jScrollPaneDownloads;
+ private javax.swing.JTable jTableDownloads;
+ private javax.swing.JScrollPane jScrollPaneUploads;
+ private javax.swing.JTable jTableUploads;
+ // End of variables declaration//GEN-END:variables
}
|
|
From: Jim V. <jim...@us...> - 2002-06-11 21:15:23
|
Update of /cvsroot/swapdv/swapdv/ui/Models
In directory usw-pr-cvs1:/tmp/cvs-serv401/ui/Models
Modified Files:
CategoryTreeModel.java ChannelTreeNode.java
Log Message:
Added channel renaming.
Index: CategoryTreeModel.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/Models/CategoryTreeModel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CategoryTreeModel.java 11 Jun 2002 15:50:04 -0000 1.3
+++ CategoryTreeModel.java 11 Jun 2002 21:15:19 -0000 1.4
@@ -181,6 +181,20 @@
}
}
+ public void update(Channel channel) {
+ Enumeration en = root.depthFirstEnumeration();
+ while (en.hasMoreElements()) {
+ TreeNode node = (TreeNode)en.nextElement();
+ if (node instanceof ChannelTreeNode) {
+ ChannelTreeNode channelNode = (ChannelTreeNode)node;
+ if (channelNode.getChannel().created == channel.created) {
+ channelNode.setChannel(guide.getChannel(channel.created));
+ nodeChanged(node);
+ return;
+ }
+ }
+ }
+ }
public void addShow(Channel chan, Show show) {
Enumeration en = root.depthFirstEnumeration();
Index: ChannelTreeNode.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/Models/ChannelTreeNode.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChannelTreeNode.java 3 Jun 2002 23:03:04 -0000 1.1
+++ ChannelTreeNode.java 11 Jun 2002 21:15:19 -0000 1.2
@@ -48,4 +48,8 @@
public Channel getChannel() {
return chan;
}
+
+ public void setChannel(Channel chan) {
+ setUserObject(chan.getShowLabel());
+ }
}
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 18:27:01
|
Update of /cvsroot/swapdv/swapdv/ui
In directory usw-pr-cvs1:/tmp/cvs-serv3068/ui
Modified Files:
SearchStatusBar.java StatusBar.form StatusBar.java
Log Message:
Replaced deprecated calls, added Util.ReadLine and modified position and sizing for first time Frame displays
Index: SearchStatusBar.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/SearchStatusBar.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SearchStatusBar.java 3 Jun 2002 23:03:04 -0000 1.1
+++ SearchStatusBar.java 11 Jun 2002 18:26:58 -0000 1.2
@@ -1,14 +1,17 @@
package swapdv.ui;
import swapdv.ReplayGuide.*;
+import java.text.*;
+import java.util.*;
class SearchStatusBar extends StatusBar implements Runnable {
-
+ SimpleDateFormat dateFormatter = new SimpleDateFormat();
+
javax.swing.JLabel searchTimePanel=null;
Thread t = null;
public SearchStatusBar() {
super();
- addPanel("started","Started "+new java.util.Date().toLocaleString());
+ addPanel("started","Started "+ dateFormatter.format(new Date()));
searchTimePanel = addPanel("elasped","Elapsed 0:0:0");
t = new Thread(this);
t.start();
Index: StatusBar.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/StatusBar.form,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatusBar.form 3 Jun 2002 23:03:04 -0000 1.1
+++ StatusBar.form 11 Jun 2002 18:26:58 -0000 1.2
@@ -7,6 +7,7 @@
</Property>
</Properties>
<SyntheticProperties>
+ <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
</SyntheticProperties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
Index: StatusBar.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/StatusBar.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StatusBar.java 3 Jun 2002 23:03:04 -0000 1.1
+++ StatusBar.java 11 Jun 2002 18:26:58 -0000 1.2
@@ -35,7 +35,6 @@
jLabelPanel.setFont(new java.awt.Font("Default", 0, 10));
jLabelPanel.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));
jPanelPanels.add(jLabelPanel);
- jPanelPanels.layout();
panels.put(name,jLabelPanel);
return jLabelPanel;
}
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 18:27:01
|
Update of /cvsroot/swapdv/swapdv/Scheduler/ui
In directory usw-pr-cvs1:/tmp/cvs-serv3068/Scheduler/ui
Modified Files:
schdActionEditorFrame.java schdActionListPanel.java
schdEventEditorFrame.java schdEventListFrame.java
schdWizardFrame.java
Log Message:
Replaced deprecated calls, added Util.ReadLine and modified position and sizing for first time Frame displays
Index: schdActionEditorFrame.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/ui/schdActionEditorFrame.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- schdActionEditorFrame.java 11 Jun 2002 00:07:40 -0000 1.4
+++ schdActionEditorFrame.java 11 Jun 2002 18:26:58 -0000 1.5
@@ -50,6 +50,7 @@
schdEventEditor schdEditor = null;
boolean editFrameInUse = false;
boolean newAction = false;
+ boolean attrsRestored = false;
/** Creates new form schdEventEditorFrame */
public schdActionEditorFrame(schdEventI theEvent) {
@@ -83,8 +84,7 @@
return;
}
- // Restore geometr, if needed
- this.pack();
+
}
// Install new event to edit
@@ -94,6 +94,12 @@
actionEditor.setAction(currentAction);
this.pack();
+ if (!attrsRestored) {
+ this.setIconImage(swapdv.SwapDV.getSwapDV().iconSwapdv32);
+ actionUtils.restoreActionEditorAttrs(this);
+ attrsRestored = true;
+ }
+
this.setVisible(true);
editFrameInUse = true;
if (newAction)
Index: schdActionListPanel.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/ui/schdActionListPanel.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- schdActionListPanel.java 9 Jun 2002 04:31:31 -0000 1.5
+++ schdActionListPanel.java 11 Jun 2002 18:26:58 -0000 1.6
@@ -66,25 +66,6 @@
}
public schdEventI getEvent() { return currentEvent; }
- public schdEventActionI promptForAction() {
- String actionTypes[] = actionUtils.getKnownActionsTypes();
- String selectedType;
-
- // If there are no actions, skip it. If there is only
- // one, silently pick it. if there is more than one,
- // let the user choose one
- if (actionTypes.length == 0) return null;
- if (actionTypes.length > 1) {
- selectedType = (String) JOptionPane.showInputDialog(this, "Choose which sort of action you wish to add", "Action selection", JOptionPane.QUESTION_MESSAGE, null, actionTypes, actionTypes[0]);
- if (selectedType == null) return null;
- } else {
- selectedType = actionTypes[0];
- }
-
- // Allocate and return a class of that type
- return actionUtils.getNewAction(selectedType);
- }
-
private schdActionEditorFrame getCurrentEditFrame(schdEventActionI theAction) {
schdActionEditorFrame theFrame = null;
@@ -123,7 +104,7 @@
// Allocate a new action, if needed
if (theAction == null) {
- if ((theAction = promptForAction()) == null) return false;
+ if ((theAction = actionUtils.selectAction(this)) == null) return false;
newAction = true;
}
@@ -134,7 +115,6 @@
theFrame.setNewAction(newAction);
theFrame.startEdit();
- actionUtils.restoreActionEditorAttrs(theFrame);
return true;
}
}
Index: schdEventEditorFrame.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/ui/schdEventEditorFrame.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- schdEventEditorFrame.java 11 Jun 2002 00:07:40 -0000 1.7
+++ schdEventEditorFrame.java 11 Jun 2002 18:26:58 -0000 1.8
@@ -33,9 +33,9 @@
package swapdv.Scheduler.ui;
-
import swapdv.Scheduler.*;
import swapdv.Scheduler.queue.*;
+import java.awt.*;
import javax.swing.*;
import swapdv.Persistance.*;
@@ -93,7 +93,23 @@
schdEditor.resetEditorLayout();
this.pack();
if (!attrsRestored) {
- if (!pStoreUtils.restoreFrameAttrs(this, prefsStore, currentEvent.getUniqueID())) this.pack();
+ if (!pStoreUtils.restoreFrameAttrs(this, prefsStore, currentEvent.getUniqueID())) {
+ Dimension theScreen = Toolkit.getDefaultToolkit().getScreenSize();
+ Dimension theFrame = this.getSize();
+
+ // Have to manually prime this sometimes - I think it's due to the tab
+ // set panel
+ if ((theFrame.width > theScreen.width) || (theFrame.height > theScreen.height)) {
+ theFrame.width = 714;
+ theFrame.height = 497;
+ }
+
+ theFrame.width = (theScreen.width - theFrame.width) / 2;
+ theFrame.height = (theScreen.height - theFrame.height) / 2;
+ this.setLocation(theFrame.width, theFrame.height);
+ this.setIconImage(swapdv.SwapDV.getSwapDV().iconSwapdv32);
+ }
+
attrsRestored = true;
}
Index: schdEventListFrame.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/ui/schdEventListFrame.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- schdEventListFrame.java 11 Jun 2002 15:50:04 -0000 1.8
+++ schdEventListFrame.java 11 Jun 2002 18:26:58 -0000 1.9
@@ -38,6 +38,7 @@
import swapdv.Scheduler.*;
import swapdv.Scheduler.actions.*;
import swapdv.Persistance.*;
+import java.awt.*;
import java.util.*;
import javax.swing.*;
@@ -101,6 +102,14 @@
if (!pStoreUtils.restoreFrameAttrs(this, prefsStore)) {
((pStoreJTable) eventListing).restoreTableLayout(prefsStore);
this.pack();
+
+ Dimension theScreen = Toolkit.getDefaultToolkit().getScreenSize();
+ Dimension theFrame = this.getSize();
+
+ theFrame.width = (theScreen.width - theFrame.width) / 2;
+ theFrame.height = (theScreen.height - theFrame.height) / 2;
+ this.setLocation(theFrame.width, theFrame.height);
+ this.setIconImage(swapdv.SwapDV.getSwapDV().iconSwapdv32);
} else
((pStoreJTable) eventListing).restoreTableLayout(prefsStore);
Index: schdWizardFrame.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/ui/schdWizardFrame.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- schdWizardFrame.java 11 Jun 2002 00:07:40 -0000 1.3
+++ schdWizardFrame.java 11 Jun 2002 18:26:58 -0000 1.4
@@ -94,7 +94,6 @@
// Attempt to restore the layout
if (!pStoreUtils.restoreFrameAttrs(this, wizardUtils.getWizardStore(), "FRAME_")) {
-
// Set starting size and center it
this.setSize(600, 400);
Dimension theScreen = Toolkit.getDefaultToolkit().getScreenSize();
@@ -103,6 +102,8 @@
theFrame.width = (theScreen.width - theFrame.width) / 2;
theFrame.height = (theScreen.height - theFrame.height) / 2;
this.setLocation(theFrame.width, theFrame.height);
+
+ this.setIconImage(swapdv.SwapDV.getSwapDV().iconSwapdv32);
}
// Lay things out
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 18:27:01
|
Update of /cvsroot/swapdv/swapdv/Scheduler/actions
In directory usw-pr-cvs1:/tmp/cvs-serv3068/Scheduler/actions
Modified Files:
actionUtils.java
Log Message:
Replaced deprecated calls, added Util.ReadLine and modified position and sizing for first time Frame displays
Index: actionUtils.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/actions/actionUtils.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- actionUtils.java 7 Jun 2002 15:39:29 -0000 1.7
+++ actionUtils.java 11 Jun 2002 18:26:58 -0000 1.8
@@ -102,6 +102,26 @@
return null;
}
+
+ public static schdEventActionI selectAction(JComponent theParent) {
+ String actionTypes[] = actionUtils.getKnownActionsTypes();
+ String selectedType;
+
+ // If there are no actions, skip it. If there is only
+ // one, silently pick it. if there is more than one,
+ // let the user choose one
+ if (actionTypes.length == 0) return null;
+ if (actionTypes.length > 1) {
+ selectedType = (String) JOptionPane.showInputDialog(theParent, "Choose which sort of action you wish to add", "Action selection", JOptionPane.QUESTION_MESSAGE, null, actionTypes, actionTypes[0]);
+ if (selectedType == null) return null;
+ } else {
+ selectedType = actionTypes[0];
+ }
+
+ // Allocate and return a class of that type
+ return actionUtils.getNewAction(selectedType);
+ }
+
public static void setLocalGuide(PublicPrivateGuide theGuide) {
localGuide = theGuide;
}
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 18:27:01
|
Update of /cvsroot/swapdv/swapdv/ReplayServer
In directory usw-pr-cvs1:/tmp/cvs-serv3068/ReplayServer
Modified Files:
HttpRequest.java HttpSocket.java
Log Message:
Replaced deprecated calls, added Util.ReadLine and modified position and sizing for first time Frame displays
Index: HttpRequest.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayServer/HttpRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HttpRequest.java 11 Jun 2002 15:50:04 -0000 1.3
+++ HttpRequest.java 11 Jun 2002 18:26:58 -0000 1.4
@@ -64,9 +64,11 @@
}
private String readLine() throws IOException {
- String s = is.readLine();
+ return swapdv.Util.readLine(is);
+
+ /*String s = is.readLine();
if (s==null) throw new IOException("null line");
- return s;
+ return s; */
/*StringBuffer sb = new StringBuffer();
int c = is.read();
if (c==-1) throw new IOException("stream closed");
Index: HttpSocket.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayServer/HttpSocket.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- HttpSocket.java 7 Jun 2002 21:45:33 -0000 1.11
+++ HttpSocket.java 11 Jun 2002 18:26:58 -0000 1.12
@@ -125,7 +125,7 @@
}
public void run() {
- DataInputStream is=null;
+ DataInputStream is = null;
HttpRequest req = null;
HttpResponse res = null;
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 18:27:01
|
Update of /cvsroot/swapdv/swapdv/ReplayClient
In directory usw-pr-cvs1:/tmp/cvs-serv3068/ReplayClient
Modified Files:
ReplayConnection.java
Log Message:
Replaced deprecated calls, added Util.ReadLine and modified position and sizing for first time Frame displays
Index: ReplayConnection.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayClient/ReplayConnection.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ReplayConnection.java 11 Jun 2002 15:50:04 -0000 1.5
+++ ReplayConnection.java 11 Jun 2002 18:26:58 -0000 1.6
@@ -101,7 +101,8 @@
is = new ThrottledInputStream(s.getInputStream());
DataInputStream dis = new DataInputStream(is);
do {
- line = dis.readLine();
+ //line = dis.readLine();
+ line = swapdv.Util.readLine(dis);
if (line.indexOf("X-User-Agent: SwapDV") != -1)
isSwapDV = true;
} while (line != null && line.length() > 0);
@@ -125,7 +126,8 @@
bos.close();
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bos.toByteArray()));
while (dis.available()>0) {
- v.addElement(dis.readLine());
+ //v.addElement(dis.readLine());
+ v.addElement(swapdv.Util.readLine(dis));
}
Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processed response body ok");
} catch (Exception ex) {
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 18:27:01
|
Update of /cvsroot/swapdv/swapdv
In directory usw-pr-cvs1:/tmp/cvs-serv3068
Modified Files:
SwapDV.form SwapDV.java Util.java
Log Message:
Replaced deprecated calls, added Util.ReadLine and modified position and sizing for first time Frame displays
Index: SwapDV.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.form,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- SwapDV.form 11 Jun 2002 15:50:04 -0000 1.24
+++ SwapDV.form 11 Jun 2002 18:26:57 -0000 1.25
@@ -321,7 +321,7 @@
</MenuItem>
<MenuItem class="javax.swing.JCheckBoxMenuItem" name="jCheckBoxAutoStart">
<Properties>
- <Property name="label" type="java.lang.String" value="Restart server on startup"/>
+ <Property name="text" type="java.lang.String" value="Restart server on startup "/>
</Properties>
<Events>
Index: SwapDV.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- SwapDV.java 11 Jun 2002 15:50:04 -0000 1.59
+++ SwapDV.java 11 Jun 2002 18:26:57 -0000 1.60
@@ -33,6 +33,7 @@
import java.util.*;
import java.io.*;
import java.net.*;
+import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.tree.*;
@@ -181,12 +182,6 @@
jMenuItemSearch.setIcon(iconSearch16);
jMenuItemSearch.setEnabled(jtellaConfig.enabled);
- setLocation(posX, posY);
-
- if (width > 100 && height > 100) {
- setSize(width, height);
- jSplitPaneContentGuide.setDividerLocation(dividerPos);
- }
jCheckBoxAutoSave.setSelected(autoSave);
jCheckBoxAutoStart.setSelected(autoRestart);
@@ -214,6 +209,31 @@
jtella = new JtellaServer(guide, details, jtellaConfig);
**/
+ // Pack this frame
+ this.pack();
+
+ // Restore size, if any
+ if ((width != -1) && (height != -1)) {
+ setSize(width, height);
+ jSplitPaneContentGuide.setDividerLocation(dividerPos);
+ } else {
+ Dimension theFrame = this.getSize();
+ if (theFrame.width < 600) theFrame.width = 600;
+ this.setSize(theFrame);
+ }
+
+ // Restore coords for it
+ if ((posX != -1) && (posY != -1)) {
+ setLocation(posX, posY);
+ } else {
+ Dimension theScreen = Toolkit.getDefaultToolkit().getScreenSize();
+ Dimension theFrame = this.getSize();
+
+ theFrame.width = (theScreen.width - theFrame.width) / 2;
+ theFrame.height = (theScreen.height - theFrame.height) / 2;
+ this.setLocation(theFrame.width, theFrame.height);
+ }
+
// Kick over the scheduler and execute any startup events
swapdv.Scheduler.actions.actionUtils.setLocalGuide(guide);
swapdv.Scheduler.actions.actionUtils.setDeviceMenu(jMenuLocal);
@@ -442,10 +462,10 @@
// Restore UI information
pStoreNodeI uiPrefs = pStore.getDomain("swapdv_ui");
dividerPos = uiPrefs.getIntAttribute("dividerPos", dividerPos);
- posX = uiPrefs.getIntAttribute("posX", posX);
- posY = uiPrefs.getIntAttribute("posY", posY);
- height = uiPrefs.getIntAttribute("height", height);
- width = uiPrefs.getIntAttribute("width", width);
+ posX = uiPrefs.getIntAttribute("posX", -1);
+ posY = uiPrefs.getIntAttribute("posY", -1);
+ height = uiPrefs.getIntAttribute("height", -1);
+ width = uiPrefs.getIntAttribute("width", -1);
int width = 0;
pStoreNodeI columnPrefs = uiPrefs.getChild("columnLayout");
@@ -1230,7 +1250,7 @@
});
jMenuLibraryServer.add(jMenuItemStart);
- jCheckBoxAutoStart.setLabel("Restart server on startup");
+ jCheckBoxAutoStart.setText("Restart server on startup ");
jCheckBoxAutoStart.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBoxAutoStartActionPerformed(evt);
Index: Util.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Util.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Util.java 7 Jun 2002 15:39:29 -0000 1.7
+++ Util.java 11 Jun 2002 18:26:58 -0000 1.8
@@ -35,9 +35,12 @@
import java.io.*;
import java.beans.*;
import java.awt.event.*;
+import swapdv.Logger.*;
public class Util {
- public static boolean CopyFile(String src, String dst, String title) {
+
+
+ public static boolean CopyFile(String src, String dst, String title) {
final File fsrc = new File(src);
final File fdst = new File(dst);
if (fdst.exists() && !fdst.isDirectory()) {
@@ -196,6 +199,31 @@
}
}
return fname;
+ }
+
+
+ public static String readLine(DataInputStream theStream) throws IOException {
+ StringBuffer lineBuffer = new StringBuffer();
+ int theChar = 0;
+
+ // Fetch byte
+ if ((theChar = theStream.read()) == -1) return "";
+
+ // Keep looping until we have a line
+ while (((theChar != (int) '\r') && (theChar != (int) '\n'))) {
+ lineBuffer.append((char) theChar);
+
+ // Get next character, breaking the read if we hit EOF
+ if ((theChar = theStream.read()) == -1) break;
+ }
+
+ // Fetch EOL char pair - we assume CR is followed by LF
+ if (theChar == (int) '\r')
+ theChar = theStream.read();
+ else
+ Logger.log(0, LoggerI.LEVEL_NOTICE, "Read a LF before a CR in http data stream");
+
+ return lineBuffer.toString();
}
}
|
|
From: Jim V. <jim...@us...> - 2002-06-11 17:33:53
|
Update of /cvsroot/swapdv/swapdv/Persistance In directory usw-pr-cvs1:/tmp/cvs-serv17864/Persistance Added Files: .cvsignore Log Message: Added. --- NEW FILE --- .cvsignore SwapDV.jar *.class .nbattrs startSwapDV |
|
From: Jim V. <jim...@us...> - 2002-06-11 17:33:15
|
Update of /cvsroot/swapdv/swapdv/ui In directory usw-pr-cvs1:/tmp/cvs-serv17606/ui Modified Files: SearchResults.java Log Message: Removed jtella-07.jar and dependancies on it. Index: SearchResults.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ui/SearchResults.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SearchResults.java 8 Jun 2002 01:12:35 -0000 1.3 +++ SearchResults.java 11 Jun 2002 17:33:08 -0000 1.4 @@ -35,7 +35,9 @@ import java.io.*; import javax.swing.*; import swapdv.JtellaServer.*; +/** import com.kenmccrary.jtella.SearchSession; +**/ import swapdv.Download.*; import javax.swing.tree.*; import swapdv.ui.Models.*; @@ -45,7 +47,9 @@ public class SearchResults extends javax.swing.JFrame implements DragTableCallback { SwapDV swapDV; SearchTableModel listResults = null; +/** SearchSession session = null; +**/ Thread timeThread = null; boolean running = true; SearchDescription desc; @@ -61,7 +65,9 @@ listResults.setupSortListener(jTableResults); DragTable dragShows = new DragTable(jTableResults, this, "shows"); show(); +/** session = swapDV.jtella.JtellaSearch(desc, listResults); +**/ setIconImage(swapDV.iconSearch32); jScrollPaneResults.getViewport().setBackground(java.awt.Color.white); @@ -327,9 +333,11 @@ }//GEN-END:initComponents private void jMenuRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuRefreshActionPerformed + /** if (session != null) session.close(); session = swapDV.jtella.JtellaSearch(desc, listResults); + **/ }//GEN-LAST:event_jMenuRefreshActionPerformed private void jTableResultsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableResultsMouseClicked @@ -426,7 +434,9 @@ private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm setVisible(false); running = false; +/** session.close(); +**/ dispose(); }//GEN-LAST:event_exitForm |
|
From: Jim V. <jim...@us...> - 2002-06-11 17:33:15
|
Update of /cvsroot/swapdv/swapdv/JtellaServer
In directory usw-pr-cvs1:/tmp/cvs-serv17606/JtellaServer
Modified Files:
JtellaDetails.java JtellaServer.java
Log Message:
Removed jtella-07.jar and dependancies on it.
Index: JtellaDetails.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/JtellaServer/JtellaDetails.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JtellaDetails.java 5 Jun 2002 00:01:55 -0000 1.7
+++ JtellaDetails.java 11 Jun 2002 17:33:08 -0000 1.8
@@ -40,7 +40,9 @@
public String IP= "";
public boolean setIP = false;
public int Port = 6346;
+/**
public int speed = com.kenmccrary.jtella.DownloadConstants.DOWNLOADSPEED_DSL;
+**/
public int in = 3;
public int out = 3;
public Vector hosts = new Vector();
@@ -53,6 +55,8 @@
}
public void setProperties(pStoreNodeI options) {
+ enabled = false;
+/**
enabled = options.getBoolAttribute("enabled", true);
speed = options.getIntAttribute("downloadSpeed");
in = options.getIntAttribute("ConnectionsIn");
@@ -70,10 +74,12 @@
else
break;
}
+**/
}
public void getProperties(pStoreNodeI options) {
options.setAttribute("enabled", enabled);
+/**
options.setAttribute("downloadSpeed", speed);
options.setAttribute("ConnectionsIn", in);
options.setAttribute("ConnectionsOut", out);
@@ -86,5 +92,6 @@
for (i=0; i<hosts.size(); i++)
options.setAttribute("host" + i, (String) hosts.get(i));
options.setAttribute("host" + i, "");
+**/
}
}
Index: JtellaServer.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/JtellaServer/JtellaServer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JtellaServer.java 7 Jun 2002 01:48:37 -0000 1.5
+++ JtellaServer.java 11 Jun 2002 17:33:08 -0000 1.6
@@ -31,6 +31,7 @@
* $Id$
*/
+/**
import com.kenmccrary.jtella.GNUTellaConnection;
import com.kenmccrary.jtella.SearchMessage;
import com.kenmccrary.jtella.SearchReplyMessage;
@@ -41,6 +42,7 @@
import com.kenmccrary.jtella.DownloadConstants;
import com.kenmccrary.jtella.ConnectionData;
import com.kenmccrary.jtella.SearchSession;
+ **/
import swapdv.ReplayGuide.*;
import swapdv.ReplayServer.ReplayDetails;
import java.net.UnknownHostException;
@@ -48,6 +50,7 @@
import java.util.*;
public class JtellaServer {
+/**
PublicPrivateGuide guide = null;
ReplayDetails details = null;
JtellaDetails config = null;
@@ -57,8 +60,10 @@
public final static int maxhits = 100;
public final static int minspeed = 0;
public final static String VENDOR = "SWDV";
+**/
public JtellaServer(PublicPrivateGuide guide, ReplayDetails details, JtellaDetails config) {
+/**
this.details = details;
this.guide = guide;
this.config = config;
@@ -105,8 +110,9 @@
}
});
thread.start();
+**/
}
-
+/**
public void reConfig() {
setConfig(con.getConnectionData());
}
@@ -148,7 +154,7 @@
public void stopRunning() {
con.stop();
}
-
+**/
public static String encode (String string) {
StringBuffer in = new StringBuffer(string);
StringBuffer out = new StringBuffer();
@@ -181,6 +187,7 @@
}
return out.toString();
}
+/**
}
class QueryReceiver implements MessageReceiver {
@@ -340,4 +347,5 @@
public void receivePush(com.kenmccrary.jtella.PushMessage pushMessage) {
System.out.println("Received push request from" + pushMessage.getIPAddress()+" for file "+pushMessage.getFileIndex());
}
+**/
}
|
|
From: Jim V. <jim...@us...> - 2002-06-11 17:33:15
|
Update of /cvsroot/swapdv/swapdv In directory usw-pr-cvs1:/tmp/cvs-serv17606 Modified Files: SwapDV.jarContent Log Message: Removed jtella-07.jar and dependancies on it. Index: SwapDV.jarContent =================================================================== RCS file: /cvsroot/swapdv/swapdv/SwapDV.jarContent,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 Binary files /tmp/cvsvDgmzj and /tmp/cvsmXRaZs differ |
|
From: Jim V. <jim...@us...> - 2002-06-11 17:31:52
|
Update of /cvsroot/swapdv/swapdv/ReplayClient
In directory usw-pr-cvs1:/tmp/cvs-serv17124/ReplayClient
Modified Files:
ReplayClient.java
Log Message:
Added sending of remote control commands.
Added a missing close() in deleteShow().
Index: ReplayClient.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayClient/ReplayClient.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ReplayClient.java 11 Jun 2002 15:50:04 -0000 1.16
+++ ReplayClient.java 11 Jun 2002 17:31:45 -0000 1.17
@@ -66,7 +66,7 @@
nl[0]=13;
nl[1]=10;
name = getFriendlyName();
- chan = Logger.getNextChannel();
+ chan = Logger.getNextChannel();
}
private String getFriendlyName() throws IOException {
@@ -87,7 +87,7 @@
details.setSwapDV(isSwapDV);
return details;
}
-
+
public boolean isSwapDV() {
return isSwapDV;
}
@@ -130,9 +130,9 @@
boolean result = false;
String connectionKey = System.currentTimeMillis()+remotefile;
ReplayConnection c= null;
- try {
+ try {
// next statement not reached until an available slot comes up
- c = new ReplayConnection(this);
+ c = new ReplayConnection(this);
long offset = 0;
if (resume) offset = new File(localfile).length();
c.writeRequest("httpfs-readfile?name=\""+remotefile+"\"&pos="+offset+"&size=" + size);
@@ -181,7 +181,7 @@
c.writeRequest("http_replay_guide-delete_show?show_id="+showHex+"&channel_id="+chanHex+"=RTV4080K0000000000");
c.writeHeaders();
c.processHeader();
- Logger.log(0, LoggerI.LEVEL_DEBUG, "Results "+c.processBodyAsLines());
+ c.close();
return true; // hmm, we don't get any status back
} catch (Exception ex) {
ex.printStackTrace();
@@ -190,6 +190,69 @@
}
}
+ public final static int REMOTE_escape = 133; //escape probably not a 'real' CioCode -- escape from remote monitor (WebTV keyboard ESCape)
+ public final static int REMOTE_stop = 156;
+ public final static int REMOTE_record = 157;
+ public final static int REMOTE_play = 158;
+ public final static int REMOTE_pause = 159;
+ public final static int REMOTE_rewind = 160;
+ public final static int REMOTE_fastforward = 161;
+ public final static int REMOTE_menu = 162;
+ public final static int REMOTE_guide = 163;
+ public final static int REMOTE_exit = 164;
+ public final static int REMOTE_channelup = 167;
+ public final static int REMOTE_channeldown = 168;
+ public final static int REMOTE_north = 169;
+ public final static int REMOTE_south = 170;
+ public final static int REMOTE_west = 171;
+ public final static int REMOTE_east = 172;
+ public final static int REMOTE_northwest = 173;
+ public final static int REMOTE_northeast = 174;
+ public final static int REMOTE_southwest = 175;
+ public final static int REMOTE_utheast = 176;
+ public final static int REMOTE_display = 177;
+ public final static int REMOTE_execute = 178; // The "select" button, in the middle of the movement buttons
+ public final static int REMOTE_enter = 179;
+ public final static int REMOTE_zero = 180;
+ public final static int REMOTE_one = 181;
+ public final static int REMOTE_two = 182;
+ public final static int REMOTE_three = 183;
+ public final static int REMOTE_four = 184;
+ public final static int REMOTE_five = 185;
+ public final static int REMOTE_six = 186;
+ public final static int REMOTE_seven = 187;
+ public final static int REMOTE_eight = 188;
+ public final static int REMOTE_nine = 189;
+ public final static int REMOTE_catchup = 190;
+ public final static int REMOTE_replayguide = 191;
+ public final static int REMOTE_instantreplay = 192;
+ public final static int REMOTE_commercialskip = 193;
+ public final static int REMOTE_jump = 195;
+ public final static int REMOTE_input = 196;
+ public final static int REMOTE_exp_1 = 197; // the "zone" button_ 197
+ public final static int REMOTE_exp_2 = 198; // unknown
+ public final static int REMOTE_power = 199; // not listed in the monitor, name not 'official'_ 199
+ public final static int REMOTE_power_on = 200; // not listed in the monitor, name not 'official'
+ public final static int REMOTE_power_off = 201; // not listed in the monitor, name not 'official'
+ public final static int REMOTE_category = 209; // displays the category section of the ReplayGuide? screen; not listed in the simulator, name not 'official'
+ public final static int REMOTE_togglerf = 211; // not listed in the monitor, name not 'official'; toggles an "RF output" setting, but not sure what -- the channel the antenna output is on?
+ public final static int REMOTE_bypass = 212; // not listed in the monitor, name not 'official'
+ public final static int REMOTE_autoskip = 213;
+
+
+ public void sendCIO(int remoteCommand) {
+ try {
+ ReplayConnection c = new ReplayConnection(this);
+ c.writeRequest("httputils-sendciomessage?cioc="+remoteCommand);
+ c.writeHeaders();
+ c.processHeader();
+ c.close();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ Logger.log(chan, LoggerI.LEVEL_ERR, ex.getMessage());
+ }
+ }
+
// only return the guide we've cached
public Guide getCachedGuide() {
return guide;
@@ -202,7 +265,7 @@
String guideFilename = "0";
// make sure we only download a guide if its newer than the one we have...
if (guide!=null) {
- guideFilename = guide.asciiHeader.RemoteFileName;
+ guideFilename = guide.asciiHeader.RemoteFileName;
Logger.log(0, LoggerI.LEVEL_DEBUG, "Existing guide has date "+guide.asciiHeader.RemoteFileName);
}
c.writeRequest("http_replay_guide-get_snapshot?guide_file_name="+guideFilename+"&serial_no=RTV4080K0000000000");
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/ui
In directory usw-pr-cvs1:/tmp/cvs-serv29659/ui
Modified Files:
ChannelChooser.java DragTable.java DropTable.java
ShowViewManager.java SwapDVStatusBar.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: ChannelChooser.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/ChannelChooser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChannelChooser.java 3 Jun 2002 23:03:04 -0000 1.1
+++ ChannelChooser.java 11 Jun 2002 15:50:04 -0000 1.2
@@ -35,6 +35,7 @@
import java.util.*;
import swapdv.ui.Models.*;
import swapdv.ReplayGuide.*;
+import swapdv.Logger.*;
public class ChannelChooser {
public int channelID = -1;
@@ -60,7 +61,7 @@
Channel chan = (Channel)en.nextElement();
if (catid == -1 || chan.category == catid) size++;
}
- System.out.println("size = "+size);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "size = "+size);
String names[] = new String[size+1];
int ids[] = new int[size+1];
Index: DragTable.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/DragTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DragTable.java 4 Jun 2002 20:54:54 -0000 1.2
+++ DragTable.java 11 Jun 2002 15:50:04 -0000 1.3
@@ -35,6 +35,7 @@
import java.awt.dnd.*;
import java.awt.datatransfer.*;
import java.awt.*;
+import swapdv.Logger.*;
public class DragTable implements DragSourceListener,DragGestureListener {
private DragSource dragSource;
@@ -77,7 +78,7 @@
}
public void dragGestureRecognized(java.awt.dnd.DragGestureEvent event) {
- System.out.println("dragGestureRecognized");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "dragGestureRecognized");
java.awt.Point p = event.getDragOrigin();
dragSource.startDrag(event, DragSource.DefaultCopyNoDrop, new StringSelection(""), this);
}
Index: DropTable.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/DropTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DropTable.java 4 Jun 2002 20:54:54 -0000 1.2
+++ DropTable.java 11 Jun 2002 15:50:04 -0000 1.3
@@ -36,6 +36,7 @@
import java.awt.datatransfer.*;
import java.util.*;
import java.awt.*;
+import swapdv.Logger.*;
public class DropTable implements DropTargetListener {
public static Point point = null;
@@ -56,7 +57,7 @@
public void drop(DropTargetDropEvent event) {
- System.out.println("Drop!");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Drop!");
DropTargetContext context = event.getDropTargetContext();
try {
event.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);
Index: ShowViewManager.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/ShowViewManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ShowViewManager.java 3 Jun 2002 23:03:04 -0000 1.1
+++ ShowViewManager.java 11 Jun 2002 15:50:04 -0000 1.2
@@ -38,6 +38,7 @@
import java.util.*;
import swapdv.ReplayGuide.*;
import swapdv.ui.Models.*;
+import swapdv.Logger.*;
public class ShowViewManager implements TreeSelectionListener, ListSelectionListener {
private TreeSelectionModel treeSelect;
@@ -95,7 +96,7 @@
if (node instanceof ShowTreeNode) {
Show show = ((ShowTreeNode)node).getShow();
int row = stm.getRow(show);
- System.out.println("need to select row "+row);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "need to select row "+row);
selectedRows.add(new Integer(row));
}
}
Index: SwapDVStatusBar.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/SwapDVStatusBar.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SwapDVStatusBar.java 10 Jun 2002 21:34:59 -0000 1.3
+++ SwapDVStatusBar.java 11 Jun 2002 15:50:04 -0000 1.4
@@ -3,6 +3,7 @@
import swapdv.*;
import swapdv.ReplayServer.*;
import swapdv.JtellaServer.*;
+import swapdv.Logger.*;
public class SwapDVStatusBar extends StatusBar implements Runnable {
@@ -71,7 +72,7 @@
String out = "";
while (li.hasNext()) {
com.kenmccrary.jtella.NodeConnection nc = (com.kenmccrary.jtella.NodeConnection)li.next();
- //System.out.println("host "+nc.getConnectedServant()+" type "+nc.getType()+" status "+nc.getStatus());
+ //Logger.log(0, LoggerI.LEVEL_DEBUG, "host "+nc.getConnectedServant()+" type "+nc.getType()+" status "+nc.getStatus());
if (nc.getType()==nc.CONNECTION_INCOMING) in = in + nc.getConnectedServant() + "->"+getStatusString(nc)+"<br>";
else out = out + nc.getConnectedServant() +"->"+getStatusString(nc)+"<br>";
}
@@ -116,7 +117,7 @@
**/
try { t.sleep(1500); } catch (Exception ex) {};
}
- System.out.println("Ending status bar thread");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Ending status bar thread");
t=null;
}
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/Download
In directory usw-pr-cvs1:/tmp/cvs-serv29659/Download
Modified Files:
Downloader.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: Downloader.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Download/Downloader.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Downloader.java 10 Jun 2002 22:36:40 -0000 1.8
+++ Downloader.java 11 Jun 2002 15:50:04 -0000 1.9
@@ -100,19 +100,16 @@
}
public void log(int channel, int level, String msg) {
- if (rrs == null)
- return;
+ if (rrs == null) return;
- /* is this message on a channel we care about? */
- if (channel != rrs.chan)
- return;
+ /* is this message on a channel we care about? */
+ if (channel != rrs.chan) return;
- /* is this message at a level we care about? */
- if (level > LoggerI.LEVEL_INFO)
- return;
+ /* is this message at a level we care about? */
+ if (level > LoggerI.LEVEL_INFO) return;
- /* show the message */
- System.out.println(msg);
+ /* show the message */
+ System.out.println(msg);
}
public String getDest() {
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/ui/Models
In directory usw-pr-cvs1:/tmp/cvs-serv29659/ui/Models
Modified Files:
CategoryTreeModel.java SearchTableModel.java
ShowTableModel.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: CategoryTreeModel.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/Models/CategoryTreeModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CategoryTreeModel.java 4 Jun 2002 23:45:17 -0000 1.2
+++ CategoryTreeModel.java 11 Jun 2002 15:50:04 -0000 1.3
@@ -34,6 +34,7 @@
import javax.swing.tree.*;
import java.util.Enumeration;
import swapdv.ReplayGuide.*;
+import swapdv.Logger.*;
public class CategoryTreeModel extends DefaultTreeModel {
Guide guide;
@@ -140,7 +141,7 @@
if (node instanceof ChannelTreeNode) {
ChannelTreeNode chanNode = (ChannelTreeNode)node;
if (chanNode.getChannel().created == channel.created) {
- System.out.println("removing channel from tree");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "removing channel from tree");
TreeNode parent = chanNode.getParent();
int in[] = new int[1];
in[0] = parent.getIndex(chanNode);
@@ -188,7 +189,7 @@
if (node instanceof ChannelTreeNode) {
ChannelTreeNode ChanNode = (ChannelTreeNode)node;
if (chan.created == ChanNode.getChannel().created) {
- System.out.println("Added show to channel in tree");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Added show to channel in tree");
addShow(ChanNode, show);
return;
}
Index: SearchTableModel.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/Models/SearchTableModel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SearchTableModel.java 3 Jun 2002 23:03:04 -0000 1.1
+++ SearchTableModel.java 11 Jun 2002 15:50:04 -0000 1.2
@@ -34,6 +34,7 @@
import javax.swing.table.*;
import java.util.*;
import swapdv.JtellaServer.*;
+import swapdv.Logger.*;
public class SearchTableModel extends SortableTableModel implements SearchCallback {
static final private int SHOW = 0;
@@ -62,7 +63,7 @@
while (en.hasMoreElements()) {
Vector row = (Vector)en.nextElement();
if (((String)row.get(IP)).equals(remoteIP) && ((Date)row.get(RECORDED)).equals(showID)) {
- System.out.println("Ignoring duplicate entry");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Ignoring duplicate entry");
return;
}
}
Index: ShowTableModel.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ui/Models/ShowTableModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ShowTableModel.java 10 Jun 2002 23:02:03 -0000 1.2
+++ ShowTableModel.java 11 Jun 2002 15:50:04 -0000 1.3
@@ -34,6 +34,7 @@
import javax.swing.table.*;
import java.util.*;
import swapdv.ReplayGuide.*;
+import swapdv.Logger.*;
public class ShowTableModel extends SortableTableModel {
private Guide guide = null;
@@ -90,7 +91,7 @@
synchronized public void update() {
for (int row=getRowCount()-1; row>= 0; row--) {
if (getShow(row) == null) {
- System.out.println("Removing show at row "+row);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Removing show at row "+row);
remove(row);
}
}
@@ -120,7 +121,7 @@
public void remove(Show show) {
int row = getRow(show);
remove(row);
- System.out.println("removing show "+row);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "removing show "+row);
}
protected Vector getRowVec(Show show) {
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/Scheduler/ui
In directory usw-pr-cvs1:/tmp/cvs-serv29659/Scheduler/ui
Modified Files:
schdEventListFrame.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: schdEventListFrame.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/ui/schdEventListFrame.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- schdEventListFrame.java 6 Jun 2002 19:00:36 -0000 1.7
+++ schdEventListFrame.java 11 Jun 2002 15:50:04 -0000 1.8
@@ -408,7 +408,6 @@
JOptionPane.showMessageDialog(this, "You must first select an event before you can remove it", "No event selected", JOptionPane.DEFAULT_OPTION);
return;
}
- System.out.println("Selected row #" + theRow + " in events table");
schdEventI theEvent = schdQueue.getEvent(theRow);
if (theEvent == null) return;
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/Scheduler/queue
In directory usw-pr-cvs1:/tmp/cvs-serv29659/Scheduler/queue
Modified Files:
schdEvent.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: schdEvent.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/queue/schdEvent.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- schdEvent.java 9 Jun 2002 18:58:58 -0000 1.8
+++ schdEvent.java 11 Jun 2002 15:50:04 -0000 1.9
@@ -37,6 +37,7 @@
import swapdv.Persistance.*;
import java.util.*;
import java.text.*;
+import swapdv.Logger.*;
public class schdEvent implements schdEventI, pStoreSerializable {
private Vector changeListeners = null;
@@ -598,8 +599,7 @@
try {
theAction.doAction(this);
} catch (Exception actionError) {
- System.out.println("Unexpected exception processing action " + theAction.getDescription() + " for event " + eventDescription);
- System.out.println("Exception: " + actionError.getMessage());
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Exception in action " + theAction.getDescription() + " for event " + eventDescription + ", " + actionError.getMessage());
actionError.printStackTrace();
}
}
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/Scheduler/actions
In directory usw-pr-cvs1:/tmp/cvs-serv29659/Scheduler/actions
Modified Files:
copyShowAction.java deleteShowAction.java
deleteShowEditor.form deleteShowEditor.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: copyShowAction.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/actions/copyShowAction.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- copyShowAction.java 8 Jun 2002 21:29:05 -0000 1.11
+++ copyShowAction.java 11 Jun 2002 15:50:04 -0000 1.12
@@ -151,7 +151,7 @@
// Match each possible component
if (!isMatchingPattern(sourceCategory, theHeader.getCategory(theGuide.getChannel(theShow.created).category))) return false;
- if (!isMatchingPattern(sourceReplayChannel,theGuide.getChannel(theShow.created).getShowLabel())) return false;
+ if (!isMatchingPattern(sourceReplayChannel,theGuide.getChannel(theShow.created).getChannelLabel())) return false;
if (!isMatchingPattern(sourceTVChannel, theShow.getChannelName())) return false;
if (!isMatchingPattern(sourceShowTitle, showDesc.getShowTitle())) return false;
if (!isMatchingPattern(sourceEpisodeTitle, showDesc.getEpisodeTitle())) return false;
Index: deleteShowAction.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/actions/deleteShowAction.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- deleteShowAction.java 3 Jun 2002 23:03:04 -0000 1.5
+++ deleteShowAction.java 11 Jun 2002 15:50:04 -0000 1.6
@@ -35,54 +35,272 @@
import swapdv.Scheduler.*;
import swapdv.Persistance.*;
+import java.util.*;
+import java.io.*;
+import swapdv.ReplayClient.*;
+import swapdv.ReplayGuide.*;
+import javax.swing.*;
+import swapdv.Logger.*;
/**
*
* @author gerry
*
* - Ability to delete program by matching channel name
+ * - Ability to delete program by matching category name
+ * - Ability to delete program if it exists on this SwapDV
+ * - Ability to delete a program that is more than X days old
* - Ability to delete program by matching program name and/or description
- * - Ability to delete program by checking +/- days since recorded
*
*
*/
public class deleteShowAction extends abstractAction {
+ public String deleteDeviceName = ""; /* i.e. media room */
+ public String deleteCategory = ""; /* i.e. general stuff */
+ public String deleteReplayChannel = ""; /* i.e. Simpsons */
+ public String deleteTVChannel = ""; /* i.e. WGN */
+ public String deleteShowTitle = ""; /* i.e. The Simpsons */
+ public String deleteEpisodeTitle = ""; /* i.e. Monorail */
+ public String deleteEpisodeDescription = ""; /* i.e. Springfield gets a Monorail */
+
+ public boolean deleteDuplicates = true; /* i.e. deleteif matching show title & episode */
+ public boolean dupCheckShowTitle = true;
+ public boolean dupCheckEpisode = true;
+ public boolean dupCheckDescription = false;
+ public int deleteOlderThanDays = -1; /* Delete if older than, 0 = now, -1 = disabled */
- /** Creates a new instance of deleteShowAction */
public deleteShowAction() {
super("Delete Show");
}
- /** that caused us to run. */
- public void doAction(schdEventI theSchdEvent) {
+ public boolean restoreFromPStore(pStoreNodeI store, pStoreManager storeManager) {
+ actionDescription = store.getAttribute("actionDescription");
+ actionEnabled = store.getBoolAttribute("actionEnabled");
+
+ deleteDeviceName = store.getAttribute("deleteDeviceName", "10.0.10.1");
+ deleteCategory = store.getAttribute("deleteCategory");
+ deleteReplayChannel = store.getAttribute("deleteReplayChannel");
+ deleteTVChannel = store.getAttribute("deleteTVChannel");
+ deleteShowTitle = store.getAttribute("deleteShowTitle");
+ deleteEpisodeTitle = store.getAttribute("deleteEpisodeTitle");
+ deleteEpisodeDescription = store.getAttribute("deleteEpisodeDescription");
+
+ deleteDuplicates = store.getBoolAttribute("deleteDuplicates", true);
+ dupCheckShowTitle = store.getBoolAttribute("dupCheckTitle", true);
+ dupCheckEpisode = store.getBoolAttribute("dupCheckEpisode", true);
+ dupCheckDescription = store.getBoolAttribute("dupCheckDescription", false);
+
+ deleteOlderThanDays = store.getIntAttribute("deleteOlderThanDays", -1);
+ return true;
+ }
+
+ public boolean saveToPStore(pStoreNodeI store, pStoreManager storeManager) {
+ store.setAttribute("actionDescription", actionDescription);
+ store.setAttribute("actionEnabled", actionEnabled);
+
+ store.setAttribute("deleteDeviceName", deleteDeviceName);
+ store.setAttribute("deleteCategory", deleteCategory);
+ store.setAttribute("deleteReplayChannel", deleteReplayChannel);
+ store.setAttribute("deleteTVChannel", deleteTVChannel);
+ store.setAttribute("deleteShowTitle", deleteShowTitle);
+ store.setAttribute("deleteEpisodeTitle", deleteEpisodeTitle);
+ store.setAttribute("deleteEpisodeDescription", deleteEpisodeDescription);
+
+ store.setAttribute("deleteDuplicates", deleteDuplicates);
+ store.setAttribute("dupCheckTitle", dupCheckShowTitle);
+ store.setAttribute("dupCheckEpisode", dupCheckEpisode);
+ store.setAttribute("dupCheckDescription", dupCheckDescription);
+ store.setAttribute("deleteOlderThanDays", deleteOlderThanDays);
+
+ return true;
+ }
+
+ // Apply the passed pattern to the passed target and if they
+ // match return true.
+ public boolean isMatchingPattern(String thePattern, String theTarget) {
+ // If the pattern is empty, everything matches
+ if (thePattern.equals("")) return true;
+
+ // Convert strings to upper case (for case insensitive matches)
+ thePattern = thePattern.trim().toUpperCase();
+ theTarget = theTarget.trim().toUpperCase();
+
+ // Break things up
+ StringTokenizer patternTokens = new StringTokenizer(thePattern);
+ String theToken = null;
+ while (patternTokens.hasMoreTokens()) {
+ // Get the token, clean it up. If blank, ignore it
+ theToken = patternTokens.nextToken().trim();
+ if (theToken.equals("")) continue;
+
+ // See if we can find this in the target
+ if (theTarget.indexOf(theToken) == -1) return false;
+ }
+
+ // If we got here, we got through it and we matched
+ return true;
+ }
+
+ // Determine if the passed show matches our selectives
+ public boolean isMatchingShow(ReplayClient theClient, Guide theGuide, Show theShow) {
+ Description showDesc = theShow.getDescription();
+ Header theHeader = theGuide.header;
+
+ // Match each possible component
+ if (!isMatchingPattern(deleteCategory, theHeader.getCategory(theGuide.getChannel(theShow.created).category))) return false;
+ if (!isMatchingPattern(deleteReplayChannel, theGuide.getChannel(theShow.created).getShowLabel())) return false;
+ if (!isMatchingPattern(deleteTVChannel, theShow.getChannelName())) return false;
+ if (!isMatchingPattern(deleteShowTitle, showDesc.getShowTitle())) return false;
+ if (!isMatchingPattern(deleteEpisodeTitle, showDesc.getEpisodeTitle())) return false;
+ if (!isMatchingPattern(deleteEpisodeDescription, showDesc.getShowDescription())) return false;
+
+ // See if it's old enough
+ if (deleteOlderThanDays > 0) {
+ int daysOld = (int) ((new Date().getTime() / 1000) - theShow.recorded) / (60 * 60 * 24);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Testing show " + showDesc.getShowTitle() + ", Episode " + showDesc.getEpisodeTitle() + ", " + daysOld + " days old");
+ if (daysOld <= deleteOlderThanDays) return false;
+ }
+
+ return true;
}
- /** Restore the previously saved state of this object from the pStore
- * It's best if the pStoreNodeI has nothing else stored in it but
- * this object (and any descendent object of this object). The name of the
- * child should be unique and repeatable (so subsequent save/restore cycles will
- * always use the same information in the pStore)
- * @param restoreFromNode pStoreNodeI to restore this objects state from.
- * @return returns true if the objects state was properly restored and false if there was
- * a problem preventing the objects restoration. Note that if this returns false,
- * the object is considered in an undefined state and should not be used.
- */
- public boolean restoreFromPStore(pStoreNodeI restoreFromNode, pStoreManager storeManager) {
+ private boolean isQueuedImport(ReplayClient theClient, Guide theGuide, Show theShow) {
+ Enumeration importList = swapdv.SwapDV.getSwapDV().getCurrentImports().elements();
+ Description showDesc = theShow.getDescription();
+ Description importShowDesc = null;
+ swapdv.ImportInfo theImport = null;
+ Show importShow = null;
+ boolean titleIsDup = false;
+ boolean episodeIsDup = false;
+ boolean descriptionIsDup = false;
+
+ while (importList.hasMoreElements()) {
+ theImport = (swapdv.ImportInfo) importList.nextElement();
+ if ((importShow = theImport.theShow) == null) continue;
+ importShowDesc = importShow.getDescription();
+
+ // Setup duplicate flags
+ titleIsDup = showDesc.getShowTitle().equalsIgnoreCase(importShowDesc.getShowTitle());
+ episodeIsDup = showDesc.getEpisodeTitle().equalsIgnoreCase(importShowDesc.getEpisodeTitle());
+ descriptionIsDup = showDesc.getShowDescription().equalsIgnoreCase(importShowDesc.getShowDescription());
+
+ // We only consider a dup if everything matches (unlike actual guide based duplicate checks)
+ if (titleIsDup && episodeIsDup && descriptionIsDup) {
+ Logger.log(0, LoggerI.LEVEL_INFO, "SCHD::DELETE_SHOWS: Skipping queued for import show " + showDesc.getShowTitle() + ", Episode " + showDesc.getEpisodeTitle());
+ return true;
+ }
+ }
+
+ // No dups found
return false;
}
- /** Store this objects state into the pStore with the passed node. It's best if
- * the pStoreNodeI has nothing else stored in it but this object (and any
- * descendent object of this object). The name of the child should be unique and
- * repeatable (so subsequent save/restore cycles will always use the same
- * information in the pStore)
- * @param storeToNode pStoreNodeI to save this object to. There should be no other children or other
- * attributes stored in this node besides those set in place by the object.
- * @return true if the objects state was successfully preserved, false if there was
- * an error. If false is returned, the object should not be considered saved
- * and the pStore representation of this object should be considered invalid.
- */
- public boolean saveToPStore(pStoreNodeI storeToNode, pStoreManager storeManager) {
+ private boolean isDuplicateShow(ReplayClient theClient, Guide theGuide, Show theShow) {
+ PublicPrivateGuide localGuide = actionUtils.getLocalGuide();
+ Description showDesc = theShow.getDescription();
+ Description localShowDesc = null;
+ Show localShow = null;
+ boolean titleIsDup = false;
+ boolean episodeIsDup = false;
+ boolean descriptionIsDup = false;
+
+ Enumeration showList = localGuide.shows.elements();
+ while (showList.hasMoreElements()) {
+ localShow = (Show) showList.nextElement();
+ localShowDesc = localShow.getDescription();
+
+ // Setup duplicate flags
+ titleIsDup = showDesc.getShowTitle().equalsIgnoreCase(localShowDesc.getShowTitle());
+ episodeIsDup = showDesc.getEpisodeTitle().equalsIgnoreCase(localShowDesc.getEpisodeTitle());
+ descriptionIsDup = showDesc.getShowDescription().equalsIgnoreCase(localShowDesc.getShowDescription());
+
+ // A show is a duplicate if each selected item is true. If
+ // any selected is false, the show is "unique"
+ if ((!dupCheckShowTitle || (dupCheckShowTitle && titleIsDup))
+ && (!dupCheckEpisode || (dupCheckEpisode && episodeIsDup))
+ && (!dupCheckDescription || (dupCheckDescription && descriptionIsDup))) {
+ Logger.log(0, LoggerI.LEVEL_INFO, "SCHD::DELETE_SHOWS: Selecting duplicate/existing show " + showDesc.getShowTitle() + ", Episode " + showDesc.getEpisodeTitle());
+ return true;
+ }
+ }
+
+ // If we made it all the way, this is "unique"
return false;
+ }
+
+ private boolean deleteShow(ReplayClient theClient, Guide theGuide, Show theShow) {
+ Description theShowDesc = theShow.getDescription();
+ int showID = theShow.recorded;
+
+ // Delete the show
+ /*
+ if (!theClient.deleteShow(theShow)) {
+ Logger.log(0, LoggerI.LEVEL_ERR, "SCHD::DELETE_SHOWS: Unable to delete show " + theShowDesc.getShowTitle() + ", Episode " + theShowDesc.getEpisodeTitle() + " from " + theClient.name);
+ return false;
+ } else */
+ Logger.log(0, LoggerI.LEVEL_INFO, "SCHD::DELETE_SHOWS: Deleted show " + theShowDesc.getShowTitle() + ", Episode " + theShowDesc.getEpisodeTitle() + " from " + theClient.name);
+
+ return true;
+ }
+
+ /** that caused us to run. */
+ public void doAction(schdEventI theSchdEvent) {
+ ReplayClient theClient = null;
+ Show theShow = null;
+ Guide theGuide = null;
+ JMenu deviceMenu = actionUtils.getDeviceMenu();
+ int deviceCount = deviceMenu.getItemCount();
+ String menuLabel = null;
+ String deviceName = null;
+ String deviceAddr = null;
+ int devicePort = 0;
+ int deleteCount = 0;
+
+ // Iterate over each known device for match checking
+ for (int deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++) {
+ // Parse this device
+ try {
+ menuLabel = deviceMenu.getItem(deviceIndex).getText();
+ deviceName = menuLabel.substring(0, menuLabel.indexOf("(") - 1).trim();
+ deviceAddr = menuLabel.substring(menuLabel.indexOf("(") + 1, menuLabel.indexOf(":"));
+ devicePort = Integer.parseInt(menuLabel.substring(menuLabel.indexOf(":") + 1, menuLabel.indexOf(")")));
+ } catch (Exception parseError) { continue; }
+
+ // See of this device name matches our device spec
+ if (!isMatchingPattern(deleteDeviceName, deviceName)) continue;
+
+ // Fetch the guide
+ try {
+ if ((theClient = ReplayClient.getReplayClient(deviceAddr, devicePort)) == null) {
+ Logger.log(0, LoggerI.LEVEL_WARN, "SCHD::DELETE_SHOWS: Action for event " + theSchdEvent + " could not fetch client for " + deviceName + " - device skipped");
+ continue;
+ }
+ if ((theGuide = theClient.getGuide()) == null) {
+ Logger.log(0, LoggerI.LEVEL_WARN, "SCHD::DELETE_SHOWS: Action for event " + theSchdEvent + " could not fetch content guide for " + deviceName + " - device skipped");
+ continue;
+ }
+ } catch (IOException ioErr) {
+ Logger.log(0, LoggerI.LEVEL_ERR, "SCHD::DELETE_SHOWS: Action for event " + theSchdEvent + " got an error access device " + deviceName + " - device skipped");
+ continue;
+ }
+
+ // Iterate over each show in the guide, checking for matches
+ Enumeration showList = theGuide.shows.elements();
+ while (showList.hasMoreElements()) {
+ theShow = (Show) showList.nextElement();
+
+ // See if this show matches our filters
+ if (!isMatchingShow(theClient, theGuide, theShow)) continue;
+
+ // See if this show is a duplicate
+ if (deleteDuplicates && !isDuplicateShow(theClient, theGuide, theShow)) continue;
+
+ // See if show is queued
+ if (isQueuedImport(theClient, theGuide, theShow)) continue;
+
+ // Delete this show
+ if (deleteShow(theClient, theGuide, theShow)) deleteCount++;
+ }
+ }
}
}
Index: deleteShowEditor.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Scheduler/actions/deleteShowEditor.form,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- deleteShowEditor.form 1 Jun 2002 18:43:19 -0000 1.1
+++ deleteShowEditor.form 11 Jun 2002 15:50:04 -0000 1.2
@@ -1,9 +1,719 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.1">
+ <NonVisualComponents>
+ <Component class="javax.swing.ButtonGroup" name="titleButtonGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="episodeButtonGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="descriptionButtonGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="deviceButtonGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="categoryButtonGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="themeButtonGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="tvChannelButtonGroup">
+ </Component>
+ </NonVisualComponents>
<SyntheticProperties>
- <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
+ <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,26,0,0,3,16"/>
</SyntheticProperties>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="basicsChannel">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="Show To Delete">
+ <Property name="tabTitle" type="java.lang.String" value="Show To Delete"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="showTitlePanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select Shows to Delete by Shows Title"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingShowTitles">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Delete only shows whose title matches"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="titleButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingShowTitlesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllShowTitles">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Don't consider show titles"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="titleButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllShowTitlesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="showTitlePattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="episodePanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select Shows To Delete by Episode Title"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="2" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingEpisodes">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Delete only shows with episodes matching"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="episodeButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingEpisodesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllEpisodes">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Don't consider episode titles"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="episodeButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllEpisodesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="episodePattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="descriptionPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select Shows to Delete by Episode Description"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="3" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="18" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingDescriptions">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Delete only shows with descriptions matching"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="descriptionButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingDescriptionsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllDescriptions">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Don't consider episode descriptions"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="descriptionButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllDescriptionsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="descriptionPattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="jPanel1">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Actions Controls"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="actionEnabledCheckBox">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Enabled?"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="descLabel">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Description"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="20" insetsBottom="0" insetsRight="0" anchor="13" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="actionDescription">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="agePanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select Shows to Delete by Age"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="18" weightX="1.0" weightY="1.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="deleteByAgeCheckBox">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Delete only shows older than"/>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteByAgeCheckBoxActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="deleteShowAge">
+ <Properties>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[64, 21]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[64, 21]"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="0" insetsBottom="4" insetsRight="4" anchor="17" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="days"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="advancedPanel">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="Advanced Deletion Selection">
+ <Property name="tabTitle" type="java.lang.String" value="Advanced Deletion Selection"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="devicePanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select and Delete Shows from ReplayTV Device"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingDevices">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Scan only ReplayTVs matching"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="deviceButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingDevicesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllDevices">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Scan All Known ReplayTVs"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="deviceButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllDevicesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="devicePattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="categoryPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select and Delete Shows Filed under Replay Category/Folder"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingCategories">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Scan only categories matching"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="categoryButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingCategoriesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllCategories">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Scan All Categories"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="categoryButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllCategoriesActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="categoryPattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="tvChannelPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select and Delete Shows recorded from TV Channel Name"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="18" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingTVChannels">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Delete shows recorded on TV channels matching"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="tvChannelButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingTVChannelsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllTVChannels">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Don't consider shows TV Channel"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="tvChannelButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllTVChannelsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="tvChannelPattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="replayChannelPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Select and Delete Shows in Replay Channel/Theme"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="1.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="scanMatchingReplayChannels">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Scan only Replay Channels matching"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="themeButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanMatchingReplayChannelsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="scanAllReplayChannels">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Dialog" size="12" style="0"/>
+ </Property>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="Scan all Replay Channels"/>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="themeButtonGroup"/>
+ </Property>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="scanAllReplayChannelsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="0" insetsRight="4" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="replayChannelPattern">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="4" insetsBottom="4" insetsRight="4" anchor="17" weightX="1.0" weightY="0.0"/>
+ ...
[truncated message content] |
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/ReplayGuide In directory usw-pr-cvs1:/tmp/cvs-serv29659/ReplayGuide Modified Files: Description.java Guide.java Header.java PublicPrivateGuide.java Util.java Log Message: Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions Index: Description.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayGuide/Description.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Description.java 3 Jun 2002 23:03:03 -0000 1.2 +++ Description.java 11 Jun 2002 15:50:04 -0000 1.3 @@ -33,6 +33,7 @@ import java.util.*; import java.io.*; +import swapdv.Logger.*; public class Description { char szSuzuki[] = new char[128]; @@ -165,7 +166,7 @@ producerLen = (byte)Util.writeChars(os,this.szProducers,true); directorLen = (byte)Util.writeChars(os,this.szDirectors,true); if (os.size()>szDescription.length) { - System.out.println("New pack too big!"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "New pack too big!"); return os.size()-szDescription.length; } byte[] b = os.toByteArray(); Index: Guide.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayGuide/Guide.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Guide.java 7 Jun 2002 15:39:29 -0000 1.9 +++ Guide.java 11 Jun 2002 15:50:04 -0000 1.10 @@ -33,6 +33,7 @@ import java.util.*; import java.io.*; +import swapdv.Logger.*; public class Guide implements Cloneable { public Header header; @@ -101,14 +102,14 @@ channels = new Vector(); for (int i=0; i< header.channels; i++) channels.addElement(new Channel(is)); - System.out.println("Created "+channels.size()+" channels"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Created "+channels.size()+" channels"); shows = new Vector(); int requiredLength = ASCIIFooter.requiredLength; if (missingAscii) requiredLength = 0; // there is NO footer in this guide while (is.available()>requiredLength) shows.addElement(new Show(is)); - System.out.println("Created "+shows.size()+" shows"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Created "+shows.size()+" shows"); if (!missingAscii) asciiFooter = new ASCIIFooter(is); else asciiFooter = new ASCIIFooter(); @@ -127,7 +128,7 @@ byte[] body = getBytes(asciiHeaders); // repack the whole guide fos.write(body,0,body.length); fos.close(); - System.out.println("Saved guide to "+filename); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Saved guide to "+filename); this.filename = filename; } @@ -205,13 +206,13 @@ // need to subtract one from "instance" in other shows in the same channel (whose instance is > than this one) int channel = 0; modifiedDate = System.currentTimeMillis(); - System.out.println("Deleting show "+prettyString(show.szDescription)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Deleting show "+prettyString(show.szDescription)); for (channel = 0; channel<channels.size(); channel++) { Channel chan = (Channel)channels.elementAt(channel); if (chan.created==show.created) { - System.out.println("Show is connected to channel "+prettyString(chan.szShowLabel)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Show is connected to channel "+prettyString(chan.szShowLabel)); if (chan.stored==0) { - System.out.println("GUIDE CORRUPTED: Channel has no stored shows?"); + Logger.log(0, LoggerI.LEVEL_ERR, "GUIDE CORRUPTED: Channel has no stored shows?"); return false; } chan.stored--; @@ -219,7 +220,7 @@ Show shw = (Show)shows.elementAt(i); if ((shw.created==show.created) && (shw!=show)) { if (shw.instance>show.instance) { - System.out.println("Subtracting from instance number in related show "+prettyString(shw.szDescription)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Subtracting from instance number in related show "+prettyString(shw.szDescription)); shw.instance--; } } @@ -227,7 +228,7 @@ return shows.removeElement(show); } } - System.out.println("GUIDE CORRUPTED: Channel for show could not be found"); + Logger.log(0, LoggerI.LEVEL_ERR, "GUIDE CORRUPTED: Channel for show could not be found"); return false; } @@ -246,18 +247,18 @@ // need to subtract 1 from Channels (and 2 and 3) in Header modifiedDate = System.currentTimeMillis(); int nshows = 0; - System.out.println("Deleting channel "+prettyString(channel.szShowLabel)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Deleting channel "+prettyString(channel.szShowLabel)); while (nshows<shows.size()) { Show show = (Show)shows.elementAt(nshows); if (channel.created==show.created) { - System.out.println("Removing associated show: "+prettyString(show.szDescription)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Removing associated show: "+prettyString(show.szDescription)); //shows.removeElement(show); // use this less efficient method because superclassing this may require side-effects when shows are deleted if (!deleteShow(show)) nshows++; //move to next show anyway if we failed to delete it... } else nshows++; } if (header.channels==0) { - System.out.println("GUIDE CORRUPTED: Guide already has no channels left"); + Logger.log(0, LoggerI.LEVEL_ERR, "GUIDE CORRUPTED: Guide already has no channels left"); return false; }; // the move shows up in the file, so adjust showoffset pointer @@ -285,7 +286,7 @@ modifiedDate = System.currentTimeMillis(); int created = channel.created; while (getChannel(created)!=null) created++; // channel with same created ID already exists - if (created!=channel.created) System.out.println("WARNING: created channel date modified to "+created); + if (created!=channel.created) Logger.log(0, LoggerI.LEVEL_WARN, "created channel date modified to "+created); Channel newChannel = null; try { newChannel = (Channel)channel.clone(); } catch (CloneNotSupportedException ex) { ex.printStackTrace(); } @@ -296,7 +297,7 @@ header.showoffset = header.showoffset + Channel.byteSize; channels.addElement(newChannel); - System.out.println("Added channel "+ prettyString(newChannel.szShowLabel)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Added channel "+ prettyString(newChannel.szShowLabel)); newChannel.stored=0; if (addShows && (fromGuide!=null)) { for (int shows=0; shows<fromGuide.shows.size(); shows++) { @@ -318,7 +319,7 @@ Channel channel = (Channel)channels.elementAt(nchannels); if (channel.created==channelID) { channel.category = catid; - System.out.println("setting channel "+channel.created+" to "+catid); + Logger.log(0, LoggerI.LEVEL_DEBUG, "setting channel "+channel.created+" to "+catid); return; } } @@ -338,7 +339,7 @@ // also need to ensure recorded time value is unique int recorded = show.recorded; while (getShow(recorded)!=null) recorded++; - if (recorded!=show.recorded) System.out.println("WARNING: recorded show date modified to "+recorded); + if (recorded!=show.recorded) Logger.log(0, LoggerI.LEVEL_WARN, "recorded show date modified to "+recorded); // add the show Show newShow = null; @@ -348,7 +349,7 @@ newShow.created=toChannel.created; toChannel.stored++; // = instance - System.out.println("Added show "+ prettyString(newShow.szDescription) +" to "+prettyString(toChannel.szShowLabel)); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Added show "+ prettyString(newShow.szDescription) +" to "+prettyString(toChannel.szShowLabel)); shows.insertElementAt(newShow,nshows); return newShow; } Index: Header.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayGuide/Header.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Header.java 3 Jun 2002 23:03:03 -0000 1.4 +++ Header.java 11 Jun 2002 15:50:04 -0000 1.5 @@ -32,6 +32,7 @@ */ import java.io.*; +import swapdv.Logger.*; public class Header { public char pad1=(char)0; // Junk @@ -96,7 +97,7 @@ unknown4=Util.readInt(is); secondaryoffset=Util.readInt(is); categories=Util.readInt(is); - System.out.println("Guide contains "+categories+" categories"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Guide contains "+categories+" categories"); for (int i=0; i<category.length; i++) category[i]=Util.readInt(is); for (int i=0; i<unknown5.length; i++) unknown5[i]=Util.readInt(is); for (int i=0; i<categoryoffset.length; i++) categoryoffset[i]=Util.readInt(is); Index: PublicPrivateGuide.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayGuide/PublicPrivateGuide.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PublicPrivateGuide.java 3 Jun 2002 23:03:03 -0000 1.3 +++ PublicPrivateGuide.java 11 Jun 2002 15:50:04 -0000 1.4 @@ -31,6 +31,8 @@ import java.util.Hashtable; import java.io.*; +import swapdv.Logger.*; + /** * * @author trevor @@ -63,7 +65,7 @@ // should probably do some checking of the hashtable contents vs. the guide entries fis.close(); } catch (Exception ex) { - System.out.println("WARNING: Failed to load public/private information from "+showFile.getAbsoluteFile()+" (for guide "+filename+")"); + Logger.log(0, LoggerI.LEVEL_WARN, "Failed to load public/private information from "+showFile.getAbsoluteFile()+" (for guide "+filename+")"); ex.printStackTrace(); showAccess = new Hashtable(); } @@ -75,7 +77,7 @@ private File getPublicPrivateFile(String filename) { File f = new File(filename); File parent = f.getParentFile(); - System.out.println("PublicPrivate file is "+new File(parent,"dvshare.txt")); + Logger.log(0, LoggerI.LEVEL_DEBUG, "PublicPrivate file is "+new File(parent,"dvshare.txt")); return new File(parent,"dvshare.txt"); } Index: Util.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayGuide/Util.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Util.java 3 Jun 2002 23:03:03 -0000 1.2 +++ Util.java 11 Jun 2002 15:50:04 -0000 1.3 @@ -34,6 +34,7 @@ import java.util.*; import java.io.*; +import swapdv.Logger.*; public class Util { @@ -101,7 +102,7 @@ totalRead += amtRead; } while(totalRead < len); if(totalRead != len) - System.out.println("Didn't forceread total amount!"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Didn't forceread total amount!"); } private static int ubyteToInt(byte b) { |
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/Logger
In directory usw-pr-cvs1:/tmp/cvs-serv29659/Logger
Modified Files:
Logger.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: Logger.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/Logger/Logger.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Logger.java 4 Jun 2002 12:23:37 -0000 1.4
+++ Logger.java 11 Jun 2002 15:50:04 -0000 1.5
@@ -52,10 +52,21 @@
/* find the next available channel for log sources */
public synchronized static int getNextChannel() {
- int newChannel;
+ int newChannel = -1;
- newChannel = channels.nextClearBit(0);
- channels.set(newChannel);
+ // See if there is an unused channel somewhere
+ int maxBits = channels.length();
+ for (int bitIndex = 0; bitIndex < maxBits; bitIndex++) {
+ if (channels.get(bitIndex)) continue;
+ newChannel = bitIndex;
+ break;
+ }
+
+ // If no unused channels, allocate the next available one
+ if (newChannel == -1) newChannel = channels.length();
+
+ // Mark it in use and return
+ channels.set(newChannel);
return newChannel;
}
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:08
|
Update of /cvsroot/swapdv/swapdv/ReplayClient
In directory usw-pr-cvs1:/tmp/cvs-serv29659/ReplayClient
Modified Files:
ReplayClient.java ReplayConnection.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: ReplayClient.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayClient/ReplayClient.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ReplayClient.java 11 Jun 2002 00:14:50 -0000 1.15
+++ ReplayClient.java 11 Jun 2002 15:50:04 -0000 1.16
@@ -116,7 +116,7 @@
c.processHeader();
Vector v = c.processBodyAsLines();
c.close();
- if (v.size()<2) System.out.println("Probably no such file");
+ if (v.size()<2) Logger.log(0, LoggerI.LEVEL_DEBUG, "Probably no such file");
return v;
} catch (Exception ex) {
ex.printStackTrace();
@@ -145,7 +145,7 @@
c.close();
result = true;
if (bytesread < 0) {
- System.out.println("< 0");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "< 0");
if (pcb != null) pcb.DownloadStopped(new Boolean(false),"File "+remotefile+" was not found on "+name);
} else {
try {
@@ -154,7 +154,7 @@
if (bytesread>=size) {
if (pcb!=null) pcb.DownloadStopped(new Boolean(true),"Copied ok");
if (bytesread>size)
- System.out.println("Warning: Copied too many bytes "+ (bytesread-size));
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Warning: Copied too many bytes "+ (bytesread-size));
} else if (pcb!=null) {
pcb.DownloadStopped(new Boolean(false),"Failed to copy entire file");
}
@@ -169,6 +169,10 @@
return result;
}
+ public boolean deleteShow(Show theShow) {
+ return deleteShow(theShow.recorded, theShow.created);
+ }
+
public boolean deleteShow(int showID, int chanID) {
try {
ReplayConnection c = new ReplayConnection(this);
@@ -177,7 +181,7 @@
c.writeRequest("http_replay_guide-delete_show?show_id="+showHex+"&channel_id="+chanHex+"=RTV4080K0000000000");
c.writeHeaders();
c.processHeader();
- System.out.println("Results "+c.processBodyAsLines());
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Results "+c.processBodyAsLines());
return true; // hmm, we don't get any status back
} catch (Exception ex) {
ex.printStackTrace();
@@ -199,7 +203,7 @@
// make sure we only download a guide if its newer than the one we have...
if (guide!=null) {
guideFilename = guide.asciiHeader.RemoteFileName;
- System.out.println("Existing guide has date "+guide.asciiHeader.RemoteFileName);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Existing guide has date "+guide.asciiHeader.RemoteFileName);
}
c.writeRequest("http_replay_guide-get_snapshot?guide_file_name="+guideFilename+"&serial_no=RTV4080K0000000000");
c.writeHeaders();
@@ -210,7 +214,7 @@
byte[] bytes = bos.toByteArray();
if (bytes.length>=24 && new String(bytes,0,24).equals("guide_file_name=upToDate")) {
Logger.log(chan, LoggerI.LEVEL_DEBUG, "Up-to-date guide being returned");
- System.out.println("Up-to-date guide being returned");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Up-to-date guide being returned");
return guide;
}
guide = new Guide(bytes);
Index: ReplayConnection.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayClient/ReplayConnection.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ReplayConnection.java 8 Jun 2002 00:49:34 -0000 1.4
+++ ReplayConnection.java 11 Jun 2002 15:50:04 -0000 1.5
@@ -48,11 +48,11 @@
protected ReplayConnection(ReplayClient client) throws IOException {
c = client;
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Connecting to "+c.ipAddr+":"+c.port+"..");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Connecting to "+c.ipAddr+":"+c.port+"..");
s = new Socket(c.ipAddr,c.port);
s.setSoTimeout(5 * 60 * 1000); // TODO: make this configurable
os = s.getOutputStream();
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Connected to "+c.ipAddr+":"+c.port);
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Connected to "+c.ipAddr+":"+c.port);
nl[0]=13;
nl[1]=10;
}
@@ -62,7 +62,7 @@
int d = is.available();
while (d>0) {
if (d>buf.length) d = buf.length;
- //System.out.println("emptying "+d+" bytes from stream");
+ //Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "emptying "+d+" bytes from stream");
is.read(buf,0,d);
d = is.available();
}
@@ -79,23 +79,23 @@
}
protected void writeHeaders() {
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Sending HTTP headers");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Sending HTTP headers");
httpLine("Authorization: Basic Uk5TQmFzaWM6QTd4KjgtUXQ=");
httpLine("User-Agent: Replay-HTTPFS/1");
httpLine("Host: "+c.ipAddr+":"+c.port);
httpLine("Accept-Encoding: gzip");
httpLine("");
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Sent HTTP headers");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Sent HTTP headers");
try { os.flush(); } catch (Exception ex) {}
}
protected void writeRequest(String req) {
httpLine("GET http://"+c.ipAddr+":"+c.port+"/"+req+" HTTP/1.1");
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Sent HTTP request");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Sent HTTP request");
}
protected void processHeader() {
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processing http header");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processing http header");
String line = null;
try {
is = new ThrottledInputStream(s.getInputStream());
@@ -113,11 +113,11 @@
}
if (!isSwapDV)
is.setRate(ThrottledInputStream.replayThrottledRate);
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processed http header");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processed http header");
}
protected Vector processBodyAsLines() {
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processing response body into lines");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processing response body into lines");
Vector v = new Vector();
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -127,7 +127,7 @@
while (dis.available()>0) {
v.addElement(dis.readLine());
}
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processed response body ok");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processed response body ok");
} catch (Exception ex) {
ex.printStackTrace();
Logger.log(c.chan, LoggerI.LEVEL_ERR, ex.getMessage());
@@ -136,14 +136,14 @@
}
protected String processBodyAsString() {
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processing response body into string");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processing response body into string");
String s = null;
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
double bytesread = processBodyToStream(bos,null);
bos.close();
s = new String(bos.toByteArray());
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processed response body ok");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processed response body ok");
} catch (Exception ex) {
ex.printStackTrace();
Logger.log(c.chan, LoggerI.LEVEL_ERR, ex.getMessage());
@@ -163,7 +163,7 @@
byte tmp[];
protected double processBodyToStream(OutputStream fos, ProgressCallback pcb) {
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processing response body to file");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processing response body to file");
double total = 0;
int amt_read = 0;
byte[] buffer = new byte[1024*32*8];
@@ -208,7 +208,7 @@
//cb.ReplayClientMessage("Getting chunk "+cnum+" ("+chunklen+" bytes)"); cnum++;
}
emptyStream();
- Logger.log(c.chan, LoggerI.LEVEL_INFO, "Processed response body ok");
+ Logger.log(c.chan, LoggerI.LEVEL_DEBUG, "Processed response body ok");
if (pcb != null) pcb.StatusChange("Processed body");
} catch (Exception ex) {
pcb.DownloadStopped(new Boolean(false),ex.getMessage());
|
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:07
|
Update of /cvsroot/swapdv/swapdv/ReplayServer In directory usw-pr-cvs1:/tmp/cvs-serv29659/ReplayServer Modified Files: HttpRequest.java HttpResponse.java ReplayDetails.java ReplayServer.java Log Message: Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions Index: HttpRequest.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayServer/HttpRequest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HttpRequest.java 3 Jun 2002 23:03:03 -0000 1.2 +++ HttpRequest.java 11 Jun 2002 15:50:04 -0000 1.3 @@ -34,6 +34,7 @@ import java.util.*; import java.io.*; +import swapdv.Logger.*; public class HttpRequest { public Properties requestPairs; @@ -59,7 +60,7 @@ is.read(); c++; } - System.out.println("Discarded "+c+" body bytes"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Discarded "+c+" body bytes"); } private String readLine() throws IOException { @@ -82,18 +83,18 @@ private void processHeader() throws IOException { String line; try { - System.out.println("Trying to process next HTTP request"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Trying to process next HTTP request"); request = readLine(); - System.out.println("Request: " + request); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Request: " + request); StringTokenizer tokenizer = new StringTokenizer(request," "); requestType = tokenizer.nextToken(); - //System.out.println("requestType: "+requestType); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "requestType: "+requestType); if (tokenizer.hasMoreTokens()) requestPath = tokenizer.nextToken(); else { - System.out.println("WARNING: no request path"); + Logger.log(0, LoggerI.LEVEL_WARN, "no request path"); requestPath=""; } - //System.out.println("requestPath: "+requestPath); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "requestPath: "+requestPath); int offset = requestPath.indexOf('?'); if (offset>=0) { queryPairs = decodeString(requestPath.substring(offset+1)); @@ -101,26 +102,26 @@ } else queryPairs = new Properties(); if (tokenizer.hasMoreTokens()) requestProtocol = tokenizer.nextToken(); else { - System.out.println("WARNING: no request protocol"); + Logger.log(0, LoggerI.LEVEL_WARN, "no request protocol"); requestProtocol=""; } - //System.out.println("requestProtocol: "+requestProtocol); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "requestProtocol: "+requestProtocol); line = readLine(); int index; while ((line!=null) && (line.length()>2)) { index = line.indexOf((int)':'); if (index<0) { - System.out.println("Malformed request line: " + line); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Malformed request line: " + line); } else { String rname = line.substring(0,index).trim(); String rvalue = line.substring(index+1,line.length()).trim(); requestPairs.put(rname.toLowerCase(),rvalue); - //System.out.println("Adding pair " + rname + "="+rvalue); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "Adding pair " + rname + "="+rvalue); } line = readLine(); } } catch (IOException e) { - //System.out.println("IO exception reading HTTP header " + e); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "IO exception reading HTTP header " + e); //e.printStackTrace(); throw e; } @@ -141,7 +142,7 @@ name = pair; value = ""; } - //System.out.println("decodeString: adding pair " + name +" = "+ value); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "decodeString: adding pair " + name +" = "+ value); name = decode(name); value = decode(value); p.put(name,value); Index: HttpResponse.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayServer/HttpResponse.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- HttpResponse.java 7 Jun 2002 20:27:34 -0000 1.10 +++ HttpResponse.java 11 Jun 2002 15:50:04 -0000 1.11 @@ -34,6 +34,7 @@ import java.util.*; import java.io.*; import java.net.*; +import swapdv.Logger.*; public class HttpResponse { public Hashtable headers; @@ -96,7 +97,7 @@ public void sendBody(byte body[]) throws IOException { writeString(os,getPaddedHex(body.length)+"\r\n"); - //System.out.println("OUT ["+body.length+" bytes]"); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "OUT ["+body.length+" bytes]"); os.write(body); } @@ -126,7 +127,7 @@ fis.skip(offset); } catch (FileNotFoundException f) { - System.out.println("file "+filename+" was not found"); + Logger.log(0, LoggerI.LEVEL_ERR, "file "+filename+" was not found"); writeString(os, "00000009\r\n80820005\r\n"); return; } @@ -153,7 +154,7 @@ os.write(buffer,0,(int)totalBytesRead); os.flush(); pcb.uploadProgress(progress, os.getBytesSent()); - //System.out.println("OUT ["+totalBytesRead+" bytes]"); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "OUT ["+totalBytesRead+" bytes]"); firstTime = false; } while (fis.available()>0); } catch (IOException ex) { //make sure we close the file @@ -192,7 +193,7 @@ } os.write(buffer,0,(int)totalBytesRead); os.flush(); - //System.out.println("OUT ["+totalBytesRead+" bytes]"); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "OUT ["+totalBytesRead+" bytes]"); firstTime = false; } while (fis.available()>0); } catch (IOException ex) { //make sure we close the file @@ -241,7 +242,7 @@ while (fis.available()>0) { int bytesRead = fis.read(buffer); bos.write(buffer,0,bytesRead); - //System.out.println("BODYOUT "+bytesRead+" bytes"); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "BODYOUT "+bytesRead+" bytes"); } fis.close(); } Index: ReplayDetails.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayServer/ReplayDetails.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ReplayDetails.java 4 Jun 2002 18:03:24 -0000 1.10 +++ ReplayDetails.java 11 Jun 2002 15:50:04 -0000 1.11 @@ -35,6 +35,7 @@ import java.net.InetAddress; import java.net.URL; import swapdv.Persistance.*; +import swapdv.Logger.*; public class ReplayDetails { public String Name = ""; @@ -110,7 +111,7 @@ } private void writeString(OutputStream os, String s) throws IOException { - //System.out.println("XML "+s); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "XML "+s); os.write(s.getBytes()); } Index: ReplayServer.java =================================================================== RCS file: /cvsroot/swapdv/swapdv/ReplayServer/ReplayServer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ReplayServer.java 3 Jun 2002 23:03:03 -0000 1.12 +++ ReplayServer.java 11 Jun 2002 15:50:04 -0000 1.13 @@ -102,12 +102,12 @@ return; } Logger.log("WARNING: unhandled request"); - System.out.println("*** Unhandled request: "+req.request); + Logger.log(0, LoggerI.LEVEL_DEBUG, "*** Unhandled request: "+req.request); /*byte[] buffer = new byte[1024]; int n=1; while (n>0) { n = req.is.read(buffer); - if (n>0) System.out.println(new String(buffer,0,n)); + if (n>0) Logger.log(0, LoggerI.LEVEL_DEBUG, new String(buffer,0,n)); }*/ throw new Exception("Unhandled request: "+req.requestPath); } @@ -142,7 +142,7 @@ path = path.replace('/', File.separatorChar); // make slashes the right way around } // BUG? Trim double // off front, caused by bad ls return? - //System.out.println("Filename requested is "+path); + //Logger.log(0, LoggerI.LEVEL_DEBUG, "Filename requested is "+path); return path; } @@ -171,7 +171,7 @@ // Send it from memory if we have it if (guide != null) { - System.out.println("Returning guide from memory"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Returning guide from memory"); String guideStamp = String.valueOf(guide.getLastModifiedTime()/1000); if (guideStamp.equals(wantedGuide)) { Logger.log("Guide in memory is up-to-date"); @@ -191,11 +191,11 @@ if (lastfile==null) { //we DONT have a guide to return! //so pretend we've already returned this one earler... - System.out.println("WARNING: no guide found to return!"); + Logger.log(0, LoggerI.LEVEL_WARN, "no guide found to return!"); resp.writeBody("guide_file_name=upToDate\n"); // \n only } else { boolean found = false; - System.out.println("Most up-to-date guide "+lastfile+" being returned"); + Logger.log(0, LoggerI.LEVEL_DEBUG, "Most up-to-date guide "+lastfile+" being returned"); File f = new File(details.root+File.separatorChar+lastfile); String noext = lastfile.substring(0,lastfile.length()-4); if (noext.equals(wantedGuide)) { |
|
From: Gerry D. <gd...@us...> - 2002-06-11 15:50:07
|
Update of /cvsroot/swapdv/swapdv
In directory usw-pr-cvs1:/tmp/cvs-serv29659
Modified Files:
ReplayTV.form ReplayTV.java SwapDV.form SwapDV.java
Log Message:
Changed all println()'s over the Logger.logs, added --debug switch and initial deleteShowActions
Index: ReplayTV.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayTV.form,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ReplayTV.form 11 Jun 2002 00:14:49 -0000 1.13
+++ ReplayTV.form 11 Jun 2002 15:50:03 -0000 1.14
@@ -220,6 +220,7 @@
<SyntheticProperty name="generatePosition" type="boolean" value="true"/>
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
+ <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
</SyntheticProperties>
<Events>
@@ -259,7 +260,10 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Shows & Channels" toolTip=""/>
+ <JTabbedPaneConstraints tabName="Shows & Channels" toolTip="">
+ <Property name="tabTitle" type="java.lang.String" value="Shows & Channels"/>
+ <Property name="tabToolTip" type="java.lang.String" value=""/>
+ </JTabbedPaneConstraints>
</Constraint>
</Constraints>
Index: ReplayTV.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayTV.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ReplayTV.java 11 Jun 2002 00:14:50 -0000 1.30
+++ ReplayTV.java 11 Jun 2002 15:50:03 -0000 1.31
@@ -214,7 +214,7 @@
return;
long size = Long.parseLong((String)fstat.get("size"));
String localfile = Util.getSaveFileName(swapDV, path, defName);
- System.out.println("Savefile: " + localfile);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Savefile: " + localfile);
if (localfile == null)
return;
new Downloader(swapDV,rrs.name, rrs.ipAddr, rrs.port, path, localfile, size, desc);
Index: SwapDV.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.form,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- SwapDV.form 8 Jun 2002 21:29:05 -0000 1.23
+++ SwapDV.form 11 Jun 2002 15:50:04 -0000 1.24
@@ -662,13 +662,13 @@
</Properties>
<SyntheticProperties>
<SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/>
- <SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
+ <SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-91,0,0,2,-121"/>
<SyntheticProperty name="formPosition" type="java.awt.Point" value="-84,-19,0,5,115,114,0,14,106,97,118,97,46,97,119,116,46,80,111,105,110,116,-74,-60,-118,114,52,126,-56,38,2,0,2,73,0,1,120,73,0,1,121,120,112,0,0,0,0,0,0,0,0"/>
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
<SyntheticProperty name="generatePosition" type="boolean" value="true"/>
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
- <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
+ <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-91,0,0,2,-121"/>
</SyntheticProperties>
<Events>
Index: SwapDV.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- SwapDV.java 10 Jun 2002 21:34:58 -0000 1.58
+++ SwapDV.java 11 Jun 2002 15:50:04 -0000 1.59
@@ -95,13 +95,17 @@
public SwapDVStatusBar statusBar = null;
private static boolean daemonMode = false;
+ private static boolean debugMode = false;
+
private schdEventQueue schdQueue = null;
private schdEventListFrame schdListing = null;
private static SwapDV thisSwapDV = null;
private schdWizardFrame eventWizardFrame = null;
+ private StringBuffer loggerBuffer = new StringBuffer(128);
public static boolean isDaemonMode() { return daemonMode; }
+ public static boolean isDebugMode() { return debugMode; }
public static SwapDV getSwapDV() { return thisSwapDV; }
public SwapDV(String args[]) {
@@ -203,8 +207,7 @@
}
}
- if (autoRestart)
- startServer();
+ if (autoRestart) startServer();
/**
if (jtellaConfig.enabled)
@@ -358,9 +361,51 @@
}
public void log(int channel, int level, String msg) {
- /* We're only going to log broadcast messages here */
- if (channel == 0)
- System.out.println(msg);
+
+
+ /* We're only going to log broadcast messages here */
+ if (channel == 0) {
+ if (level == LoggerI.LEVEL_DEBUG) {
+ if (debugMode) {
+ loggerBuffer.setLength(0);
+ loggerBuffer.append("DEBUG: ");
+ loggerBuffer.append(msg);
+ System.err.println(loggerBuffer.toString());
+ }
+ return;
+ }
+
+ loggerBuffer.setLength(0);
+ switch(level) {
+ case LoggerI.LEVEL_INFO:
+ loggerBuffer.append("info: ");
+ break;
+ case LoggerI.LEVEL_ERR:
+ loggerBuffer.append("ERROR: ");
+ break;
+ case LoggerI.LEVEL_WARN:
+ loggerBuffer.append("Warn: ");
+ break;
+ case LoggerI.LEVEL_ALERT:
+ loggerBuffer.append("Alert: ");
+ break;
+ case LoggerI.LEVEL_CRIT:
+ loggerBuffer.append("Critical: ");
+ break;
+ case LoggerI.LEVEL_NOTICE:
+ loggerBuffer.append("Notice: ");
+ break;
+ default:
+ break;
+ }
+ loggerBuffer.append(msg);
+ System.out.println(loggerBuffer.toString());
+
+ }
+ }
+
+ public static void debug(String debugMsg) {
+ Logger.log(0, LoggerI.LEVEL_DEBUG, debugMsg);
}
/**
@@ -378,7 +423,7 @@
pStore = new pStoreManager(pStoreFile);
pStore.openStore();
} catch (IOException openError) {
- System.out.println("Unable to open persistant store");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Unable to open persistant store");
openError.printStackTrace();
System.exit(1);
}
@@ -386,7 +431,7 @@
// Install/restore previous values for each module
pStoreNodeI downloadAttrs = pStore.getDomain("download");
DownloadCounter.setProperties(downloadAttrs);
- jtellaConfig.setProperties(pStore.getDomain("jtella"));
+ //jtellaConfig.setProperties(pStore.getDomain("jtella"));
swapdv.ReplayClient.ThrottledInputStream.setProperties(downloadAttrs);
details.setProperties(pStore.getDomain("replayServer"));
@@ -427,7 +472,7 @@
public void storeValues() {
pStoreNodeI downloadAttrs = pStore.getDomain("download");
DownloadCounter.getProperties(downloadAttrs);
- jtellaConfig.getProperties(pStore.getDomain("jtella"));
+ //jtellaConfig.getProperties(pStore.getDomain("jtella"));
swapdv.ReplayClient.ThrottledInputStream.getProperties(downloadAttrs);
details.getProperties(pStore.getDomain("replayServer"));
schdQueue.preserveEventQueue(pStore.getDomain("eventScheduler").getChild("eventQueue"));
@@ -467,7 +512,7 @@
try {
pStore.flushStore();
} catch (IOException flushError) {
- System.out.println("Error flushing persistant store!");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Error flushing persistant store!");
flushError.printStackTrace();
}
}
@@ -491,7 +536,7 @@
if (guide.getCategoryId(info.dstCategory) == -1) {
guide.addCategory(info.dstCategory);
treeModel.addCategory(info.dstCategory);
- System.out.println("** Importing show, category " + info.dstCategory + " did not exist locally - added to local guide");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "** Importing show, category " + info.dstCategory + " did not exist locally - added to local guide");
}
// see if we can find the channel we're supposed to add the show to
boolean addChannel = false;
@@ -504,7 +549,7 @@
Channel importChannel = importGuide.getChannel(importShow.created);
chan = guide.addChannel(importChannel,importGuide,false);
guide.setCategory(chan, guide.getCategoryId(info.dstCategory));
- System.out.println("** Importing show, channel ID " + info.dstChannelID + " didn't exist - added");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "** Importing show, channel ID " + info.dstChannelID + " didn't exist - added");
}
// add the show...
@@ -722,6 +767,7 @@
// Create each possible command line option
CmdLineParser.Option storeFileOption = cmdLine.addStringOption('s', "store");
CmdLineParser.Option daemonModeOption = cmdLine.addBooleanOption('d', "daemon");
+ CmdLineParser.Option debugModeOption = cmdLine.addBooleanOption('x', "debug");
CmdLineParser.Option helpOption = cmdLine.addBooleanOption('?', "help");
// Parse the command line
@@ -742,9 +788,11 @@
// Handle daemon mode
Boolean daemonModeFlag = (Boolean) cmdLine.getOptionValue(daemonModeOption);
- if ((daemonModeFlag != null) && (daemonModeFlag.booleanValue()))
- daemonMode = true;
+ daemonMode = ((daemonModeFlag != null) && (daemonModeFlag.booleanValue()));
+ Boolean debugModeFlag = (Boolean) cmdLine.getOptionValue(debugModeOption);
+ debugMode = ((debugModeFlag != null) && (debugModeFlag.booleanValue()));
+
// Handle a file spec
String theStoreFile = (String) cmdLine.getOptionValue(storeFileOption);
if (theStoreFile != null) {
@@ -772,7 +820,7 @@
}
public boolean canAddCategory() {
- System.out.println("count = "+guide.getCategoryCount()+" max = "+guide.MAXCATEGORIES);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "count = "+guide.getCategoryCount()+" max = "+guide.MAXCATEGORIES);
return (guide.getCategoryCount() < guide.MAXCATEGORIES);
}
@@ -1419,8 +1467,8 @@
pack();
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
- setSize(new java.awt.Dimension(400, 300));
- setLocation((screenSize.width-400)/2,(screenSize.height-300)/2);
+ setSize(new java.awt.Dimension(647, 421));
+ setLocation((screenSize.width-647)/2,(screenSize.height-421)/2);
}//GEN-END:initComponents
private void jNewEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNewEventActionPerformed
@@ -1786,7 +1834,7 @@
private void jMenuItemShowDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemShowDeleteActionPerformed
int items[] = jTableShows.getSelectedRows();
for (int i=0; i<items.length; i++) {
- System.out.println("Deleting from row "+items[i]);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Deleting from row "+items[i]);
int showID = listShows.getShowID(items[i]);
Show show = guide.getShow(showID);
boolean r = guide.deleteShow(guide.getShow(showID));
@@ -2072,7 +2120,7 @@
Show shows [] = null;
int rows[] = null;
Channel channels [] = null;
- System.out.println("Drop from swapdv:"+drag+" into "+drop);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Drop from swapdv:"+drag+" into "+drop);
if (!drop.equals("tree")) return;
if (drag.equals("tree")) {
TreePath paths [] = jTree1.getSelectionPaths();
@@ -2088,7 +2136,7 @@
channels = new Channel[paths.length];
for (int i=0; i<paths.length; i++) {
ChannelTreeNode chanNode = (ChannelTreeNode)paths[i].getLastPathComponent();
- System.out.println("channel dragged "+chanNode);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "channel dragged "+chanNode);
channels[i] = chanNode.getChannel();
}
break;
@@ -2097,7 +2145,7 @@
}
}
if (drag.equals("shows")) {
- System.out.println("show dragged");
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "show dragged");
rows = jTableShows.getSelectedRows();
jTableShows.clearSelection();
shows = new Show[rows.length];
@@ -2110,20 +2158,20 @@
TreeNode node = (TreeNode)dropPath.getLastPathComponent();
switch(dropPath.getPathCount()) {
case 2: // category
- System.out.println("Dropped on category "+node);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Dropped on category "+node);
if (channels != null || shows != null)
toCategory = ((CategoryTreeNode)node).getName();
else return;
break;
case 3: // channel
- System.out.println("Dropped on channel "+node);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Dropped on channel "+node);
if (shows != null)
toChannel = ((ChannelTreeNode)node).getChannel();
else return;
break;
case 4: // show
- System.out.println("Dropped on show "+node);
+ Logger.log(0, LoggerI.LEVEL_DEBUG, "Dropped on show "+node);
toChannel = ((ChannelTreeNode)(node.getParent())).getChannel();
break;
}
|