The U.S. Air Force is developing software to enable UAVs to be refueled in the air. This would enable reconnaissance UAVs to spend even more time aloft, and would most likely be applied first to the largest UAVs, like Global Hawk. Aircraft reliability has, for decades, been good enough to allow manned aircraft to, in theory, stay aloft for days at a time. But the main limitation has always been the human crew, and the lack of any mission calling for flights of that length. UAVs are different, especially those that do reconnaissance. Staying in the air for 12, 24 or more hours at a stretch, provides a very valuable battlefield commodity; persistence. Being able to point cameras (still, motion, or night vision) at the battlefield persistently (thus the use of the term persistence) have proved to be a major combat advantage. Keeping UAVs in the air for extended periods has other advantages as well. Large UAVs are also going to be used as space satellite substitutes, carrying communications gear that allows them to support military satellite radios on the ground. Such radios are much more effective than the traditional AM or FM types (which have problems with atmospheric, or terrain, interference.)
Commercial aircraft have had software controlled landing systems for over two decades. Such software allows a commercial airliner to land without pilot intervention, usually in bad weather when the pilot cant see anything, but the radar and other sensors can, and use special software to take control and bring the aircraft down. Such software has been used for UAVs (like Global Hawk) to enable them to land without the help of a pilot. Similar software would bring the UAV close enough to a aerial tanker to allow refueling to take place. This is a somewhat more complex operation than landing, as the aircraft getting the fuel has to constantly adjust its position to remain attached to the fuel line. But it's not a huge leap given the current state of flight software. Such a system could also be used for manned aircraft, to take the strain off crews flying very long missions. On those 10-30 hour flights (like B-2s going from the American mid-west to Iraq), the most stressful moments are take off, landing, bombing, and in flight refueling.